jn1*_*1kk 5 java saml shibboleth saml-2.0 gluu
我有点理解基本的SAML身份验证应该如何工作:
SP
SP的用户请求资源向IDP发送auth请求IDP对
用户进行身份验证,并向userP发回一些userId
SP发送属性查询以获取有关userId的其他详细信息
IDP发送回属性
SP提供用户资源
我的问题是,你能绕过AttributeQuery吗?当我向我的测试Gluu/Shibboleth服务器发出SAML 2.0请求时,我回来了givenName(名字)和sn(姓氏).无论如何我可以inum在AuthnRequest中请求用户ID和电子邮件吗?
我的要求非常简单:
<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="MyPrefix1457456412304" Version="2.0" IssueInstant="2016-03-08T17:00:12Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST">
<saml:Issuer>me.com</saml:Issuer>
</samlp:AuthnRequest>
Run Code Online (Sandbox Code Playgroud)
请求我回来是这样的:
<?xml version="1.0" encoding="UTF-8"?>
<saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" ID="_bff09cf745ea5722aac3f3ec57c0ecf3" IssueInstant="2016-03-08T17:01:06.140Z" Version="2.0">
<saml2:Issuer ....
<saml2:AttributeStatement>
<saml2:Attribute FriendlyName="sn" Name="urn:oid:2.5.4.4" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">User</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute FriendlyName="givenName" Name="urn:oid:2.5.4.42" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Admin</saml2:AttributeValue>
</saml2:Attribute>
</saml2:AttributeStatement>
</saml2:Assertion>
Run Code Online (Sandbox Code Playgroud)
我阅读了规范的相关部分,似乎说服务器可以回馈它想要的任何东西(以及它想要多少属性)?同样,我的问题是我是否可以强制SAML Gluu/Shibboleth服务器将特定属性作为AuthnRequest的一部分返回给我.
只是为了提供更多详细信息,您作为 SP 请求其他属性的时间是在您将元数据发送到 IdP 时。该元数据描述您的服务,包括 ACS 端点、您的 AuthnRequests 将使用的公共证书、您希望合作伙伴加密的证书、您需要的属性、您唯一的实体 ID 等。的一点是,一旦您确定了您的服务需求,对于任何合作伙伴来说,此元数据都不必更改。您可以将其发送给与您合作的每个人。
一旦您的合作伙伴收到此元数据,他们就会将其导入,并使用其身份存储库中的信息满足您请求的属性,配置签名和加密等。完成所有操作后,他们会将其元数据发送给您,其中包含其协议端点(您需要将 AuthnRequest 等发送到的证书、可以验证其签名的证书、验证他们发送给您的属性(这些可以根据您应该与合作伙伴进行的对话进行更改)等。
您获取此元数据,并将其导入您的系统,并根据需要构建与您的应用程序的连接。
| 归档时间: |
|
| 查看次数: |
2648 次 |
| 最近记录: |