Azure B2C SAML-RP实施不起作用

时间:2018-03-08 19:22:41

标签: azure azure-ad-b2c

我想通过Azure B2C实现身份验证并使用本地帐户并使用SAML响应重定向到我的应用程序。

我遵循:

  1. https://github.com/Azure-Samples/active-directory-b2c-advanced-policies/blob/master/Walkthroughs/RP-SAML.md

  2. MS Azure AD B2C as SAML IDP not working

  3. 我对Postman进行了测试并收到了错误“AADB2C:发生了异常”。在AppInsite上设置日志记录后 - >错误讯息:

    请求不包含任何SAML 2.0协议参数

    过邮递员我发送了以下请求:

    POST https://login.microsoftonline.com/te/matonokb2c.onmicrosoft.com/B2C_1A_signin/samlp/sso/login?SAML_Request=PHNhbWxwOkF1dGhuUmVxdWVzdCB4bWxuczpzYW1scD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOnByb3RvY29sIiB4bWxucz0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOm1ldGFkYXRhIiBJRD0iRjg0RDg4OEFBM0I0NEMxQjg0NDM3NUE0RTgyMTBEOUUiIFZlcnNpb249IjIuMCIgSXNQYXNzaXZlPSJmYWxzZSIgQXNzZXJ0aW9uQ29uc3VtZXJTZXJ2aWNlVVJMPSJodHRwczovL2xvY2FsaG9zdDo0NDMxNi9zYW1sIj4NCiAgIDxJc3N1ZXIgeG1sbnM9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphc3NlcnRpb24iIC8+DQogICA8c2FtbHA6TmFtZUlEUG9saWN5IEZvcm1hdD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6MS4xOm5hbWVpZC1mb3JtYXQ6dW5zcGVjaWZpZWQiIC8+DQo8L3NhbWxwOkF1dGhuUmVxdWVzdD4=&RelayState=http://localhost:44316/saml

  4. SAML_Request包含base64编码的auth.request:

    <samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns="urn:oasis:names:tc:SAML:2.0:metadata" ID="F84D888AA3B44C1B844375A4E8210D9E" 
    Version="2.0" IsPassive="false" AssertionConsumerServiceURL="https://localhost:44316/saml">
    <Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion" /><samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified" /></samlp:AuthnRequest> 
    

    更新

    1. 测试通过SamlTool-Example
    2. 创建的SAML请求
    3. 每个Idp设置更新(entityId / Issuer)
    4. Deflate / Base64 / Url encoding
    5. B2C正确的查询字符串是?SAMLRequest = request ,而不是SAML_Request,如上所述
    6. 由于

0 个答案:

没有答案