dabs
dabs

Reputation: 747

single sign-on on multiple sites on a same domain

my organization wants to be able to create a number of sites, i.e. with different subdomains but on the same domain, i.e. foo.organization.com, bar.organization.com etc. Preferably the users would only have to log in to one site, and then be logged in to the other sites. There might be different server-side platforms used to implement these subdomain sites (some ASP.NET MVC, possibly Django, perhaps Ruby etc.), so this solution should preferably be cross-platform. One of these subdomains will be hosting the API for the main database, and preferably it should support both server-to-server authentication as well as using the API from a client side code.

Any suggestions what route we should go in this?

Regards, Daníel

Upvotes: 3

Views: 2869

Answers (2)

dearlbry
dearlbry

Reputation: 3211

What you're looking for is Single Sign On. There are several good solutions out there that would address the need you're describing. You can research SAML, CAS, OpenID and others.

I would personally recommend RubyCAS - it's an implementation of Jasig's CAS protocol in Ruby. I found it easier to set up, though both work just fine.

Any web-based application (and even non-web-based ones) can delegate their authentication to it. It works similarly to how you authenticate to google apps. If you don't have a session open on the particular site you're visiting, you get redirected to the login form on the CAS server and then sent back with a ticket if you're able to authenticate. The ticket is then verified on the back end to ensure it's valid.

There are plenty of CAS clients out there for a variety of platforms. I can personally vouch for rubycas client and phpCAS. Looks like there's some for Django, and for legacy apache-served apps, you can use mod_auth_cas, which is basically CASsified HTTP basic auth.

Upvotes: 1

rodeone2
rodeone2

Reputation: 109

Very Interesting ! I am wondering would that not be the same as what a wamp or lamp server does. I have 44 websites now running on one Lamp-server under the Localhost/each_sites_name/index.php name space. To do subs you would have to create one site_name and place others one level below it.

mainsite site1 site2 site3 site4 etc.

Upvotes: 0

Related Questions