【发布时间】:2012-05-25 18:09:45
【问题描述】:
我们有一位客户尝试使用 ADFS 到 SSO 到我们的 Web 应用程序。我们正在使用 ComponentSpace SAML 2.0 库。发送给我们的断言如下所示:
<Assertion ID="_b8a24809-ab6b-4acd-ad6a-8bcb97bb1889" IssueInstant="2012-05-24T13:30:33.917Z" Version="2.0" xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
<Issuer>http://example.com/adfs/services/trust</Issuer>
<Subject>
<NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">mail@example.com</NameID>
<SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<SubjectConfirmationData NotOnOrAfter="2012-05-24T13:35:33.920Z" Recipient="https://example.com/default.aspx" />
</SubjectConfirmation>
</Subject>
<Conditions NotBefore="2012-05-24T13:30:33.907Z" NotOnOrAfter="2012-05-24T14:30:33.907Z">
<AudienceRestriction>
<Audience>https://example.com</Audience>
</AudienceRestriction>
</Conditions>
<AttributeStatement>
<Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress">
<AttributeValue>mail@example.com</AttributeValue>
</Attribute>
</AttributeStatement>
<AuthnStatement AuthnInstant="2012-05-24T13:30:33.756Z" SessionIndex="_b8a24809-ab6b-4acd-ad6a-8bcb97bb1889">
<AuthnContext>
<AuthnContextClassRef>urn:federation:authentication:windows</AuthnContextClassRef>
</AuthnContext>
</AuthnStatement>
</Assertion>
ComponentSpace 库正在从 HTTP 帖子中提取完整的 SamlResponse,但它没有报告任何断言(即 samlResponse.GetAssertions().Count == 0)。如果我使用 ComponentSpace 示例,它可以工作,但我注意到我使用 ComponentSpace 库构建的所有元素都以“saml:”为前缀(我认为应该如此)。
ComponentSpace 库是否应该能够找到没有 saml: 前缀的断言,或者有没有办法配置 ADFS 以正确发送它?
【问题讨论】:
-
我们的 SAML 组件 (componentspace.com/saml) 在访问 XML 元素等时会忽略前缀。相反,元素由标记名称和命名空间标识,这是在 XML 中做事的正确方法。因此,我们不会回复标记名称为 saml,而是在 urn:oasis:names:tc:SAML:2.0:assertion 命名空间等下查找 Assertion 元素。
标签: single-sign-on saml saml-2.0 adfs component-space