【发布时间】:2012-07-13 05:43:40
【问题描述】:
我的客户有一个 ping 联合安装,它似乎正在生成不兼容的身份验证响应文档。文档格式正确,不包含非法字符。
最大的问题是文档的节点在节点名称中不包含“ds:”。这很不幸,因为我的身份验证库 (omniauth-saml) 只查找 ds 名称 when validating。
图书馆有问题吗? Ping Federate SAML 文档有问题吗?我已经开始修补匹配器以使用 XPath 的“包含”帮助程序,但即便如此,文档的摘要和证书也不会计算到正确的值。
- 图书馆有问题吗?
- Ping Federate SAML 文档有问题吗?
- Ping Federate 文档在规范化后是否仍应进行验证?
这是他们的 SAML 响应示例
<samlp:Response Destination="http://a/dest" IssueInstant="2012-07-12T18:21:28.011Z" ID="a.valid.rand.id" Version="2.0" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">http://their/issuer</saml:Issuer>
<Signature>
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#vZZQnHjOx1.u8c3uupdxDb_cmRu">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>some_digest_value</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>some_signature_value</SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate>their_well_formed_x509_cert</X509Certificate>
</X509Data>
<KeyValue>
<RSAKeyValue>
<Modulus>a_modulus</Modulus>
<Exponent>AQAB</Exponent>
</RSAKeyValue>
</KeyValue>
</KeyInfo>
</Signature>
<samlp:Status>
<samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
</samlp:Status>
<saml:Assertion Version="2.0" IssueInstant="2012-07-12T18:21:28.058Z" ID="SOME_ID">
<saml:Issuer>http://their/issuer</saml:Issuer>
<saml:Subject>
<saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">14096079</saml:NameID>
<saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<saml:SubjectConfirmationData NotOnOrAfter="2012-07-12T18:26:28.058Z" Recipient="http://link/back/to/me"/>
</saml:SubjectConfirmation>
</saml:Subject>
<saml:Conditions NotOnOrAfter="2012-07-12T18:26:28.058Z" NotBefore="2012-07-12T18:16:28.058Z">
<saml:AudienceRestriction>
<saml:Audience>http://an/audience/restriction</saml:Audience>
</saml:AudienceRestriction>
</saml:Conditions>
<saml:AuthnStatement AuthnInstant="2012-07-12T18:21:28.058Z" SessionIndex="SOME_ID">
<saml:AuthnContext>
<saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified</saml:AuthnContextClassRef>
</saml:AuthnContext>
</saml:AuthnStatement>
<saml:AttributeStatement xmlns:xs="http://www.w3.org/2001/XMLSchema">
<saml:Attribute NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic" Name="uid">
<saml:AttributeValue xsi:type="xs:string">a_uid</saml:AttributeValue>
</saml:Attribute>
<!-- removed all the other attributes -->
</saml:AttributeStatement>
</saml:Assertion>
</samlp:Response>
【问题讨论】:
-
你能发布完整的回复吗?您刚刚包含了一个示例 - 默认名称空间可能是 dsig 名称空间,这意味着不需要前缀 (ds:)。如果这是问题所在,我会感到非常惊讶——拥有 800 多个客户和数百个可互操作的 SAML 产品——PingFederate 绝对是符合标准的。 (注:我为 Ping 工作)
-
嘿 Scott,代码块吃了我的第一行。请立即查看。
-
谢谢!正如我所料 - 请参阅顶级 samlp:Response 标记上的 xmlns 属性 - 它引用 dsig 模式作为默认命名空间。我建议您先测试与其他工具/SAML 合作伙伴的互操作性,以帮助您调试问题。
-
这个omniauth-saml 插件已经可以与OneLogin 一起使用,但看起来我将集成Ping 兼容性。
-
omni-saml 没有详细的错误吗?再次 - 看起来 PingFederate 符合要求 - 如果有的话,可能是配置不匹配。
标签: xml certificate omniauth saml pingfederate