-
Notifications
You must be signed in to change notification settings - Fork 10
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
Support for federated logins, or the ability to transfer IsLoggedIn #35
Comments
Today Identity Federation usually happens in one of two use cases: (stating the obvious; question at the end:)
So the question is, how does the Federated Identity Provider convey to the browser that the user has successfully logged in and agreed to share their identity with the relying party? Should the browser inspect the direct or (form post redirect) for success components of the given protocol? (this seems brittle). Should the IDP return an HTTP Response Header with some data (given that in some flows no UI is shown to the user so no JS calls can be made)? Other thoughts? We need to be able to handle the above use cases in the federated identity space. |
The specific informed consent of the user must have been obtained and recorded at the top-level site (relying party), otherwise the FIP cannot be rendered, or at least by default not use any browser storage (because ePrivacy). |
@michael-oneill I'm not sure follow... take the following common case in enterprise (but also true in consumer space as well). Acme uses IDPService as it's enterprise IDP. When the user goes to mail.acme.com their browser is immediately redirected to acme.idpservice.example so the user can authenticate. Today there is not explicit consent from the user that they want to login via acme.idpservice.example because that is the only IDP supported. The user gives consent at acme.idpservice.example by virtue of logging in and knowing they will be sent back to acme.example to access their corporate services. I don't think we want to be introducing user friction in this flow. Did you understand your points correctly? |
I thought I understood when I posted it, but I agree it is less than clear! I was conflating the technical issue of how to get the browser to recognise the user was logged in (using the FIP but on another site), with the meta point about isLoggedIn being a proxy for user consent. Your use-case requires a way to communicate to the browser that the user had logged in (on another top level site using the FIP). I think that the If it could be used by a nested context (registering the logged-in state for the FIP origin) then that would work, but how does the browser know this is a valid use of the API? It has some clarity when the user has explicitly visited the FIP site (though this can be obscured), but not when called by an arbitrary embedded subresource. This gets back to my initial point about user consent, in that there is has to be a way for the browser to recognise that consent has been validly given, and that maybe the only way to do that is if the browser facilitated the consent process itself, i.e. by presenting the information in its own UI and prompting the user. |
The browser managing the consent is a bit what safari does on iOS today when an app sends the user to a browser to login (OIDC/OAuth2). I still feel like a simple solution here would be for the relying party to declare what identity providers it supports via a .well-known meta-data file that the browser can read. When the relying part redirects to one of these declared identity providers, the browser could intercept the redirect and ask for explicit consent (first time only or a way to allow the user to remember the decision) before completing the redirect. From that point on, the browser could allow the existing redirect flows between those specific domains to complete. Since the user has given explicit consent, when the IDP setIsLoggedIn() it can be trusted. This gets the browser out of trying to guess if the user has given consent (by looking at browser mediated authentication methods) and instead collecting it explicitly. This should also stop any "ad bounce tracking" attempts to co-opt login protocols. |
That would work, but why do you need the redirect? If the browser is managing the consent prompt there is no need to access the FIP as a top-level page, the FIP could just be an embed. |
Mostly because that is the way both SAML and OpenID Connect work. That's not to say we couldn't manage the redirect in an iframe (I'm assuming that's what you meant by an "embed"). But both of those protocols leverage cookies to protect against CSRF attacks and cookies in iframes have problems these days. I'm looking for solutions that won't break the identity flows for most of the web :) |
Cookies are restricted in iframes for the same privacy reason, they may be restricted in top frames in future, hence the isLoggedIn proposal. |
That would be great! There are a number of standard identity flows that use hidden iframes to refresh tokens/credentials. There are other potential issues with using iframes (aka click-jacking) but those may be able to be mitigated via other means. |
Porting to this repo; @johnwilander wrote:
Back in the original explainer, we explored an idea on how to support federated logins (logging in to one website with an account from another website that is not part of the same organization, as opposed to single sign-on which is about the same organization). This is what was said there:
What this comes down to is the capability to set
IsLoggedIn
on DependingSite by taking the user through specific steps on IdentityProviderSite. This would allow IdentityProviderSite to "transfer the ability to setIsLoggedIn
" to DependingSite without there having to be e.g. a login form on SiteA.We should discuss this opportunity without being tied to the original proposal quoted above. The important part is to explore how to support such a transfer capability.
The text was updated successfully, but these errors were encountered: