单点登录跨多个域 [英] Single Sign On across multiple domains

查看:190
本文介绍了单点登录跨多个域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的公司已成立了托管在各个领域的一个网站多个​​域。此时,每个域具有其自己的认证,其经由饼干完成。

Our company has multiple domains set up with one website hosted on each of the domains. At this time, each domain has its own authentication which is done via cookies.

当有人登录到一个域需要从其他任何访问,用户需要再次登录使用其他网站不同的凭据,位于其他域。

When someone logged on to one domain needs to access anything from the other, the user needs to log in again using different credentials on the other website, located on the other domain.

我想对单点登录上移动(SSO),使这种麻烦可以被消除。我想AP preciate关于如何可以实现任何想法,因为我没有这方面的经验。

I was thinking of moving towards single sign on (SSO), so that this hassle can be eliminated. I would appreciate any ideas on how this could be achieved, as I do not have any experience in this regard.

感谢。

编辑:
该网站是(在公司内部内部使用)互联网网站(外部)和内网的组合。

The websites are mix of internet (external) and intranet (internal-used within the company) sites.

推荐答案

的SSO解决方案,我已经在这里实现原理如下:

The SSO solution that I've implemented here works as follows:


  1. 有一个主域,login.mydomain.com与管理的登录脚本master_login.php。

  2. 每个客户端域有脚本client_login.php

  3. 所有领域有一个共同的用户会话的数据库。

  4. 当客户端域需要先登录用户,它重定向到主域(login.mydomain.com/master_login.php)。如果用户没有登录到主从用户(即显示登录页面)请求验证。用户通过验证后,它会创建一个数据库会话。如果用户已经通过身份验证,它看起来他们的会话ID在数据库中。

  5. 主域返回传递会话ID的客户端域(client.mydomain.com/client_login.php)。

  6. 客户端域中创建一个cookie存储从主机的会话ID。客户端可以找到使用会话ID查询共享数据库登录的用户。

注:


  • 会话ID是从RFC 4122与算法生成一个唯一的全局标识符

  • 的master_login.php只会重定向到域在其白名单

  • 主机和客户端可以在不同的顶级域名。例如。 client1.abc.com,client2.xyz.com,login.mydomain.com

这篇关于单点登录跨多个域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆