Why does the KEYCLOAK_SESSION cookie in Keycloak does not have HttpOnly flag set in first place as against other cookies?
Why does the KEYCLOAK_SESSION cookie in Keycloak does not have HttpOnly flag set in first place as against other cookies?
As @besverino mentions in his comment, KeyCloak doesn't allow set KEYCLOAK_SESSION HttpOnly flag because KeyCloak needs to access the cookie from iFrame. Comment on this part of KeyCloak code is:
THIS SHOULD NOT BE A HTTPONLY COOKIE! It is used for OpenID Connect Iframe Session support!
References: