Skip to content

fix(auth): harden LDAP provider contracts and diagnostics - #1

Closed
zippyy wants to merge 23 commits into
mainfrom
agent/upstream-readiness
Closed

zippyy wants to merge 23 commits into
mainfrom
agent/upstream-readiness

Conversation

@zippyy

@zippyy zippyy commented Aug 7, 2026 •

Copy link
Copy Markdown

Problem

The LDAP provider works against the target Active Directory deployment, but the first implementation still had several review blockers: raw directory errors could reach RPC clients, failure stages were inferred from English error strings, malformed configuration types silently fell back to defaults, the role-management boundary was implicit, and public metadata still contained deployment-specific examples and stale repository paths.

Related host design: Silo-Server/silo-server#554.

Approach

  • introduce typed LDAP failure stages with error unwrapping;
  • log full directory failures while returning only a stable stage to the host;
  • make the authenticator injectable so RPC redaction behavior is tested directly;
  • reject unknown and incorrectly typed configuration fields, including fractional timeouts;
  • return silo_role_managed=true alongside silo_role so the host must see an explicit management marker;
  • advertise the connection-check and managed-role compatibility keys in capability metadata;
  • update the module path and public URLs to github.com/techrelay/Silo-LDAP-Plugin;
  • replace environment-specific group names with generic examples;
  • document the host compatibility contract, security behavior, verification commands, and remaining limitations.

Compatibility and risk

  • providers that disable role synchronization return neither managed-role claim;
  • invalid credentials and group denial remain indistinguishable;
  • role synchronization still evaluates direct values from the configured group attribute; nested AD groups remain out of scope;
  • strict configuration decoding may reject malformed values that older builds silently ignored, which is intentional;
  • live-directory interoperability still requires manual validation against the deployment's LDAP implementation.

Testing

The repository workflow is configured to run:

go mod tidy
git diff --exit-code -- go.mod go.sum
go mod verify
go test ./...
go vet ./...
CGO_ENABLED=0 go build -trimpath -o /tmp/silo-plugin-auth-ldap .

Current verification status

  • No GitHub Actions workflow run was created for this PR during this review session. The branch and pull-request triggers are present, so organization/repository Actions settings still need to be checked.
  • Local verification could not be executed in the available environment because it has Go 1.23.2 while this module and the current Silo plugin SDK require Go 1.26, and the environment has no network access to install that toolchain or dependencies.
  • The PR remains a draft. CI output and manual LDAP/AD deployment results must be pasted here before it is marked ready.

AI Disclosure

  • Tool(s): ChatGPT with the GitHub connector
  • Model(s): GPT-5.6 Thinking
  • Involvement: AI-assisted; the human supplied the real deployment requirements and expected behavior, while AI implemented and reviewed the hardening changes
  • Adversarial review: found raw LDAP error disclosure, brittle string-based stage classification, silent config fallback, an implicit role-management boundary, deployment-specific public metadata, and stale module URLs. The confirmed findings were addressed in code and tests.

Checklist

@zippyy zippyy closed this Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant