Class AlternateScopeResolverHolder
java.lang.Object
io.confluent.security.authorizer.AlternateScopeResolverHolder
- All Implemented Interfaces:
AlternateScopeResolver
Mutable, thread-safe
AlternateScopeResolver container that is a no-op until reconfigured
(Null Object pattern). Created and bound by the authorizer-owning layer (ConfluentProvider)
into the metadata-server DI binder, so the downstream metadata service can @Inject this
single stable reference and install its policy (e.g. lkc -> pkc) later, once it knows it is running
in multi-tenant mode -- the policy is not available when the binder is populated at startup, and
DI bindings cannot be rebound. Until a delegate is installed, resolve(RequestContext, Action) returns
Optional.empty(), which the authorizer treats as "no fallback".-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional<io.confluent.security.authorizer.Scope> resolve(RequestContext ctx, Action deniedAction) voidset(AlternateScopeResolver delegate) Installs the fallback policy.
-
Constructor Details
-
AlternateScopeResolverHolder
public AlternateScopeResolverHolder()
-
-
Method Details
-
set
Installs the fallback policy. Install-once: the metadata service sets this at startup; it is not meant to be cleared or re-installed.resolve(RequestContext, Action)readsdelegatedirectly (no snapshot), which is safe under that contract -- there is no concurrent re-install to race with. -
resolve
public Optional<io.confluent.security.authorizer.Scope> resolve(RequestContext ctx, Action deniedAction) - Specified by:
resolvein interfaceAlternateScopeResolver
-