我使用的是 ADFS 3.0 和 SAML 2。我遇到了如下错误:
saml 请求是:
<samlp:AuthnRequest xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="DH7a49776ef7c040d09b2c661821bd5f76" AssertionConsumerServiceURL="https://auth-dev.ServiceProvider.com/clientOrg/SAML/Login" Destination="https://federation.example.net/adfs/ls/IdpInitiatedSignOn.aspx" IssueInstant="2017-04-20T14:49:35.6414575Z" Version="2.0" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
<saml:Issuer>https://auth.ServiceProvider.com/clientOrg</saml:Issuer>
<samlp:NameIDPolicy AllowCreate="true" />
<samlp:forceAuthn>true</samlp:forceAuthn>
</samlp:AuthnRequest>
如果错误消息太模糊,如何进一步缩小范围并解决 AD FS 方面提出的这个问题?
谢谢。
确保您的请求符合规范。使用成熟的 SAML2 库来生成请求,而不是手工制作。
https://auth.ServiceProvider.com/clientOrg使用什么来生成这些请求?
如果您删除以下字符串,您的请求将符合要求。
<samlp:forceAuthn>true</samlp:forceAuthn>
请参阅https://msdn.microsoft.com/en-us/library/ee895365.aspx上的示例,了解如何使用 forceauthn。我还修复了目的地,因为 ad fs 端点是 /adfs/ls 而不是 /adfs/ls/idpinitiatedsignon.aspx
<samlp:AuthnRequest xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ForceAuthn="true" ID="DH7a49776ef7c040d09b2c661821bd5f76" AssertionConsumerServiceURL="https://auth-dev.ServiceProvider.com/clientOrg/SAML/Login" Destination="https://federation.example.net/adfs/ls/" IssueInstant="2017-04-20T14:49:35.6414575Z" Version="2.0" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
<saml:Issuer>https://auth.ServiceProvider.com/clientOrg</saml:Issuer>
<samlp:NameIDPolicy AllowCreate="true" />
</samlp:AuthnRequest>
在http://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf查看规范以获取正确的 authnrequest。
使用https://www.samltool.com/validate_xml.php 等验证器检查您的请求是否合规。其他人可能有更多建议。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句