SAML 令牌概要文件标准中定义的 SAML 断言
Web Service 安全性 SAML 令牌概要文件 OASIS 标准指定如何将安全性断言标记语言 (SAML) 断言与 Web Service 安全性 SOAP 消息安全性规范配合使用。
此产品支持两个版本的 OASIS SAML 标准:适用于安全性断言标记语言 (SAML) V1.1 的声明和协议与适用于安全性断言标记语言 (SAML) V2.0 的声明和协议。
该标准描述了将 SAML 声明用作 <wsse:Security> 头中的安全性令牌,如“WSS:SOAP 消息安全”规范所定义。可以使用 XML 签名将 SAML 断言中的主体集和语句与 SOAP 消息绑定。
主体集确认方法提供了一种机制,实体通过此机制提供 SAML 断言的主体集与声明之间的关系的证据(证明)。“WSS:SAML 令牌概要文件”描述了以下 3 种主体集确认方法的用法:bearer、holder-of-key 和 sender-vouches。此产品支持所有这 3 种确认方法。使用 bearer 主体集确认方法时,主体集与声明之间的关系的证明是隐式的。无需执行特定步骤来建立关系。
由于没有与 bearer 令牌相关联的密钥材料,所以必要时必须使用传输级机制或其他用于实现消息级保护的安全性令牌(例如 X.509 或 Kerberos 令牌)对 SOAP 消息执行保护。使用 holder-of-key 主体集确认方法时,将通过使用 SAML 断言中指定的密钥对 SOAP 消息部件进行签名,从而建立主体集与声明之间的关系的证明。由于存在与 holder-of-key 令牌相关联的密钥材料,所以可以使用此令牌为 SOAP 消息提供消息级保护(签名和加密)。
- 发送方使用客户机证书认证来设置与接收方的安全套接字层 (SSL) 会话。
- 发送方使用安全性令牌引用变换算法以数字方式对具有外层 SOAP 消息的 SAML 断言进行签名。发送方可以使用 SSL 或 SOAP 消息加密来保护机密性。
Bearer 断言
按照 OASIS Web Services 安全规范中的定义,如果 SAML 声明包括 Bearer <saml:ConfirmationMethod> 元素,那么该 SAML 声明是 Bearer 声明。有关更多信息,请参阅规范文档。<saml:SubjectConfirmation>
<saml:ConfirmationMethod>
urn:oasis:names:tc:SAML:1.0:cm:bearer
</saml:ConfirmationMethod>
</saml:SubjectConfirmation>
<saml2:SubjectConfirmation
Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
</saml2:SubjectConfirmation>
holder-of-key 断言
如果 SAML 断言包含 SubjectConfirmation 元素,而后者包含值为 holder-of-key 的 saml:ConfirmationMethod 元素以及 ds:KeyInfo 元素,那么该 SAML 断言是 holder-of-key 断言。有关更多信息,请参阅规范文档。SubjectConfirmation 元素内的 ds:KeyInfo 信息标识用于确认主体集身份的公用密钥或密钥。holder-of-key 断言还包含 ds:Signature 元素,该元素用于保护断言机构所建立的确认 ds:KeyInfo 元素的完整性。
<saml:SubjectConfirmation>
<saml:ConfirmationMethod>
urn:oasis:names:tc:SAML:1.0:cm: holder-of-key
</saml:ConfirmationMethod>
<ds:KeyInfo>
<ds:KeyValue>. . .</ds:KeyValue>
</ds:KeyInfo>
</saml:SubjectConfirmation>
<saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:holder-of-key">
<saml2:SubjectConfirmationData>
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
......
</ds:KeyInfo>
</saml2:SubjectConfirmationData>
</saml2:SubjectConfirmation>
sender-vouches 断言
<saml:SubjectConfirmation>
<saml:ConfirmationMethod>
urn:oasis:names:tc:SAML:1.0:cm:sender-vouches
</saml:ConfirmationMethod>
</saml:SubjectConfirmation>
<saml2:SubjectConfirmation
Method="urn:oasis:names:tc:SAML:2.0:cm:sender-vouches">
</saml2:SubjectConfirmation>
holder-of-key 断言中的对称密钥
SAML holder-of-key 断言用作保护令牌。此类型的保护令牌可以使用对称密钥作为证明密钥。客户机使用证明密钥向依赖方说明它确实拥有所签发的 SAML 令牌。当安全性令牌服务 (STS) 签发使用对称证明密钥的 SAML 令牌时,该令牌包含针对目标服务进行加密的密钥。在 RequestSecurityTokenResponse (RSTR) 过程中,STS 还在 <RequestedProofToken> 元素内将相同的证明密钥发送给请求者。然后,Web Service 客户机向目标服务(也称为依赖方)显示该 SAML 令牌,并使用接收到的证明密钥对应用程序消息进行签名。<t:KeyType> http://docs.oasis-open.org/ws-sx/ws-trust/200512/SymmetricKey
</t:KeyType>
<t:KeySize>256</t:KeySize>
<saml:SubjectConfirmation>
<saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:holder-of-key</saml:ConfirmationMethod>
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<enc:EncryptedKey xmlns:enc="http://www.w3.org/2001/04/xmlenc#">
<enc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
</enc:EncryptionMethod>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>MIIB3 . . . vO3bdg</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
<enc:CipherData>
<enc:CipherValue>P5Kb . . . rOTvII</enc:CipherValue>
</enc:CipherData>
</enc:EncryptedKey>
</ds:KeyInfo>
</saml:SubjectConfirmation>
holder-of-key 断言中的公用密钥
将 SAML holder-of-key 断言用作保护令牌时,该令牌可以使用公用密钥作为证明密钥。客户机使用证明密钥向依赖方说明它确实拥有所签发的 SAML 令牌。相对于对称密钥而言,公用证明密钥的优势在于客户机不与安全性令牌服务 (STS) 和依赖方共享密钥。公用证明密钥可以是 X.509 证书,也可以是 Rivest Shamir Adleman (RSA) 公用密钥。<trust:UseKey>
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<X509Data>
<X509Certificate>MIIGCzCCBPOgAwIBAgIQcSgVwaoQv6dG. . .1GqB
</X509Certificate>
</X509Data>
</KeyInfo>
</trust:UseKey>
<saml:SubjectConfirmation>
<saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:holder-of-key</saml:ConfirmationMethod>
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:KeyValue>
<ds:RSAKeyValue>
<ds:Modulus>hYHQm. . . ZnH1S0=</ds:Modulus>
<ds:Exponent>AQAB</ds:Exponent>
</ds:RSAKeyValue>
</ds:KeyValue>
</ds:KeyInfo>
</saml:SubjectConfirmation>