Currently it supports only one authentication source(one IDP) and one set of attributes to sync.
Simplesaml supports multiple IDP'S for a given SP. currently i could not find a way to configure multiple authentication sources along with set of attributes for sync.
Do you have any plans to have this feature?
Thanks,
Anil
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | multiple_authentication_sources-2869107-19.patch | 7.95 KB | kkohlbrenner |
| #20 | simplesamlphp_auth-2869107-interdiff-18.txt | 1.36 KB | kkohlbrenner |
Comments
Comment #2
mamidi.anil@gmail.com commentedComment #3
snufkin commentedOverall I'm not against it, but it would require a substantial undertaking, one that I don't think would happen without someone contributing to the project. I'll change the target version to the dev for clarity.
Comment #4
aprohl5 commentedI recently witnessed the use of a discovery service to accomplish this
This was done by adding the below code to their authsources.php file.
// The URL to the discovery service.
// Can be NULL/unset, in which case a builtin discovery service will be used.
'discoURL' => 'discovery_service_url',
While this method would almost certainly require all the incoming attributes to be named the same, I would imagine you could change the names before sending them to Drupal to ensure they matched.
Comment #5
tarasichThe only problem in supporting multiple IDPs is that each source can have its own attributes name.
In my case it's Google and Facebook. Here is a patch which allow to set multiple comma-separated attributes, so on each user login, system will check for all possible attribute names before throw and exception.
Settings form will look like this:

Comment #6
tarasichComment #7
andypostThis is nice way to solve that in backward-compatible way
IMO that should be translatable as well
That looks backward compatible!
nitpick, could be removed on commit
Comment #8
sbbutkcin commentedI have the two idp's working and am using the discovery service to let the users select the idp they wish to authenticate with.
Anybody know how to link to each IDP individually for login? I don't want to send the users to the discovery service and going to /saml_login only works for the auth source you declare in the basic settings configuration page of the module.
I would like to be able to make a button on a certain page for each auth source I have configured.
Comment #9
yi_jiang commentedit works for me! I have ADFS and OKTA both enabled on a single website. Thanks.
Comment #10
berdirSetting to needs work to address the review in #7, wondering if we can test this somehow.
Comment #11
tarasichHello!
Attaching patch with fix for review in #7
Unfortunately don't have time for tests right now. Maybe make sense to create follow up, I'll try to jump in on one of next contrib events.
Comment #12
cbanman commented#6 might need a re-roll, the tests don't seem to like it.
Comment #13
cbanman commentedThe method suggested in the patches seems to work but there are a couple of issues with it:
nameattribute but A associates the attribute with the user's actual name vs B which associates it with the user's username. With this solution, ifnameis set as the first username attribute it will work for B but then the incorrect one would be used on A.I think if anything there should be a separate configuration page for each IdP, including the option to set a login link for each.
Comment #14
cbanman commentedComment #15
rgristroph commentedI had some issues applying the patch in #11, patch was giving the mysterious error:
I hand-applied it and re-rolled, and it seemed to work, although I am not sure what the difference is -- something in line ending format ?
In any case, I think this patch looks good.
In my opinion, it's better than what we have now, we should probably merge it and then make a separate issue to address @cbanman 's comments in #13 -- how can we send the user to the correct idp ( maybe each one has it's own login url ?) and how to avoid attribute clashing ( I think we'll have to have a separate config for each idp, which is a completely different approach from this patch).
Comment #16
dgaspara commentedThanks! Patch #15 works for me.
However, only one sp is allowed on the "Authentication source for this SP" configuration.
So I'm adding a suggestion on how to provide the possibility to have multiple sp working at the same time, by adding the sp as an argument in the url "/saml_login/{sp}".
Comment #17
dgaspara commentedComment #18
kkohlbrenner commentedWe are currently running the 4.x version of SimpleSAMLphp_auth module because we are on Drupal 10 and the 4.x version currently only supports D10.
Despite 8.x-3.x-dev being targeted, patches #15 and #16 apply successfully the 4.x branch. Like @dgaspara, we need to support multiple auth sources / service providers so #16 provided functionality we wanted. However, after applying the patch in #16, we ran into issues, so I rerolled the patch and also included an interdiff.
I took a slightly different approach from #16 regarding implementation, so open to feedback!
I'm also updating the target branch :)
Comment #20
kkohlbrenner commentedUpdating the patch, including an interdiff between previous patch. In the previous patch, SimplesamlphpAuthManager::externalAuthenticate() was not updated to account for the dynamic $sp when multiple authsources are configured. This new patch solves for this and externalAuthenticate(), when called in the Controller with a dynamic $sp value, will send the argument to the externalAuthenticate() method which executes ::getSimpleSamlInstance() with the $sp argument.
Notably, the patch does not include tests, because, well, time constraints.
Comment #21
fishfree commented@kkohlbrenner After patching, I still found nowhere to configure multiple authsources in Drupal.