Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cross Domain Single Selective Sign In

Its not explicitly cross domain sessions that I am looking for, but its the easiest way to explain what it is I want.

I have a system which creates websites. The websites are hosted across lots of different servers.

Users can create their account and then they can create lots of websites. They could create

www.mysite.com subdomain.mysite.com and create lots of different sites.

Some times, sites will be COMPLETELY different from one another, however some times, the sites will in fact be so closely linked, that they should probably be considered the same site.

For example: (Different domain entirely) mysite-news.com mysite-blog.com or (Same domain, different subdomain) news.mysite.com blog.mysite.com

What I need is a way for users where they want, to create a federation of sort, which allows by clicking a check box, that they want to allow cross site logins. I cannot change configs unless its a permanent change and won't affect other sites, because 1000s of sites will be affected.

What do you think would be the best way to support this? OpenID, SSO?

I need something which is simple for sites to create a 'federation' and then allow their sign ins to be cross domain. If someone wants to join then they can.

like image 635
Layke Avatar asked Feb 14 '10 14:02

Layke


People also ask

What is cross-domain single sign on?

Security Access Manager Cross-Domain Single sign-on (CDSSO) provides a mechanism for transferring user credentials across multiple secure domains. CDSSO supports the goals of scalable network architecture by allowing the integration of multiple secure domains.

What is cross-domain authentication?

Cross-domain authentication is a common approach in identity management that authenticates users for sites that run on different domains. ReachFive handles this even for browsers that block third-party cookies. Cross-domain authentication is much more streamlined when using SSO.

How do I create a shared login service across multiple domains?

Solution: Use a private key saved on your server to sign a string that contains the following data items, current time-stamp, destination site (i.e "site2.com") the said GUID, this signature can be translated into saying "This is a proof that this link was created by the site at the said time for the user that has this ...


1 Answers

OpenID provides some nice features, but unfortunately, the cross-domain behavior you're looking for isn't something that you'll find in a standard OpenID implementation. One of the primary design principles of OpenID is that the provider not disclose any information about the user without their explicit consent*, and so any reputable OpenID provider will never tell mysite-news.com that you've already logged in to mysite-blog.com without asking for user approval.

[In technical terms, what's happening here is that mysite-news.com and mysite-blog.com are, conceptually, in the same security "realm", but OpenID identifies realms by URL patterns, and since they're on different domains they don't match.]

And that doesn't give you the user experience you want. There are some previous answers that do a fine job of outlining the kind of system you need here:

  • Cross-domain login [...]
  • Transparent user session over several sites [...]

In short, you'll be setting some sort of auth service on login.mysite.com to answer queries from mysite-news.com and mysite-blog.com. There are still a few ways you can take advantage of OpenID within this.

  1. The redirect-to-login-and-return-a-signed-token flow described there is exactly what OpenID does. So you could still use an OpenID implementation to do all that managing of signed tokens and replay protection, your client sites just get to skip the initial "discovery" part of OpenID and always redirect users to the login.mysite.com provider. And login.mysite.com gets to skip the step of "do I trust mysite-blog.com", because it's a special-purpose provider that can have its own whitelist of sites it always works with. OpenID would be purely behind-the-scenes here, users would never know that OpenID was somehow involved.

  2. login.mysite.com could, in turn, use OpenID to ask users to authenticate against their OpenID provider (whether it be Google or Yahoo or a specialist like myOpenID). From there it would look like a standard OpenID login and you'd get all the benefits, the disadvantage is that your login-redirect chain gets a little longer (and correspondingly slower). Them's the breaks.

Good luck. This is a question that comes up fairly frequently, and I've yet to find a really great reference implementation that I can point people to, so if you find something good do come back and let us know.

Lastly, obligatory link to Matasano Chargen's screenplay on the subject.

[*] the recent Google Buzz fiasco is a good reminder of what happens when you surprise users about who their information is being shared with.

like image 164
keturn Avatar answered Sep 23 '22 18:09

keturn