Skip to content

feat(auth): support provider configuration connection checks - #556

Closed
zippyy wants to merge 4 commits into
Silo-Server:mainfrom
techrelay:agent/auth-provider-connection-checks
Closed

zippyy wants to merge 4 commits into
Silo-Server:mainfrom
techrelay:agent/auth-provider-connection-checks

Conversation

@zippyy

@zippyy zippyy commented Aug 7, 2026 •

Copy link
Copy Markdown

Problem

Part of #554

The staged plugin configuration tester currently knows how to probe metadata providers, but an auth_provider.v1 plugin cannot validate LDAP, OAuth, or other authentication-service connectivity before an administrator saves its settings.

The concrete consumer is techrelay/Silo-LDAP-Plugin#1.

Approach

  • let an authentication capability explicitly advertise boolean metadata.connection_test=true;
  • preserve the current metadata-provider probe behavior and priority;
  • start a temporary plugin instance with the staged values and preserved saved secrets;
  • send an AuthenticateRequest containing boolean metadata.connection_test=true and no username or password;
  • apply the existing 20-second probe timeout;
  • stop the temporary instance after the test;
  • reject authentication capabilities that do not explicitly advertise support;
  • document the compatibility key and provider responsibilities in docs/plugins/auth-provider-connection-checks.md.

This uses existing protobuf Struct metadata and does not change the v1 wire schema. A future SDK RPC may replace the convention while retaining this key for compatibility.

Compatibility and risks

  • metadata-provider connection tests are unchanged and retain priority for plugins that expose both capability types;
  • authentication providers that do not advertise the capability remain unsupported by the Test connection action;
  • providers must treat the request as a service/configuration probe and must not require or log end-user credentials;
  • error sanitization remains the provider's responsibility. The companion LDAP provider returns only a stable operation stage while logging the full directory error.

Testing

Focused tests cover:

  • discovery of an advertised auth-provider probe;
  • rejection when the capability is unadvertised;
  • rejection when connection_test is false;
  • preservation of metadata-provider priority.

Required repository checks:

make lint
make test
cd web && pnpm run lint && pnpm run format:check
make verify-local-paths
go test ./internal/plugins

Current verification status

  • No workflow jobs had started for this split fork PR at the time of this update. The earlier combined fork PR was held at GitHub's action_required approval gate before jobs were created.
  • Local verification could not be executed in the available environment because it has Go 1.23.2, no local dependency cache for this repository, and no network access to install the required toolchain or dependencies.
  • This remains a draft until upstream CI runs and its real output is pasted here.

AI Disclosure

  • Tool(s): ChatGPT with the GitHub connector
  • Model(s): GPT-5.6 Thinking
  • Involvement: AI-assisted; the human supplied the deployed LDAP use case and expected behavior, while AI implemented and adversarially reviewed the host change
  • Adversarial review: confirmed that the original combined change violated the one-concern-per-PR rule, so connection testing was isolated from role synchronization. The review also verified opt-in capability discovery, metadata-provider precedence, staged-secret preservation, timeout behavior, temporary-instance cleanup, and the need to document provider-side error sanitization.

Checklist

  • Linked scope issue
  • One concern: authentication-provider configuration checks
  • Focused unit tests and contract documentation
  • Documented current verification limitations without claiming unexecuted tests
  • Upstream CI verification completed and output recorded
  • Companion LDAP provider revalidated against a live directory

@coderabbitai

coderabbitai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1e86ce2b-2b78-4ddf-b65c-4b9222445181

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zippyy zippyy closed this Aug 7, 2026
@zippyy
zippyy deleted the agent/auth-provider-connection-checks branch August 7, 2026 00:42

zippyy commented Aug 7, 2026

Copy link
Copy Markdown
Author

Closing this draft because it was opened prematurely before the fork work had been reviewed and approved for upstream submission. The implementation will remain in the TechRelay fork until the maintainer-facing submission is intentionally prepared.

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