The idea of implementing SSO across the primary domain

Source: Internet
Author: User

The same primary domain (that is, all the subdomains under the same level of domain name) includes multiple server sharing session data implementation methods Many, here is not much to say!

The key issue now is the implementation of SSO for different primary domains! This problem is more complex, can be achieved, but a lot of the use of a special software system to support ...

In fact, the session also needs cookies to support, the cookie does not support across the primary domain determines the session can not cross the primary domain! So, how do you implement a cross primary domain???

This is another simple way that I suddenly think of when I implement SSO in my project for everyone to discuss

A, false with A.com, B.Com, c.com these three main domains, of which a.com is mainly responsible for verifying the pass (faster), B.Com and c.com are specific applications

II, B.Com and c.com and a.com some of their own applications need to a.com to obtain trust (landing)

Assign a subdomain passport to each primary domain. B.Com, Passport. c.com, their IP points to the host address where the a.com resides.

Four, after the user login through the verification, set up a jump rule, take session_id as a parameter, jump Passport. B.Com, Passport. C.com (in fact, these subdomains can be established to a host of the default site, through the array and some parameters can be achieved one by one fast jump), jump directly with the header of PHP ("Location:passport." B.com/?sid=xxxxxxxx&i=0 "); , at the same time, overwrite the current primary domain session_id for passing over the session_id on it.

Here are some considerations:

1, will each passport. X.com allocated to the same speed of the host, conducive to rapid jump, and the user can not see the complex jump process ...

2, the same host jump can avoid the intermediate jump link error causes jump failure.

I've only tested it on a native analog multi-domain, and it works fine; there are no specific tests on the Internet Network , please have a chance to try and offer a better SSO solution ...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.