Class OidcBypassAugmentor
- All Implemented Interfaces:
io.quarkus.security.identity.SecurityIdentityAugmentor
@RolesAllowed(INTAKE_ROLE) on
the HTTP resources and the gRPC service) inert while OIDC is disabled, which is
the default. This is what lets OIDC ship "off by default": the annotations are
always present and compiled in, but enforcement only happens once an operator
flips intake.oidc.enabled=true.
Disabled (default): every request — including the anonymous identity
synthesized when no credential is presented — is granted INTAKE_ROLE
on a synthetic principal, so the role checks pass unconditionally. The real
gate stays exactly what it was before OIDC existed: the x-api-key
validated inside each handler (HTTP resolveConfig, gRPC
CrawlSessionRpcService) and the signed tracking token on status reads.
Behavior is byte-identical to the pre-OIDC service.
Enabled: this augmentor is a pass-through. The identity is whatever
the OIDC bearer mechanism established — a valid token carrying INTAKE_ROLE
(mapped from the configured claim) is required, an anonymous or under-privileged
caller is rejected by the role check. OIDC then layers on top of the existing
api-key/token gates rather than replacing them.
Augmentors are applied to the anonymous identity too, which is precisely why this works as an off-switch without touching any handler logic.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe single application role required by every secured intake endpoint. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<io.quarkus.security.identity.SecurityIdentity> augment(io.quarkus.security.identity.SecurityIdentity identity, io.quarkus.security.identity.AuthenticationRequestContext context) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkus.security.identity.SecurityIdentityAugmentor
augment, priority
-
Field Details
-
INTAKE_ROLE
The single application role required by every secured intake endpoint. Used both as the@RolesAllowedvalue and as the role granted by the bypass, so the two can never drift. When OIDC is enabled, map the external IdP claim/group onto this role viaquarkus.oidc.roles.role-claim-path.- See Also:
-
-
Constructor Details
-
OidcBypassAugmentor
public OidcBypassAugmentor()CDI.
-
-
Method Details
-
augment
public io.smallrye.mutiny.Uni<io.quarkus.security.identity.SecurityIdentity> augment(io.quarkus.security.identity.SecurityIdentity identity, io.quarkus.security.identity.AuthenticationRequestContext context) - Specified by:
augmentin interfaceio.quarkus.security.identity.SecurityIdentityAugmentor
-