jakubmatyszewski
06/04/2024, 8:28 AMKyle Hoondert
06/04/2024, 11:33 AMdruid.auth.authenticator.pac4j.skipOnFailure=truejakubmatyszewski
06/04/2024, 11:35 AMjakubmatyszewski
06/10/2024, 12:12 PMdruid.auth.authenticator.pac4j.skipOnFailure=true and it doesn't work neither. In router logs I see:
2024-06-10T10:58:44,024 ERROR [qtp1022680775-84] org.pac4j.oidc.credentials.extractor.OidcExtractor - Bad authentication response, error=access_denied
And user reports that the same error screen (401) is popping up after logging with Okta, a dead end. This user has access to Okta, but is not assigned to the (druid) app, which results in 401.
Relevant piece of common config:
druid.auth.authenticatorChain=["MyBasicMetadataAuthenticator", "pac4j", "anonymous"]
druid.auth.authenticator.pac4j.type=pac4j
druid.auth.authenticator.pac4j.skipOnFailure=true
druid.auth.pac4j.cookiePassphrase=testpassphrase
druid.auth.pac4j.oidc.clientID={{ .auth.okta.clientID }}
druid.auth.pac4j.oidc.clientSecret={ "type": "environment", "variable": "OIDC_SECRET" }
druid.auth.pac4j.oidc.discoveryURI={{ .auth.okta.discoveryURI }}
druid.auth.pac4j.oidc.scope={{ .auth.okta.oidcScope }}
druid.auth.authorizers=["opaAuthorizer"]
druid.auth.authorizer.opaAuthorizer.type=opa
druid.auth.authorizer.opaAuthorizer.opaUri={{ .auth.okta.opaUri}}
druid.auth.authenticator.pac4j.authorizerName=opaAuthorizer
druid.auth.authenticator.MyBasicMetadataAuthenticator.authorizerName=opaAuthorizer
druid.auth.authenticator.anonymous.type=anonymous
druid.auth.authenticator.anonymous.identity=defaultUser
druid.auth.authenticator.anonymous.authorizerName=opaAuthorizerjakubmatyszewski
06/10/2024, 2:19 PMjakubmatyszewski
06/10/2024, 2:54 PMskipOnFailure is not even implemented in the pac4j extension. 😉
I'd expect it to be somewhere here https://github.com/apache/druid/blob/8e11adfc6f69e6e21d151f6881351465d6a81139/exte[…]/src/main/java/org/apache/druid/security/pac4j/Pac4jFilter.java like in case of the basic authenticator: https://github.com/apache/druid/blob/8e11adfc6f69e6e21d151f6881351465d6a81139/exte[…]druid/security/basic/authentication/BasicHTTPAuthenticator.javaKyle Hoondert
06/10/2024, 3:15 PM