-
Notifications
You must be signed in to change notification settings - Fork 138
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
Issue768 extlib upgrade #774
Issue768 extlib upgrade #774
Conversation
a260e4d
to
1017990
Compare
All is largely looking good. Couple of comments could help to explain some stuff, and I think that there are a bunch of asserts in place that we dont need anymore as they are superseded by type guards on the parameters. Additionally there is a small syntax issue causing CI fails that ive put a comment on. Other than that, I've seen this working with keycloak, so I think this is good to start rolling out. Anything else will have to be found in whatever complex integrations surface the issues. |
extlib-simplesaml: backport mods to extlib. 3063297 Added support for IdP initiation flow catalyst#105 6ebf501 Fixed bug with Idp initiatied entityid ca34393 Edited 04/10/23 for peer review of pull catalyst#774
1017990
to
ddc33de
Compare
Thanks so much Peter; I've addressed all the issues you flagged if you wouldn't mind reviewing those, however whilst trying to run some unit tests yesterday I set the $CFG vars up for Redis and on trying to login using SAML today a bunch of new errors have been thrown that need fixing, so marking this PR as draft for now as it's not ready to be merged. |
New commit added to fix the redis_store class. I then also managed to get the redis unit tests to run locally and they all passed:
|
This is looking much better now, things are looking really clean. The CI has exposed something interesting, in that PHP 7.4 is now the minimum PHP version supported. All 7 versions are EOL, so I dont think its a major issue to set the minimum to 7.4, but we should update the README table to reflect that, and additionally update the CI grid so that PHP 7.2 and 7.3 are excluded (see https://github.com/catalyst/catalyst-moodle-workflows#with-options) I think thats the last thing before we can land this one. |
Great work Sarah!! +1 to merge after
|
Thanks both, hopefully that's good to go now! |
locallib.php
Outdated
@@ -57,16 +57,16 @@ function auth_saml2_get_sp_metadata($baseurl = '') { | |||
|
|||
$entityId = $source->getEntityId(); | |||
$spconfig = $source->getMetadata(); | |||
$store = SimpleSAML\Store::getInstance(); | |||
\SimpleSAML\Store\StoreFactory::getInstance('\\auth_saml2\\store'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit confused by this. It doesn't seem that $store
was ever used. So could we not just delete this line?
Fix for issue #768
Some re-factoring was required in order to make the plugin compatible with simplesamlphp 2.0 as per the docs: https://simplesamlphp.org/docs/2.0/simplesamlphp-upgrade-notes-2.0.html
In addition, a new BINDING_HTTP_ARTIFACT const seems to cause artifact to always take priority instead of redirect. Removal rather than re-order might be preferable here but I've left it in as there are settings in the plugin that refer to artifact bindings, although I'm not sure sure how to configure and test if the two are related. I couldn't see an obvious way to achieve this programmatically, unfortunately.
A number of unit tests are skipped when I run locally due to Redis and the Prophecy library not being available, again, not sure how to test.
Otherwise, @Peterburnett has kindly offered to peer review this. Happy to make any further changes as per your guidance.