-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Issue #6205 - Fix issues with OpenID redirecting to wrong URI #6211
Issue #6205 - Fix issues with OpenID redirecting to wrong URI #6211
Conversation
Signed-off-by: Lachlan Roberts <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cherrypicked this over to jetty-11.0.x and it no longer tries to redirect to cometd internal urls.
However, I enabled the session-store-file and it is failing to persist:
java.io.NotSerializableException: org.eclipse.jetty.security.openid.OpenIdAuthenticator$UriRedirectInfo
jetty-openid/src/main/java/org/eclipse/jetty/security/openid/OpenIdAuthenticator.java
Outdated
Show resolved
Hide resolved
jetty-openid/src/main/java/org/eclipse/jetty/security/openid/OpenIdAuthenticator.java
Outdated
Show resolved
Hide resolved
jetty-openid/src/main/java/org/eclipse/jetty/security/openid/OpenIdAuthenticator.java
Outdated
Show resolved
Hide resolved
jetty-openid/src/main/java/org/eclipse/jetty/security/openid/OpenIdAuthenticator.java
Outdated
Show resolved
Hide resolved
jetty-openid/src/main/java/org/eclipse/jetty/security/openid/OpenIdAuthenticator.java
Outdated
Show resolved
Hide resolved
jetty-openid/src/main/java/org/eclipse/jetty/security/openid/OpenIdAuthenticator.java
Outdated
Show resolved
Hide resolved
jetty-openid/src/main/java/org/eclipse/jetty/security/openid/OpenIdAuthenticator.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make session attribute serializable and change name of method as indicated in comments.
Signed-off-by: Lachlan Roberts <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
jetty-openid/src/main/java/org/eclipse/jetty/security/openid/OpenIdAuthenticator.java
Outdated
Show resolved
Hide resolved
jetty-openid/src/main/java/org/eclipse/jetty/security/openid/OpenIdAuthenticator.java
Outdated
Show resolved
Hide resolved
jetty-openid/src/main/java/org/eclipse/jetty/security/openid/OpenIdAuthenticator.java
Show resolved
Hide resolved
Signed-off-by: Lachlan Roberts <[email protected]>
@lachlan-roberts I still see persist issues on Jetty 11.
|
resolved! |
Closes #6205
This change uses the CSRF token to index into a
Map
ofCSRF_TOKEN
toRedirectInfo
. By doing this we can get the URI and method of the original request which started the OpenID authentication process. This will allow it to find the correct URI and not get confused with other resources requested by the browser, or by some calls made by javascript running on the page.