使用 SAML 安全性令牌为 Web Service 客户机建立安全上下文
WebSphere® Application Server 支持两种策略集调用者绑定配置选项,以使用 Web Service SOAP 请求消息中的 SAML 安全性令牌建立客户机安全上下文。这两个配置选项是将 SAML 令牌映射至本地用户存储库中的用户条目和根据信任关系声明 SAML 令牌。
开始之前
关于此任务
过程
结果
示例
<saml:AttributeStatement>
<saml:Subject>
<saml:NameIdentifier NameQualifier="ldap.example.com:9080">uid=alice,dc=example,dc=com</saml:NameIdentifier>
<saml:SubjectConfirmation>
<saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer</saml:ConfirmationMethod>
</saml:SubjectConfirmation>
</saml:Subject>
<saml:Attribute AttributeName="UniqueSecurityName" AttributeNamespace="com.ibm.websphere.security.cred.WSCredential">
<saml:AttributeValue>uid=alice,dc=example,dc=com</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute AttributeName="GroupIds" AttributeNamespace="com.ibm.websphere.security.cred.WSCredential">
<saml:AttributeValue>cn=development,dc=example,dc=com</saml:AttributeValue>
<saml:AttributeValue>cn=deployment,dc=example,dc=com</saml:AttributeValue>
<saml:AttributeValue>cn=test,dc=example,dc=com</saml:AttributeValue>
</saml:Attribute>
</saml:AttributeStatement>
以下示例阐明了基于 WSCredential 的自签发 SAML 2.0 声明中的 NameID 和 Attribute 元素:
<saml2:AttributeStatement>
<saml2:Attribute Name="UniqueSecurityName" NameFormat="com.ibm.websphere.security.cred.WSCredential" />
<saml2:AttributeValue>uid=alice,dc=example,dc=com</saml2:AttributeValue>
<saml2:Attribute>
<saml2:Attribute AttributeName="GroupIds" NameFormat="com.ibm.websphere.security.cred.WSCredential" />
<saml2:AttributeValue>cn=development,dc=example,dc=com</saml2:AttributeValue>
<saml2:AttributeValue>cn=deployment,dc=example,dc=com</saml2:AttributeValue>
<saml2:AttributeValue>cn=test,dc=example,dc=com</saml2:AttributeValue>
</saml2:Attribute>
<saml2:AttributeStatement>
<saml2:NameID NameQualifier="ldap.example.com:9060">alice</saml2:NameID>