Java技术升华@IT·互联网码路拾遗

单点登陆系统对比

2017-05-28  本文已影响367人  橄榄树下的托马斯

作者:刘宾, thomas_liub@hotmail.com
请尊重作者著作权,转载请注明出处,谢谢!


SSO笔记

典型的SSO机制

Kerberos

OAuth2

POST /token HTTP/1.1
Host: server.example.com
Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW
Content-Type: application/x-www-form-urlencoded
grant_type=refresh_token&refresh_token=tGzv3JOkF0XG5Qx2TlKWIA

OpenID

OpenID connect

webSSO

CAS

CAS
  1. 浏览器访问应用A(CAS client)
  2. CAS client发现无ST,无session,重定向到CAS server
  3. 用户完成登陆认证
    1. 用户登陆
    2. CAS server生成TGT对象,加入cookie
    3. 分配ST,加入cookie
  4. 重定向回应用(CAS client),带TGC, ST
  5. 应用CAS client验证(ST,TGC)
  6. CAS server验证ST,返回username如成功
  7. CAS client建立用户session

CAS Vs OpenIDConnect

  1. CAS不支持OAuth2. Fackbook, Google, Yahoo采用OAuth2做认证, 而且目前85%认证系统采用OAuth2
  2. 大部分采用OAuth2的系统将来会采用OpenIDConnect
  3. CAS缺失很多功能,不支持feature
    1. 动态client注册,发现
    2. 用户claim, client claim
  4. Even SAML support is weak
  5. CAS实现多步骤认证困难,大部分是基于用户名/口令方式

Like the little ant, OpenID Connect has high hopes. Where possible, use it. Make sure developers understand the roadmap for your organization: your domain, like all the other domains on the Internet, will adopt OpenID Connect. Use SAML to fill in the gaps until all the OpenID Connect libraries and web server plugins are available. SAML is going to be around much longer than CAS, so its a better bridge solution. Use CAS only as a last resort. You should require products and software that supports the identity integration method that align with your roadmap. Be flexible…using CAS is better than the app storing its own passwords. However, realize that this application will probably never support the two factor authentication services available in OAuth2 and SAML. There are many “good” legacy SSO protocols, don’t forget Siteminder in the Enterprise world… however, if you’re faced with the situation… try NOT TO CAS.

上一篇 下一篇

猜你喜欢

热点阅读