1

我正在尝试使用客户端使用证书对服务总线进行身份验证,但出现以下错误 -

{"error":"invalid_client","error_description":"ACS50008:SAML 令牌无效。\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 令牌是(为清楚起见已解码)-

<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 命名空间,但我不认为这很重要吗?)

4

1 回答 1

1

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

于 2013-06-21T11:29:42.350 回答