gpt4 book ai didi

azure - 使用证书调用 Windows Azure ACS 时出错

转载 作者:行者123 更新时间:2023-12-03 03:18:39 25 4
gpt4 key购买 nike

我尝试使用客户端通过证书对服务总线进行身份验证,但收到以下错误 -

{"error":"invalid_client","error_description":"ACS50008: SAML token 无效。\r\n跟踪 ID: 40fd75f3-7a9c-490f-9708-8ee24c1b8d6c\r\n关联 ID: faaeba2f-4d0e-4b67 -a12e-32b9a8006aad\r\n时间戳: 2013-06-19 11:40:05Z"}

但其中没有太多详细信息,我在网上找不到任何内容。

我发送的http请求是 -

POST https://[ACS.accesscontrol.windows.net/v2/OAuth2-13 HTTP/1.1 SB Namespace]

Content-Type: application/x-www-form-urlencoded

Host: [ACS SB Namespace].accesscontrol.windows.net

Content-Length: 2902

Expect: 100-continue

Connection: Keep-Alive

正文中的 SAML token 是(为了清晰起见,已解码)-

<Assertion ID="_71323c38-9f7d-4e34-9681-25ab3338cca4" IssueInstant="2013-06-19T11:58:46.233Z" Version="2.0" xmlns="urn:oasis:names:tc:SAML:2.0:assertion"> 
<Issuer>OAuth2SampleX509Identity</Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" />
<ds:Reference URI="#_71323c38-9f7d-4e34-9681-25ab3338cca4">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
<ds:DigestValue>TKIR+dse+tMuZxXCzFO+C7QcCj25xWQ2Uzax1YUmpdQ=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>oCP8si[removed for brevity]</ds:SignatureValue>
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<X509Data>
<X509Certificate>[remove for brevity]</X509Certificate>
</X509Data>
</KeyInfo>
</ds:Signature>
<Subject>
<NameID>OAuth2SampleX509Identity</NameID>
<SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer" />
</Subject>
<Conditions NotBefore="0001-01-01T00:00:00.000Z" NotOnOrAfter="9999-12-31T23:59:59.999Z">
</AudienceRestriction>
</Conditions>
</Assertion>

我正在使用来自 http://msdn.microsoft.com/en-us/library/hh127795.aspx 的客户端对此进行测试并相信我已经按照以下配置了 ACS说明(虽然我使用的是 SB 生成的 ACS 命名空间,但我认为这并不重要?)

最佳答案

失败的原因是 SAML 断言中的颁发者与我尝试进行身份验证的服务身份的名称不匹配

关于azure - 使用证书调用 Windows Azure ACS 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17209498/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com