我正试图将AWS认知与第三方SAML SSO身份提供者集成起来。第三方IdP在登录时使用一个成功的SAML断言进行响应。
然后,科尼图试图验证断言的签名,但是失败了,出现了以下错误消息:
Error in SAML response processing: SAML Assertion signature is invalid
我怎样才能诊断出认知的断言处理的原因?
我们已经用samltest.id测试了我们的认知SP,这是完全有效的。
读取样本测试。‘s的常见问题时,Shibboleth (与我的解决方案无关)的签名验证错误通常意味着“用于对断言进行签名的密钥与IdP元数据中的usage="signing"
或null用法不匹配”。
下面是我的SP元数据的编辑副本:
<?xml version="1.0"?>
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" entityID="urn:amazon:cognito:sp:us-east-2_[REDACTED]" validUntil="2023-04-04T00:00:00Z">
<SPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol" WantAssertionsSigned="true">
<KeyDescriptor use="signing">
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509Data>
<ds:X509Certificate>
[REDACTED]
</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</KeyDescriptor>
<NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</NameIDFormat>
<NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</NameIDFormat>
<NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</NameIDFormat>
<AssertionConsumerService index="1" isDefault="true" Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://[REDACTED].auth.us-east-2.amazoncognito.com/saml2/idpresponse" />
<AssertionConsumerService index="2" isDefault="false" Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://[REDACTED].auth.us-east-2.amazoncognito.com/saml2/idpresponse" />
<AttributeConsumingService index="1">
<ServiceName xml:lang="en">AWS Vermeer Single Sign-On</ServiceName>
<RequestedAttribute isRequired="true" Name="mail" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic" FriendlyName="email" />
<RequestedAttribute isRequired="false" Name="given_name" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic" FriendlyName="firstName" />
<RequestedAttribute isRequired="false" Name="family_name" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic" FriendlyName="lastName" />
</AttributeConsumingService>
</SPSSODescriptor>
<Organization>
<OrganizationName xml:lang="en">[REDACTED]</OrganizationName>
<OrganizationDisplayName xml:lang="en">[REDACTED]</OrganizationDisplayName>
<OrganizationURL xml:lang="en">[REDACTED]</OrganizationURL>
</Organization>
</EntityDescriptor>
无关StackOverflow问题
发布于 2022-04-28 22:00:05
从查看IdP元数据开始。IdP使用IdP私钥签名SAML响应,SP用IdP公钥验证签名。
IdP元数据将包含证书,您可以验证证书是否与SAML响应中的证书匹配。
请详细说明这些密钥是如何工作的,如果有的话,IdP的元数据中的证书如何与SP的元数据中的证书保持一致?
这将是一个标准的公钥和私钥对。用于数字签名时,使用发件人的私钥对消息进行签名,并使用发件人的公钥对签名进行验证。
在SAML交换中,将有一个SAML请求(从SP到IdP)和一个SAML响应(从IdP到SP)。正式而言,签署请求和/或答复是可选的,尽管国内流离失所者/SP可能需要签署。SAML请求通常没有签名(尽管可以签名)。
因此,SAML响应由IDP使用IdP私钥签名,签名由SP使用IdP提供的公钥进行验证。SAML请求将由SP使用SP的私钥签名,并由IDP使用SP提供的公钥进行验证。
IdP元数据中的证书与SP元数据中的证书之间没有任何关系,除了两者都是用于验证数字签名的公共证书之外。
https://stackoverflow.com/questions/72050391
复制相似问题