简体   繁体   English

WS-Trust,WS-Fed和SAML 1.1 / 2.0协议之间的区别

[英]Difference between WS-Trust, WS-Fed and SAML 1.1/ 2.0 protocols

What's the difference between WS-Trust, WS-Fed and SAML 1.1/ 2.0 protocols? WS-Trust,WS-Fed和SAML 1.1 / 2.0协议之间有什么区别?

My understanding on these protocols gets confused when SAML is used as a security token in WS-Trust and WS-Fed protocols. 当SAML用作WS-Trust和WS-Fed协议中的安全性令牌时,我对这些协议的理解感到困惑。

Interested in knowing in which scenario these protocols used and what makes them different. 有兴趣了解这些协议在哪种情况下使用以及使它们与众不同的原因。 Your answers will be easy to understand if NO commercial product/ technology references used. 如果未使用任何商业产品/技术参考,您的答案将很容易理解。

At a high level, WS-* protocols traditionally were used by Microsoft. 在较高级别,Microsoft传统上使用WS- *协议。

SAML-P (P for protocol) was used by the open source movement and hence Java. SAML-P(用于协议的P)被开源运动以及Java所采用。

WS-Fed has two profiles - active and passive. WS-Fed具有两个配置文件-主动和被动。 Active is for WCF (WS-Trust), passive is browser based (WS-Fed via login page). 主动式用于WCF(WS-Trust),被动式用于基于浏览器(WS-Fed通过登录页面)。

Both of these use SAML tokens. 这两个都使用SAML令牌。

Functionally, both WS-Fed and SAML do the same thing wrt. 在功能上,WS-Fed和SAML都做同样的事情。 federation 联邦

If you federate two ADFS (Microsoft IDP) together you use WS-Fed. 如果将两个ADFS(Microsoft IDP)联合在一起,则使用WS-Fed。 If you add in Sharepoint, it also uses WS-Fed. 如果您添加Sharepoint,它也会使用WS-Fed。 The tokens passed are in the SAML token format. 传递的令牌为SAML令牌格式。

If you have a Java application that uses Spring, then that will hook in to ADFS via SAML-P. 如果您有使用Spring的Java应用程序,那么它将通过SAML-P挂接到ADFS。 The tokens passed are in the SAML token format. 传递的令牌为SAML令牌格式。

this question is old but i struggled finding a correct answer online. 这个问题很旧,但是我很难在网上找到正确的答案。

A lot of online posts say, that 'passive / browser' clients use WS-Fed and 'active / smart' use WS-Trust. 许多在线帖子说,“被动/浏览器”客户端使用WS-Fed,“主动/智能”客户端使用WS-Trust。 That is probably because the active use case uses by default a url like '/ws-trust/2005' or '/ws-trust/v1.x/'. 这可能是因为活动用例默认情况下使用的网址为“ / ws-trust / 2005”或“ /ws-trust/v1.x/”。 This does not seem to be 100% accurate. 这似乎不是100%准确的。 The great and free book: Claims-based Identity, Second Edition helped me with the issue and I finally found a satisfying answer: 伟大而免费的书:《基于声明的身份》,第二版帮助我解决了这一问题,终于找到了令人满意的答案:

The goal of many of these architectures is to enable federation with either a browser or a smart client. 这些体系结构中的许多体系结构的目标是启用与浏览器或智能客户端的联合。 Federation with a smart client is based on WS-Trust and WS-Federation Active Requestor Profile. 与智能客户端的联合基于WS-Trust和WS-Federation Active Requestor Profile。

These protocols describe the flow of communication between smart clients (such as Windows-based applications) and services (such as WCF services) to request a token from an issuer and then pass that token to the service for authorization. 这些协议描述了智能客户端(例如,基于Windows的应用程序)和服务(例如,WCF服务)之间的通信流程,以向发行者请求令牌,然后将该令牌传递给服务以进行授权。

Federation with a browser is based on WS-Federation Passive Requestor Profile, which describes the same communication flow between the browser and web applications. 与浏览器的联合基于WS-Federation被动请求者概要文件,该概要描述了浏览器和Web应用程序之间的相同通信流。 It relies on browser redirects, HTTP GET, and POST to request and pass around tokens. 它依靠浏览器重定向,HTTP GET和POST来请求和传递令牌。

SAMLP is just a different protocol when it comes to how things are communicated such as the redirection URL and so on, but the differences are not relevant (in most cases) and simply depend what the client supports (eg Java will use SAML). SAMLP只是一种不同的协议,涉及诸如重定向URL之类的事物通信方式,但是差异并不相关(在大多数情况下),而仅取决于客户端支持的内容(例如Java将使用SAML)。 The biggest difference is in my opinion that SAMLP allows an Identity Provider initiated Use Case (which is the most secure one in my opinion), where the User starts on the Identity Provider (eg the Web Proxy of your ADFS Server, =Claims Provider in MS terms), instead of starting at the Web Service and then getting redirected to the Service Provider (=Relaying Party in MS terms). 在我看来,最大的不同是SAMLP允许身份提供商启动用例(我认为这是最安全的用例),其中用户从身份提供商(例如,ADFS服务器的Web代理,即= Claims Provider)中启动。 MS条款),而不是从Web服务开始,然后重定向到服务提供者(= MS条款中的中继方)。 Also when we are talking about SAML we usually mean SAML 2.0 while WS-Fed uses SAML 1.x Tokens (and MS calls them Tokens, SAML calls them Assertion... its just a signed and possibly encrypted XML, I think theoretically you could use other Tokens in WS-Fed then SAML but i have never heard of anybody actually doing that). 同样,当我们谈论SAML时,我们通常指的是SAML 2.0,而WS-Fed使用SAML 1.x令牌(MS称它们为Token,SAML称它们为Assertion……它只是一个经过签名且可能加密的XML,从理论上讲,您可以在WS-Fed中使用其他令牌,然后在SAML中使用,但我从未听说有人真正这样做过)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM