feat(access, pluginhost): add support for exclusive frontend auth providers

- Introduced `FrontendAuthProviderExclusive` capability to restrict authentication to a single selected provider.
- Added `SetExclusiveProvider` and `ClearExclusiveProvider` methods for managing exclusive providers in the access registry.
- Updated `pluginhost` to prioritize and enforce exclusive providers based on plugin priority and ID.
- Enhanced RPC capabilities schema to include `FrontendAuthProviderExclusive` field.
- Added example plugin and tests for exclusive frontend auth behavior.
This commit is contained in:
Luis Pater
2026-06-09 10:56:58 +08:00
parent 583053509d
commit fabf06154f
13 changed files with 611 additions and 46 deletions

View File

@@ -74,6 +74,8 @@ type Capabilities struct {
AuthProvider AuthProvider
// FrontendAuthProvider authenticates frontend requests before proxy handling.
FrontendAuthProvider FrontendAuthProvider
// FrontendAuthProviderExclusive makes this frontend auth provider the only active request auth provider when selected.
FrontendAuthProviderExclusive bool
// Executor sends requests to an upstream provider or local backend.
Executor ProviderExecutor
// ExecutorModelScope declares whether Executor serves static models, OAuth auth models, or both.