Microsoft.IdentityServer.Web.RequestFailedException:MSIS7012:

问题描述 投票:0回答:2

在我的项目中实现 SAML 2.0 时,我遇到了以下错误。

详细信息:服务器:Tomcat IDP:ADFS 2.0

错误:

Exception details: 
Microsoft.IdentityServer.Web.RequestFailedException: MSIS7012: An error occurred while processing the request. Contact your administrator for details. ---> 
System.ServiceModel.FaultException: The creator of this fault did not specify a Reason.
    at Microsoft.IdentityServer.Protocols.Saml.Contract.MSISSamlProtocolContractClientManager.ProcessRequest(Message request)
    at Microsoft.IdentityServer.Protocols.Saml.Contract.MSISSamlProtocolContractClient.ProcessRequest(MSISSamlRequest samlRequest)
    at Microsoft.IdentityServer.Protocols.Saml.Contract.MSISSamlProtocolContractClient.ProcessRequest[T](MSISSamlRequest samlRequest)
    at Microsoft.IdentityServer.Protocols.Saml.Contract.MSISSamlProtocolContractClient.Issue(HttpSamlMessage httpSamlMessage, SecurityTokenElement onBehalfOf, String sessionState, String& newSessionState, String& authenticatingProvider)
    at Microsoft.IdentityServer.Web.FederationPassiveAuthentication.RequestBearerToken(HttpSamlRequestMessage httpSamlRequest, SecurityTokenElement onBehalfOf, String& samlpSessionState, String& samlpAuthenticationProvider)
    --- End of inner exception stack trace --- 
   at Microsoft.IdentityServer.Web.FederationPassiveAuthentication.RequestBearerToken(HttpSamlRequestMessage httpSamlRequest, SecurityTokenElement onBehalfOf, String& samlpSessionState, String& samlpAuthenticationProvider)
    at Microsoft.IdentityServer.Web.FederationPassiveAuthentication.BuildSignInResponseCoreWithSerializedToken(String signOnToken, WSFederationMessage incomingMessage)
    at Microsoft.IdentityServer.Web.FederationPassiveAuthentication.SignIn(SecurityToken securityToken)

System.ServiceModel.FaultException: The creator of this fault did not specify a Reason.
    at Microsoft.IdentityServer.Protocols.Saml.Contract.MSISSamlProtocolContractClientManager.ProcessRequest(Message request)
    at Microsoft.IdentityServer.Protocols.Saml.Contract.MSISSamlProtocolContractClient.ProcessRequest(MSISSamlRequest samlRequest)
    at Microsoft.IdentityServer.Protocols.Saml.Contract.MSISSamlProtocolContractClient.ProcessRequest[T](MSISSamlRequest samlRequest)
    at Microsoft.IdentityServer.Protocols.Saml.Contract.MSISSamlProtocolContractClient.Issue(HttpSamlMessage httpSamlMessage, SecurityTokenElement onBehalfOf, String sessionState, String& newSessionState, String& authenticatingProvider)
    at Microsoft.IdentityServer.Web.FederationPassiveAuthentication.RequestBearerToken(HttpSamlRequestMessage httpSamlRequest, SecurityTokenElement onBehalfOf, String& samlpSessionState, String& samlpAuthenticationProvider)



The verification of the SAML message signature failed. 
Message issuer: http://XXXXX.XXXX.XXXX.com/adfs/services/trust 
Exception details: 
MSIS1015: Server required signed SAML AuthenticationRequest but no signature present.

这是我解码的身份验证请求:

<?xml version="1.0" encoding="UTF-8"?>
-<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" Version="2.0" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" IssueInstant="2014-05-20T05:25:51.083Z" IsPassive="false" ID="_abff2b25141987e9da0f33f30b1180d6" ForceAuthn="false" AssertionConsumerServiceURL="https://inbspg001nfh.as.XXXX.XXXX.com:8443/JavaSamlSP/setcookie.jsp"><samlp:Issuer xmlns:samlp="urn:oasis:names:tc:SAML:2.0:assertion">http://XXXX.XXXX.XXXX.com/adfs/services/trust</samlp:Issuer><saml2p:NameIDPolicy xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" AllowCreate="true"/>-<saml2p:RequestedAuthnContext xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" Comparison="exact"><saml:AuthnContextClassRef xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef></saml2p:RequestedAuthnContext></samlp:AuthnRequest>

如果你们有任何想法,请帮助我.. 预先感谢..

java saml-2.0 adfs2.0
2个回答
0
投票

这通常是因为 ADFS 期望对身份验证请求进行签名,但事实并非如此。

您可以告诉 SP 对请求进行签名并保持 ADFS 不变,也可以告诉 ADFS 不要期望签名的请求。 (为了安全起见,请选择前者)。

修复方法数量:

  • 设置 SP 选项以签署 Auth。请求
  • 生成新的 SP 元数据并导入。

在 ADFS 端:

对于 SP:

Set-ADFSClaimsProvider -TargetIdentifier SP-SignedSamlRequestsRequired $False

所有 ADFS:

设置 ADFSProperties -SignedSamlRequestsRequired $False


0
投票

出现错误

MSIS7012 an error occurred while processing the request. Contact your administrator for details.

进一步调查时出现以下错误:

Microsoft.IdentityServer.RequestFailedException:MSIS7012:错误 处理请求时发生。请联系您的管理员以获取 细节。 ---> System.ArgumentException:ID4216:ClaimType“Namn” 格式必须为“命名空间”/“名称”。参数名称:claimType

事实证明,声明已在英语 ADFS 服务器上设置为瑞典语。通过将

Namn
重命名为
Name
来修复。

© www.soinside.com 2019 - 2024. All rights reserved.