Pre-flight
What happened?
Runner registers ApiKeyAuthenticationMechanism and PermitAllAuthenticationMechanism as CDI alternatives. This causes them to replace Quarkus-provided authentication mechanisms, preventing OIDC bearer authentication from creating a valid SecurityIdentity.
After enabling OIDC authentication, namespace authorization exposed two additional issues:
-
OIDC namespace claims may be represented as JSON objects instead of regular Java strings. In this case, the comparison is failing.
For example, authorizedNamespaces.contains("team-a") is failing because it is comparing String "team-a" against JSON-P JsonString "team-a".
-
OIDC users without a namespace claim were incorrectly allowed to access all namespaces. They are now denied unless they have the administrator role.
This interpretation is more restrictive and distinguishes between security modes:
-
In NONE or unrestricted API-key configurations, no namespace information can still mean unrestricted access.
-
For an OIDC invoker, a missing or empty namespace claim means the user has not been assigned any namespace, so access is rejected.
-
An OIDC administrator can still access all namespaces without the claim.
Minimal reproducer
Run security tests on Quarkus-flow Openshift testsuite
Quarkus version
3.33.2
quarkus-flow version
1.0.0-SNAPSHOT
Java version
21
Runtime
None
Quarkus extensions in use
No response
Relevant logs/stack traces
Pre-flight
What happened?
Runner registers
ApiKeyAuthenticationMechanismandPermitAllAuthenticationMechanismas CDI alternatives. This causes them to replace Quarkus-provided authentication mechanisms, preventing OIDC bearer authentication from creating a valid SecurityIdentity.After enabling OIDC authentication, namespace authorization exposed two additional issues:
OIDC namespace claims may be represented as JSON objects instead of regular Java strings. In this case, the comparison is failing.
For example,
authorizedNamespaces.contains("team-a")is failing because it is comparingString "team-a"againstJSON-P JsonString "team-a".OIDC users without a namespace claim were incorrectly allowed to access all namespaces. They are now denied unless they have the administrator role.
This interpretation is more restrictive and distinguishes between security modes:
In
NONEor unrestricted API-key configurations, no namespace information can still mean unrestricted access.For an
OIDC invoker, a missing or empty namespace claim means the user has not been assigned any namespace, so access is rejected.An
OIDC administratorcan still access all namespaces without the claim.Minimal reproducer
Quarkus version
3.33.2
quarkus-flow version
1.0.0-SNAPSHOT
Java version
21
Runtime
None
Quarkus extensions in use
No response
Relevant logs/stack traces