-
Notifications
You must be signed in to change notification settings - Fork 440
Limit available DigestMethods and SigningMethods #421
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
Comments
For anyone with the same concern, I was successful in limiting the available algorithms:
Rules patch:
Result:
@rohe do you think this is the best way, or do you think patching pysaml is the answer? |
In my opinion, it is nice if pysaml takes its base list of supported algorithms from xmlsec1 - I have nothing against that. |
Hi, this is something that should be handled by the app (pysaml), not the system (xmlsec might be used by other apps on the same host). IMO, a configurable blacklist is the correct way to go with this, as one can blacklist old/insecure algs, but automatically be able to use newly supported ones by xmlsec. The opposite would mean that for every update of xmlsec supported algs, a new entry would need to be manually added to the whitelist. I don't think this is hard to implement. However there is bigger issue here as discussed in #278 - we shouldn't be using the xmlsec binary directly, but through bindings. Maybe this issue is good initiative to make that happen too. |
This would be a good choice |
Here some important RP related to this topic: |
Hello, are there any news on this task? |
Looking at my generated metadata, it seems support is advertised for many different SigningMethods.
It seems this list is generated by checking if each is supported by the
xmlsec1
binary.https://github.com/rohe/pysaml2/blob/master/src/saml2/algsupport.py#L36
My concern is that a few of those signing methods here are insecure; for instance MD5. It's conceivable an assertion could be forged by intercepting a signed assertion and replacing it's signature with a weaker, cracked one.
Assuming my reasoning isn't flawed, I think an option to whitelist algorithms would be a good fix here. I also assume it would be more involved than updating
SIGNING_METHODS
andDIGEST_METHODS
via config, as something needs to preventxmlsec1
from attempting to verify a signature by raising an exception beforehand.I believe this is a different issue to #396 which (as far as I can tel) affects outgoing assertions only. Is this correct?
I'm not sure if #382 has similar intentions.
Thanks for you time and pysaml2
I wonder if the best solution is to simply compile
xmlsec1
with a subset of algorithm support:-DXMLSEC_NO_MD5=1"
The text was updated successfully, but these errors were encountered: