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

标签 azure

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

{"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/

相关文章:

azure - 如何在 FineUploader Azure 请求中包含 Content-MD5 header ?

c# - SQL Azure 与本地超时问题 - EF

azure - 如何将辅助角色添加到azure上的现有云服务

python - 在 Apache Hadoop 上扩展 python mrjob 程序

azure - 有没有办法将一个 AzureAD 应用程序同时用于前端和后端

azure - 如何在azure应用程序注册中显示客户端 key 的隐藏值

c# - 无法将机器人链接到机器人框架模拟器

asp.net-mvc - 为 Azure 上托管的 MVC 网站设置 GOOGLE_APPLICATION_CREDENTIALS

azure - 删除 Azure 表存储中某些天前的条目自动化

Azure API 管理 CORS 问题