-
Notifications
You must be signed in to change notification settings - Fork 431
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
Encryption method rsa-1.5 must be block-listed #738
Comments
Thanks @peppelinux for the report. I've noted all those things and this is what I'll be focusing on starting tomorrow. None of the algos are configurable at this point. Some of them exist as variables (pointers to defaults), but others are hardcoded (ie, the transport). We need to create new configuration options for all of them along with block/allow-lists. As you noted, we do have related issues and PRs about this. But, probably this will end up being bigger, as in a revamp on how we use and invoke xmlsec1 and consideration of moving away from it and towards something like python-xmlsec. |
The goal is to do this in steps (where each step is a release):
|
We could introduce configuration options as first step, then taking them OR default values. Regarding sha256 as default, please consider #597 in a way that
|
This PR cover part of this issue as a temporary remediation |
Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" must be blacklisted.
At this time it's instead the default one.
Code Version
master branch and previous releases
Expected Behavior
IdP should encrypt the Assertions in the Response using one of the available Encryption Algorithm in the Service Provider Metadata. For example, Shibboleth SP 3 exposes as default these:
Current Behavior
Digging in pysaml2 I found:
saml2.sigver
saml2.sigver.SecurityContext
)In sigver.py we have a default value here:
![immagine](https://user-images.githubusercontent.com/1297620/97111913-bf6d5c00-16e1-11eb-8012-24010118f99a.png)
In saml2./xml_template/template.xml something more hardcoded:
![immagine](https://user-images.githubusercontent.com/1297620/97111923-d318c280-16e1-11eb-853b-601e85e7ed4e.png)
Possible Solution
We should:
Steps to Reproduce
pySAML2 IdP encrypts or not the assertion depending by the arguments passed in the method
saml2.server.Server.create_authn_response
. We should be able to dynamically put encryption if SP have enc cert in its metadata (handled in uniAuth: https://github.com/UniversitaDellaCalabria/uniAuth/blob/7f514798f903ce212c680915f6dbdb22ffd100d8/uniauth/views.py#L472)The text was updated successfully, but these errors were encountered: