Repository navigation
Description
Problem
Silo authentication plugins can validate credentials and return identity claims, but the host currently has no generic way to:
- test staged authentication-provider configuration before saving it; or
- opt into synchronizing the linked Silo account's coarse
user/adminrole from a trusted external provider.
This was encountered while deploying an LDAP authentication provider against Active Directory. The provider can determine group membership, but only the Silo host owns local account roles, permissions, and access-group assignment.
Proposed host contract
Connection checks
An auth_provider.v1 capability advertises:
{"connection_test": true}When an administrator tests staged configuration, Silo starts a temporary plugin instance with the staged values and sends an AuthenticateRequest whose metadata contains boolean connection_test=true. The request contains no username or password. Providers that do not advertise the capability retain existing behavior.
Managed roles
After successful authentication, a provider may return both:
{
"silo_role_managed": true,
"silo_role": "user"
}The host ignores silo_role unless the explicit managed marker is boolean true. Only user and admin are accepted. Malformed managed claims fail authentication instead of partially applying authorization state.
Promotion clears the normal-user access group. Demotion restores default user permissions and the current default access group. Each transition is logged with the installation, capability, user, previous role, and new role.
Trust model
Authentication plugins already execute trusted server-side code and receive credentials for their provider. Managed-role support additionally permits a trusted provider to promote or demote accounts linked to that installation. The contract is deliberately limited to user and admin; providers cannot set arbitrary permissions, libraries, or access-group IDs.
A working local administrator account remains required for recovery.
Compatibility
The proposal uses existing protobuf Struct metadata and claims, so the v1 wire schema remains additive. Providers that omit these fields are unchanged. A future typed SDK RPC or field can supersede the convention while preserving these keys for compatibility.
Companion implementation
The reference consumer is the TechRelay LDAP plugin, which maps configured direct LDAP/AD administrator groups to the managed role claim. Nested-group resolution remains explicitly out of scope.
Adversarial review
The review identified and addressed these risks in the proposed implementation:
- a bare
silo_roleclaim could accidentally or silently alter accounts — an explicit boolean managed marker is now required; - role transitions were not auditable — structured transition logging was added;
- the auth provider queried
access_groupsdirectly — default-group lookup was moved toUserRepository; - demotion can replace prior custom authorization state — the default-reset behavior is now explicit and documented;
- LDAP diagnostics could expose internal directory details — the companion plugin now logs full errors but returns only stable operation stages.
Open design question: whether these compatibility keys should first be formalized in the plugin SDK as constants or replaced by typed fields/RPCs before merge.
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 changes
- Adversarial review: summarized above; each confirmed finding was either fixed in code or called out as an explicit design tradeoff
Activity
zippyy commentedon Aug 7, 2026
Implementation is now split into focused draft PRs:
auth_provider.v1staged configuration connection checksuser/adminrolesThe original combined draft #555 was closed as superseded. All active PRs remain drafts pending workflow execution, maintainer design feedback, and live LDAP/AD revalidation.
zippyy commentedon Aug 7, 2026
Closing this issue because it was opened prematurely before the TechRelay fork work had been reviewed and approved for upstream discussion. The design notes will remain in the fork and can be resubmitted intentionally later.