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

KNOX-2155 - KnoxSSO should handle multiple cookies with the same name #227

Closed
wants to merge 1 commit into from

Conversation

risdenk
Copy link
Contributor

@risdenk risdenk commented Dec 20, 2019

This commit moves getting cookies by name to a
new utility class. It forces callers to look
through multiple cookies returned and handle
that case.

Copy link
Contributor Author

@risdenk risdenk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few initial comments. I need to add some simple tests for CookieUtils and there is one area I don't understand for backwards compat.

Comment on lines -41 to -52
/**
* Encapsulate the acquisition of the JWT token from HTTP cookies within the
* request.
*
* @param req servlet request to get the JWT token from
* @return serialized JWT token
*/
@Override
protected String getJWTFromCookie(HttpServletRequest req) {
return super.getJWTFromCookie(req);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this break backwards compat if someone upgrades? I don't quite understand how these adapter classes work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming no since there is no reason this method gets called anymore since its deleted everywhere?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should not break backwards compatibility, looks good.

This commit moves getting cookies by name to a
new utility class. It forces callers to look
through multiple cookies returned and handle
that case.

Signed-off-by: Kevin Risden <krisden@apache.org>
Copy link
Contributor

@moresandeep moresandeep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good !

@risdenk
Copy link
Contributor Author

risdenk commented Dec 20, 2019

Merged in 1b01961

@risdenk risdenk closed this Dec 20, 2019
@risdenk risdenk deleted the KNOX-2155 branch December 20, 2019 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants