Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading log message caused by SameSite cookie policy #47

Open
ghost opened this issue Mar 4, 2021 · 0 comments
Open

Misleading log message caused by SameSite cookie policy #47

ghost opened this issue Mar 4, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 4, 2021

Hi there.

I've been hunting down an OpenID issue in our company's product - setting the JSESSIONID cookie SameSite policy to 'strict' prevents the OpenID connect flow from working - the Authorization Endpoint responds, but the cookie is filtered from the response, and Tomcat doesn't find the existing session. That's pretty much as expected, but it causes the following code in BaseOpenIDConnectAuthenticator.performAuthentication to get a null for the session request, and so to provide a misleading log message and an 'instant' 408 Timeout response. Would it be worth adjusting the log message to eg. "could not retrieve session information: either user took so long to log on that the session expired, or Tomcat could not retrieve session details"? Could maybe help someone else having the same issue.

Cheers.

final Session session = request.getSessionInternal(false);                                                                                                                                                                                                                                                            
if (session == null) {                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                              
    // log using container log (why container?)                                                                                                                                                                                                                                                            
    this.log.debug("user took so long to log on the session expired");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants