3.1 KiB
3.1 KiB
Authority Identity Provider Registry (Plugin Resolution)
Module
Authority
Status
IMPLEMENTED
Description
Runtime metadata/handle pattern for resolving identity providers through a registry. Handlers use IAuthorityIdentityProviderRegistry.AcquireAsync with metadata (AuthorityIdentityProviderMetadata) for capability checks, enabling deterministic and capability-gated provider resolution.
Implementation Details
- Modules:
src/Authority/StellaOps.Authority/StellaOps.Authority/,src/Authority/StellaOps.Authority/StellaOps.Authority.Plugins.Abstractions/ - Key Classes:
AuthorityIdentityProviderRegistry(src/Authority/StellaOps.Authority/StellaOps.Authority/AuthorityIdentityProviderRegistry.cs) - runtime registry that resolves identity providers by metadata capabilities; exposesAcquireAsyncfor deterministic provider selectionAuthorityIdentityProviderSelector(src/Authority/StellaOps.Authority/StellaOps.Authority/OpenIddict/AuthorityIdentityProviderSelector.cs) - selects the appropriate identity provider plugin during OpenIddict authentication flows based on request contextAuthorityPluginRegistry(src/Authority/StellaOps.Authority/StellaOps.Authority/AuthorityPluginRegistry.cs) - manages the lifecycle and registration of all authority pluginsIdentityProviderContracts(src/Authority/StellaOps.Authority/StellaOps.Authority.Plugins.Abstractions/IdentityProviderContracts.cs) - definesIAuthorityIdentityProviderPlugin,AuthorityIdentityProviderMetadata, and capability contractsAuthorityPluginRegistrationContext(src/Authority/StellaOps.Authority/StellaOps.Authority.Plugins.Abstractions/AuthorityPluginRegistrationContext.cs) - context object passed to plugins during registrationAuthorityPluginLoader(src/Authority/StellaOps.Authority/StellaOps.Authority/Plugins/AuthorityPluginLoader.cs) - loads plugin assemblies from disk and registers them with the plugin registryAuthorityPluginRegistrationSummary(src/Authority/StellaOps.Authority/StellaOps.Authority/Plugins/AuthorityPluginRegistrationSummary.cs) - captures registration outcome (loaded plugins, errors, capabilities)
- Interfaces:
IAuthorityIdentityProviderPlugin,IAuthorityPluginRegistrar(defined inIdentityProviderContracts.csandAuthorityPluginContracts.cs) - Source: Feature matrix scan
E2E Test Plan
- Register two identity provider plugins (Standard and LDAP) and verify
AuthorityIdentityProviderRegistryresolves each by capability metadata - Call
AcquireAsyncwith metadata requesting LDAP capabilities and verify the LDAP provider is returned - Call
AcquireAsyncwith metadata requesting capabilities not supported by any provider and verify a clear error is returned - Verify
AuthorityIdentityProviderSelectorroutes authentication to the correct provider based on the client'sidentity_providermetadata during an OAuth2 token request - Register a plugin at runtime and verify the registry reflects the new provider without restart
- Verify
AuthorityPluginRegistrationSummaryreports all registered providers with their capabilities