-
Notifications
You must be signed in to change notification settings - Fork 831
Identity Zone Selection via X-Zid Header #3427
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
base: develop
Are you sure you want to change the base?
Conversation
@adrianhoelzl-sap How does this impact cookies and security? What If I do a request like this
and this sets up my cookies (including authentication stored in the session)
Do I just gain access across zones? |
This scenario should be addressed by this check here: uaa/server/src/main/java/org/cloudfoundry/identity/uaa/authentication/SessionResetFilter.java Line 60 in df50723
The zone resolved through the subdomain or |
The But all the filters before that, that may contain logic and send redirects prior to the completion of the filter chain are still vulnerable to this. A lot of the SAML/OAuth/OIDC happens in just filters, and not in MVC endpoints, and those filters would be working under incorrect assumptions. Given the risk, is this header really needed? If the HTTP client can set a header, it can set the "Host" header, and if there is a browser involved, cookie handling will be accurate. |
c9a0330
to
b69180d
Compare
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.
My hope was that we can consolidate the amount of filter (per each request) and optimize but can we integration this logic into one of other IdentityZoneXYZ filters ? ... maybe rename one and do more ?
@@ -15,6 +15,8 @@ public class RandomValueStringGenerator { | |||
|
|||
private static final char[] DEFAULT_CODEC = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_" | |||
.toCharArray(); | |||
private static final char[] CODEC_LETTERS_ONLY = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" |
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.
pls use
Line 7 in b449b5b
"1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" |
@@ -90,4 +92,7 @@ public void setLength(int length) { | |||
this.length = length; | |||
} | |||
|
|||
public static RandomValueStringGenerator lettersOnly(final int length) { |
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.
see above
No description provided.