Hi Philip,
On 6 Apr 2017, at 08:50 AM, Philip Cummins <
pcum...@gmail.com> wrote:
>>> > If the user accesses the cross-regional SP without being logged in then they believe it would be reasonable to have the user pick which regional IdP to authenticate from, so they were hoping the streamline the process above when a user is already logged in at least once.
>>
>> If you really want to go that way, you could send passive authentication requests to every IdP to see if the user is already logged into any of them. If an IdP replies with an assertion (meaning the user was indeed authenticated), then you will be logged in automatically and you don’t even need to go to the IdP. However, consider the pitfalls:
>>
>> - From your sentence, I get that a user could be logged into several IdPs at the same time. What happens in that case? What IdP would you use? Shouldn’t the user decide which IdP to use?
>> - What if the user is logged into one IdP, but wants to use another one?
>
> We were considering in the few instances where someone was logged into multiple IdP's (just our own staff) the discovery service would be displayed which would make sense.
Bear in mind that it’s not possible to be authenticated by several IdPs at the same time. The authentication status is tied to the authentication source (a SAML service provider), and once you authenticate with an IdP, you are authenticated and cannot authenticate again with another IdP without logging out first.
You could on the other hand add as many SAML authentication sources as IdPs you have, so that simultaneous authentication at different IdPs is possible. But in that case, it’s up to you to display a discovery and choose between any of the auth sources.
>>> > In general, most of our users would log in via the regional IdP's initially so it was to hopefully streamline the process when the user was logged into a single IdP only.
>>
>> In that case, I don’t think it’s a big issue that users reaching the “cross-regional SP” need to choose which IdP they want to use to authenticate.
>
> Yes I agreed with that view however the other non-technical staff disagreed and felt the choice of IdP between two company controlled websites should be more streamlined. From their point of view (which was tempered from the the previous experience of only using a single IdP) users should be able to navigate from our primary application site to our support site without needing to choose which IdP to use again.
One alternative that you could explore is using a proxy. Then, all your SPs would just ask for authentication to the proxy, and the proxy would be the one allowing users to choose the IdP. However, once the user is authenticated, it won’t be possible to select another IdP.
Yes, but that’s only supported when creating “login links”, not in the API. If you want, you could use the getLoginLink() method from SimpleSAML_Auth_Simple to get such URL with a custom return URL, and add manually the “saml:idp” parameter (as I said, it’s not supported throughout the API). The URL you provide as a parameter must be then a script that you control, that checks if the user is authenticated, gets the attributes, and does whatever you need afterwards.
In any case, this allows you to bypass the discovery, yes, but you still won’t know if the user is authenticated or not.
>> My advice is to avoid twisting the protocols and the software to fit them to a corner case. If IdP discovery works like this, it’s in general for a reason, and what might be a good idea from the user experience point of view, could end up being a nightmare for other corner cases.
>
> I'm trying to avoid this where possible however always good to get some extra feedback on this (as you can tell, the non-technical staff expectations are not always in sync with how things work).
I know pretty well :-)
In any case, good luck with it! Hope you find a solution or manage to convince your colleagues.