我们有一位客户试图使用ADFS将SSO应用于我们的Web应用程序。我们正在使用ComponentSpace SAML 2.0库。被发送给我们的说法是这样的: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">[email protected]</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>[email protected]</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()计数== 0)。如果我使用ComponentSpace示例它的工作原理,但我注意到我使用ComponentSpace库创建的所有元素都以“saml:”作为前缀(因为我相信它应该是这样)。
ComponentSpace库应该能够找到不带saml:前缀的断言,还是有办法配置ADFS以正确发送它?
我们的SAML组件(http://www.componentspace.com/saml)在访问XML元素等时忽略前缀。相反,元素由标记名称和名称空间标识,这是在XML中执行操作的正确方法。因此,我们不回复标记名称为saml,而是在urn:oasis:names:tc:SAML:2.0:assertion命名空间等下查找Assertion元素。 – 2012-08-04 07:40:32