I am running a forgerock environment with AM running on top of Tomcat container which resides on RHEL8. My users are coming from AD and they need to authenticate against AM while using Kerberos authentication.
To this purpose a tree node was set up in AM side specifiying the SPN, trusted realms, domains and so on. We are having an F5 load balancer and also an HTTPD reverse proxy as well as McAfee firewall in between.
When trying to access the URL from a user which is already logged in AD I get prompted for credentials. Browser is set correctly either Firefox or Edge. If I input the credentials I'm getting logged in.
Now when analyzing the debug logs I get the following when prompted for credentials:
DEBUG: nodeType product-KerberosNode
DEBUG: realm /dev/hsa
[CONTINUED] tree wdsso
[CONTINUED] outcome NEED_INPUT
[CONTINUED] sharedState { "realm": "/dev/hsa", "authLevel": 0, "userGotoOnFailParam": "/eam/" }
o.f.o.c.r.a.t.AuthTrees: Thread[https-jsse-nio-8443-exec-4]:
DEBUG: resolvedFailureUrl /eam/
DEBUG: resolvedSuccessUrl /eam/console
o.f.o.c.r.a.c.RestAuthHttpCallbackHandler: : Thread[https-jsse-nio-8443-exec-4]: TransactionId[xxxxxxxxxxxxxxxx]
DEBUG: Authorization Header not set in request.
o.f.o.c.r.a.h.AuthenticationServiceV1: Thread[https-jsse-nio-8443-exec-4]: TransactionId[xxxxxxxxxx]
DEBUG: AuthenticationService.authenticate() :: Exception from CallbackHandler
org.forgerock.openam.core.rest.authn.exceptions.RetryRestAuthResponseException: { "failure": true, "reason": "http-auth-failed" }
[CONTINUED] at org.forgerock.openam.core.rest.authn.callbackhandlers.RestAuthHttpCallbackHandler.updateCallbackFromRequest(RestAuthHttpCallbackHandler.java:60)
Tomcat policy logs:
org.forgerock.openam.core.rest.authn.http.AuthenticationServiceV2: Thread[https-jsse-nio-8443-exec-4]: TransactionId[xxxxxxxxxxx]
WARN: Authentication encountered an error: [Status: 401 Unauthorized]
org.forgerock.openam.core.rest.authn.exceptions.RetryRestAuthResponseException: { "failure": true, "reason": "http-auth-failed" }
at org.forgerock.openam.core.rest.authn.callbackhandlers.RestAuthHttpCallbackHandler.updateCallbackFromRequest(RestAuthHttpCallbackHandler.java:60)
We are getting a Kerberos ticket for the initialized sessions as I can see SPNEGO in logs happening, and the Kerberos ticket is consumed if I input the credentials.
I don't understand why I get the above errors. Anyone got a clue?
Update: Update: it was the SPN not configured correctly, we are using it with a DNS alias and the keytab file associated with it. Hope it will help other in the future.