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

[Strengthen Encryption] PySAML2 Encrypted Assertions work with Shibboleth SP 3 #754

Closed
wants to merge 5 commits into from

Conversation

peppelinux
Copy link
Member

@peppelinux peppelinux commented Dec 13, 2020

This PR achieved #745

I have been forced for some time to disable assertion encryption due to an incompatibility issue between my pysaml2 based IdP and a Shibboleth SP, with this patch I got it to work.

It solved two weakness in pysaml2 encryption method, that ShibSP highlighted as follows

Fixed: "ERROR Shibboleth.SSO.SAML2 [6] [default]: failed to decrypt assertion: 
Unable to resolve any key decryption keys."

and also

WARN XMLTooling.Decrypter [7] [default]: XMLSecurity exception while decrypting key: 
XSECAlgorithmMapper::mapURIToHandler - URI http://www.w3.org/2001/04/xmlenc#rsa-1_5 
disallowed by whitelist/blacklist policy

Another warning about pysaml2 encryption with Shib SP is the follow:

  • saml2.server.create_authn_response have to disable pefim.

encrypt_assertion, encrypt_advice_attributes, encrypt_assertion_self_contained works great instead.

Using PEFIM we'll have, shib SP side, this message

WARN Shibboleth.AttributeResolver.Query [4] [default]: no SAML 2 AttributeAuthority role found in metadata

All Submissions:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you added an explanation of what problem you are trying to solve with this PR?
  • Have you added information on what your changes do and why you chose this as your solution?
  • Have you written new tests for your changes?
  • Does your submission pass tests?
  • This project follows PEP8 style guide. Have you run your code against the 'flake8' linter?

…ssertion: Unable to resolve any key decryption keys."
…n while decrypting key: XSECAlgorithmMapper::mapURIToHandler - URI http://www.w3.org/2001/04/xmlenc#rsa-1_5 disallowed by whitelist/blacklist policy"
a regexp generalization for wrapped and unwrapped PEM certs (BEGIN/END)
@peppelinux peppelinux changed the title PySAML2 Encrypted Assertion got working with Shibboleth SP 3 [Strengthen Encryption] PySAML2 Encrypted Assertion got working with Shibboleth SP 3 Dec 14, 2020
@peppelinux peppelinux changed the title [Strengthen Encryption] PySAML2 Encrypted Assertion got working with Shibboleth SP 3 [Strengthen Encryption] PySAML2 Encrypted Assertions work with Shibboleth SP 3 Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant