-
Notifications
You must be signed in to change notification settings - Fork 136
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
Add support for AES-GCM #179
Add support for AES-GCM #179
Comments
@Skywalker-11 have you found any alternatives to simplesamlphp or a way to include 3rd party support of aes-gcm for simplesamlphp users? |
I am not using simplesaml myself but noticed the error when interacting with 3rd party SPs |
AES-GCM is the default in Shibboleth 4.0, so missing support breaks compatibility of SimpleSAMLphp with a growing number of IdPs. |
@melanger The issue here is not SimpleSAMLphp, but two dependency-levels down in the xmlseclibs library.. So, unless you can open up a can of crypto-savvy PHP developers, this is really out of our control. |
@tvdijen There is an open issue in the library as well, robrichards/xmlseclibs#134, but it seems that the support was actually added in 3.1 https://github.com/robrichards/xmlseclibs/releases/tag/3.1.0 |
Requires PHP 7.1+, but SimpleSAML already requires 7.2+ on master |
I might be mistaken here, but I would say this is just a matter of updating the xmlseclibs dependency, since 3.1.0 implements support for AES-GCM. |
I see Shibboleth 4.0 IdPs using |
If you're using SimpleSAMLphp:
If you're using this library directly:
|
The workaround in SSP 1.18.7 to install manually xmlseclibs 3.1.0 over the existent 3.0.8 didn't work for me, the error "Failed to decrypt XML element" still occur. How to check the xmlseclibs installed version? |
You can check the installed version in the composer.lock file |
The PHP version is right:
but the xmlseclibs is not:
Note. With the newer SSP 1.18.8 is no change :-( In conclusion the workaround for 1.18.x to install xmlseclibs with composer manually is not working (maybe some steps are missing, i.e. to edit composer.lock?). I will rather wait for 1.19... |
1.18.8 has the right one; So it must be something else... |
That one's not relevant.. The one I tagged is the one actually installed & packaged... |
I've retested 1.18.8 today and AES-GCM is still not working :-( |
That doesn't surprise me, because nothing has changed in SimpleSAMLphp or the saml2 library.. |
This comment has been minimized.
This comment has been minimized.
OK, I got it working now.. I got off on the wrong foot last night a bit.. You need: robrichards/xmlseclibs#213 and 1f0c32f I don't think it makes much sense to tag a new saml2-release until xmlseclibs is fixed, so I'm keeping this open and in the meanwhile I can try and work on making the algorithm configurable in SSP. I've also asked Rob for a bugfix release on xmlsec and that's about as much as I can for you do right now |
Retesting with 1.19-rc1 but still not working.
|
Maybe because 1.19-rc1 is ten days old and I got it working only 9 days ago? |
Seems that robrichards/xmlseclibs 3.1.1 includes the needed change: And when updating with Composer: SimpleSAMLphp also seems to have this change https://github.com/simplesamlphp/simplesamlphp/blob/e4246a2a0286e553f7544e20f0fd246aeea3d5df/modules/saml/lib/Message.php#L312 in https://github.com/simplesamlphp/simplesamlphp/blob/v1.18.8/modules/saml/lib/Message.php#L310. |
There's one PR for that which will land in 1.19; simplesamlphp/simplesamlphp#1377 |
I just got word from my university contact handling the Shibboleth 4: Changing encryption from GCM (default in Shibboleth 4) to CBC made it work with both:
|
I can confirm that SimpleSAMLphp 1.18.8 with updated Looking forward to see AES-GCM support in 1.19 out of the box. |
Thanks @JanOppolzer ! There's some discussion on the changes to SSP 1.19, but the next RC should ease all of your problems. |
This is required to support AES-GCM. See also simplesamlphp/saml2#179 (comment)
Shib4 IdP now uses AES-GCM keys by default, adding two patches following simplesamlphp/saml2#179 (comment) With 1.19 this should no longer be necessary.
simplsamlphp currently does not support AES in GCM mode.
If an IDP uses AES-GCM for encryption of the ssertions eg:
this creates an error in form of the following message on a SP running simplesamlphp:
Depending on change in library xmlseclibs (robrichards/xmlseclibs#134)
The text was updated successfully, but these errors were encountered: