-
Notifications
You must be signed in to change notification settings - Fork 76
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
feat(PassthroughParameters): Make it possible to pass through parameters to the SAML library #901
Conversation
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.
Thanks for this addition!
I left a change request there. Also wonder whether there is anything that shibboleth can be tested against, so we have it covered by integration tests. It's simple enough though, so I am not worried to much about this – if problems arise then probably through misconfiguration or unexpected values.
|
de7bbe9
to
fe8abd3
Compare
I am not sure how the test framwork works, or how to run it locally, but I did try to add an integration test... |
…ers to the SAML library OneLogin/Auth->login can accept an array of parameters to be passed through to the IdP. This patch makes it possible to specify an array of parameters to be passed through to the IdP in config.php. For example, you can set it like this, and if we get such a parameter in the request to user_saml/saml/login we will pass it on to the IdP. 'user_saml.passthrough_parameters' => ['idp_hint'], Signed-off-by: Micke Nordin <[email protected]>
Signed-off-by: Micke Nordin <[email protected]>
…hibboleth.feature file Signed-off-by: Micke Nordin <[email protected]>
I was able to run the integration tests localy, and the scenario that I added passes (as do the others):
|
Signed-off-by: Micke Nordin <[email protected]>
Fixed the code formatting issue, sorry about that |
Signed-off-by: Micke Nordin <[email protected]>
One more thing, that i found when having a second look in the target url validation. The redirection checks uses parseUrl, but does not check the query at the moment: user_saml/tests/integration/features/bootstrap/FeatureContext.php Lines 204 to 208 in 4ea5899
Adding 'query' would be necessary. And i would think it would break elsewhere, for the SAML parameters are usually added in some places. Perhaps a second, extended method could check the specified parameters are actually in the redirect URL. |
Signed-off-by: Micke Nordin <[email protected]>
I seem to have problems setting the config value required in the test. I have this:
But when I test for it I get:
Any help here would be apprechiated |
I can reproduce, now trying to understand it 😅 |
I see this now that I try a very reduced case with just setting that:
Edit: yeah, I changed it to idp-passthroughParameters now, same issue when using the correct name though |
|
Ok, I have a fix I think. Give me a sec :) |
I am curious. I saw same stuff like yours and am doubting either the Symfony Console or something in the docker shell argument passing. For locally and manually i could not reproduce this, only with the integration tests. |
Signed-off-by: Micke Nordin <[email protected]>
It is working now, the test passes AND actually does something :) |
Signed-off-by: Micke Nordin <[email protected]>
8.4 fails, due to a deprecation in php-saml. Let's ignore for now, also out of scope here. |
In nextcloud#901 it seems I got the name of the config key wrong in some places. Signed-off-by: Micke Nordin <[email protected]>
In nextcloud#901 it seems I got the name of the config key wrong in some places. Signed-off-by: Micke Nordin <[email protected]>
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
OneLogin/Auth->login can accept an array of parameters to be passed through to the IdP.
This patch set makes it possible to specify an array of parameters to be passed through to the IdP, in the admin settings of the app