SAML SSO 失败 - "Reason: Destination is invalid."

SAML SSO failure - "Reason: Destination is invalid."

我正在使用 SSOCircle 并导入了我的元数据并执行了有效的重定向请求。我的 AuthnRequest 中没有出现任何错误(我是,但我更正了)。但是,当我执行重定向时,我收到错误:

Reason: Destination is invalid.

不确定我错过了什么。

我的 Authn 是这样的:

<samlp:AuthnRequest ID="_ID_" Version="2.0" IssueInstant="2016-02-25T16:20:04.869Z" Destination="http://localhost:9000/saml/service" ForceAuthn="false" IsPassive="false" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" AssertionConsumerServiceURL="http://localhost:9000/saml/assert" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">

  <saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">MY_ISSUER_ID</saml:Issuer>

  <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    <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="_ID_">
        <Transforms>
          <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
          <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
            <InclusiveNamespaces PrefixList="#default samlp saml ds xs xsi" xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" />
          </Transform>
        </Transforms>
        <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
        <DigestValue>_DIGEST_</DigestValue>
      </Reference>
    </SignedInfo>
    <SignatureValue>_SIGNATURE_VALUE_</SignatureValue>
    <KeyInfo>
      <X509Data>
        <X509Certificate>_CERTIFICATE_STRING_</X509Certificate>
      </X509Data>
    </KeyInfo>
  </Signature>

  <samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" SPNameQualifier="MY_ISSUER_ID" AllowCreate="true" />

  <samlp:RequestedAuthnContext 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>
  </samlp:RequestedAuthnContext>

</samlp:AuthnRequest>

我正在将重定向发送至:

https://idp.ssocircle.com:443/sso/SSORedirect/metaAlias/ssocircle

我使用的库来自 ComponentPro(我很满意)。

问题是您在 AuthnRequest 中的 Destination 属性设置为 http://localhost:9000/saml/service and your are actually sending it to https://idp.ssocircle.com:443/sso/SSORedirect/metaAlias/ssocircle

目标属性必须与实际目标相同。