-
Notifications
You must be signed in to change notification settings - Fork 15
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
Implement SAML2 assertion access control #113
Comments
in addition to preparing a ready-to-user
Otherwise we couldn't use specific values if On the other hand, I don't see a reason why we shouldn't always generate the jwt claims. Then, |
|
we still need the we dropped the idea of |
I currently use github.com/russellhaering/gosaml2. It requires to set a saml2 "MySAML" {
idp_metadata_file = "idp-metadata.xml"
sp_entity_id = "my-sp"
sp_acs_url = "https://my-sp/saml/acs"
array_attributes = ["memberOf"]
} |
Just for the record: github.com/russellhaering/gosaml2 has some issues, that are currently not relevant for us:
|
The lib provides a function The created XML looks like (white-space added):
with
The values for |
The value for ***@***.*** is hard-coded in the lib.
The post binding is actually the only sane choice for the ACS. Even if the
assertion is short enough to fit in a URL, its value will probably contain
sensitive information (user id). That should not appear in any (default)
log files.
I think the binding pattern SSO/Redir and ACS/Post is so common that we
could even use it as given. We could therefore drop the config properties
for the two bindings. That will make the saml{} block even simpler.
|
An access control to be used in a SAML2 assertion consumer service endpoint.
https://cheatsheetseries.owasp.org/cheatsheets/SAML_Security_Cheat_Sheet.html mentions some security issues and how to address them.
https://tools.ietf.org/html/rfc7522#section-3 (which describes a similar case) has some requirements for assertion format and processing requirements.
The following is a mix of requirements:
RelayState
param (=RelayState
from AuthN request query param)samlp:Response/ds:Signature
))samlp:Response/@Destination
(= ACS endpoint URL of SP)samlp:Response/@InResponseTo
(=samlp:AuthnRequest/@ID
of the AuthN request)samlp:Response/saml:Issuer
(=entity_id
of IdP, from IdP metadata file)samlp:Response/samlp:Status/samlp:StatusCode/@Value
saml:Assertion/ds:Signature
))saml:Assertion/saml:Issuer
(=entity_id
of IdP, from IdP metadata file)saml:Assertion/saml:Conditions/saml:AudienceRestriction/saml:Audience
(=entity_id
of SP, from Couper config)saml:Assertion/saml:Subject/saml:Subject
saml:Assertion/saml:Conditions/@NotOnOrAfter
orsaml:Assertion/saml:Subject/saml:SubjectConfirmation/saml:SubjectConfirmationData/@NotOnOrAfter
saml:Assertion/saml:Conditions/@NotOnOrAfter
: if time passed, reject Assertionsaml:Assertion/saml:Subject/saml:SubjectConfirmation/saml:SubjectConfirmationData/@NotOnOrAfter
: if time passed, reject SubjectConfirmationsaml:Assertion/saml:Subject/saml:SubjectConfirmation/@Method
(= 'urn:oasis:names:tc:SAML:2.0:cm:bearer')saml:Assertion/saml:Subject/saml:SubjectConfirmation/saml:SubjectConfirmationData/@Recipient
(= ACS endpoint URL of SP)saml:Assertion/saml:Subject/saml:SubjectConfirmation/saml:SubjectConfirmationData/@InResponseTo
(=samlp:AuthnRequest/@ID
of the AuthN request)saml:Assertion/saml:AuthnStatement/saml:AuthnContext/saml:AuthnContextClassRef
The text was updated successfully, but these errors were encountered: