Repository navigation
Conversation
250c64b to
220d9be
Compare
220d9be to
cf08ad5
Compare
|
@md5 @supernova32 Does this look ok? |
suprnova32
left a comment
There was a problem hiding this comment.
@Jamedjo the code looks good. Are you using this already in your apps?
Introduces a :store_request_uuid option for later comparison with InResponseTo By default it saves the request uuid in the session as "saml_transaction_id", but also accepts a proc that will then be called with the uuid for custom storage.
cf08ad5 to
8ac901c
Compare
|
Was this ever solved in a different way? I see no updates here, and I was trying to do SP-initiated only log-in by looking at the InResponseTo, but I don't think that is currently possible, is it? Is there any recommendation to avoid CSFR otherwise? How do you recommend to go about this? |
|
I just want to mention, if you are reading this 6+ years later, because you are using omniauth-saml and trying to do a SP flow by implementing a patch like this. If you use Use a separate cookie/session [signed and/or encrypted] to store the session id, possibly using For further checks, read this comment that explains some other considerations with storing authenticated ids and validating if you see them re-used. |
|
I'm also interested in this, given I'm adding this gem to an app and trying to follow recommended security practices. For example, it's mentioned in the OWASP guide: https://cheatsheetseries.owasp.org/cheatsheets/SAML_Security_Cheat_Sheet.html. |
|
We run SP-initiated only SAML login with this gem in production and had to fill the same gap with a subclass. Some notes for whoever picks this up. The proc needs the request, not only the UUID. As noted above, a SameSite=Lax session cookie does not come back on the cross-site POST to the ACS. So the ID has to go in its own short-lived cookie (SameSite=None; Secure). A proc that receives only The callback side needs a matching hook. Today an app must override It must fail closed. ruby-saml skips the check when Single use. A cookie is a copy and can be restored. We also record the ID on the server and delete it on the first callback, so a response cannot be used twice. |
What
Introduces a :store_request_uuid option for later comparison with InResponseTo
By default it saves the request uuid in the session as "saml_transaction_id",
but also accepts a proc that will then be called with the uuid for custom storage.
Why
Needed for #172, although we may also want to pass the value to ruby-saml with
matches_request_id:.