There is 1 update, 1 comment.
 
 
OpenId Connect / cid:jira-generated-image-avatar-59cea5b0-b9da-4ee1-9c86-c2e2ab3c09dd OIDC-256 Open

Authenticator Callback - Cannot invoke "javax.servlet.http.HttpSession.getId()" because "httpSession" is null

 
View issue   ·   Add comment
 

1 update

 
cid:jira-generated-image-avatar-c07f0813-8aae-44cd-80ab-d669fa356482 Changes by Michael Schröder on 03/Sep/25 08:40
 
Description: Used OpenID Connect Authenticator with Keycloak as OpenId Connect Provider.

In the Login process, there is an Internal Server Error (Root Cause: "Cannot invoke "javax.servlet.http.HttpSession.getId()" because "httpSession" is null"), when the user is first redirected to the /oidc/authenticator/callback endpoint coming from Keycloak. See screenshot.

If the user opens the same URL ([https://xwiki/oidc/authenticator/callback?state=llfn0OSHhkmF...&session_state=1a8fcdc3...&iss=https%3A%2F%2Fsso%2Frealms%2Ftest&code=d1e5e24e..)|https://xwiki/oidc/authenticator/callback?state=llfn0OSHhkmF...&session_state=1a8fcdc3...&iss=https%3A%2F%2Fsso%2Frealms%2Ftest&code=d1e5e24e..),] manually via Browser again[,|https://xwiki/oidc/authenticator/callback?state=llfn0OSHhkmF...&session_state=1a8fcdc3...&iss=https%3A%2F%2Fsso%2Frealms%2Ftest&code=d1e5e24e..),] the login is successful.

Tested with xWiki 7.44 and 7.6.0
(installed via [https://github . com/xwiki-contrib/xwiki-helm]).
 
 
 

1 comment

 
cid:jira-generated-image-avatar-c07f0813-8aae-44cd-80ab-d669fa356482 Michael Schröder on 03/Sep/25 08:36
 
I think, it is an issue with xwiki (core and/or the helm chart ) [https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Configuration/#HTrusteddomains] configurations and not the extension. I set the Kecloak domain in the configuration, but it seems to be ignored.
The Browser log shows: "Cookie “JSESSIONID” with the “SameSite” attribute value “Lax” or “Strict” was omitted because of a cross-site redirect."

Setting the cookie configuration ([https://stackoverflow.com/questions/57505939/how-to-set-samesite-cookie-in-tomcats-cookie-processor]) to "lax" via the init script solved the problem.

Many thanks for your support.