KeyCloak 作为 Salesforce SP 的 IDP - SP 发起的 SSO 不工作

KeyCloak as IDP to Salesforce SP - SP initiated SSO not working

我是 KeyCloak 的新手,正在尝试将其配置为 SalesForce 客户端的 SAML IDP。 IDP 启动的 SSO 流程运行良好。我被正确定向到 Salesforce 主页 post- 身份验证。但是,SP 启动的 SSO 给了我一个 JSON 输出而不是 Keycloak 登录页面。

这是 SalesForce 重定向到的 URL(掩码 IP): http://10.99.xxx.xxx:8080/auth/realms/test?SAMLRequest=... SAML 跟踪器指示有效的 SAML 身份验证请求。

<?xml version="1.0" encoding="UTF-8"?>
<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
                    AssertionConsumerServiceURL="https://f-corpcont--dev.my.salesforce.com?so=00D3K000000lOS"
                    Destination="http://10.99.xxx.xxx:8080/auth/realms/test"
                    ID="_2CAAAAXJxZQlkME8wswMDAwMDAwMDA2AAAA3kJle3T1o4lEOE9QztKYIVXwLjlHOcfEaw-7mLWvYqmEiPv5SS32lT0WcQIbjXTP-qO779xPjACwqlhiGs9ZM8ZmltHZd6stzimY1Br3b1_5PqBgWxExV7R1FAAxZ914_3s8rViWWGxmKKGFN94OG2WBh3SMPF3WwGagDIZLRKtSpcGIDCGkuYERb_DR0LgOflx-C0kF7XqKdtU8OTTbk0HpoCKQ8oRh58Mai1eFlqgKf50rdGsFQmCQa-Sg0-JyZg"
                    IssueInstant="2020-05-04T19:39:22.807Z"
                    ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
                    Version="2.0">
  <saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">https://f-corpcont--dev.my.salesforce.com</saml:Issuer>
</samlp:AuthnRequest>

我在浏览器中看到的 JSON 输出是:

{
    "realm": "test",
    "public_key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqHobhU5mQ2itvVfkDWm64sLgT9dfoCNm137ul+A7YRNSXk5g0JEGxoZLVdicRQUx0mr4z6BEM+LN/mztSsigG0aQIqUY8y1un33kBk5gE6W3jaFDX6Rsap/lcXIoO7Jl/pzjAxf3R8RyMMhFQ4Hi1rHl2wSXMWfeNLaoLrzy+LEG1KNZpfhbfG1HUa5fEYpI0sSWEEgcP3faEy2JWOJrfJrcS1tezDD+7x4u+fTUJt0M8vsIjMDAX9UUu+JXnG901a15drj9UjYJyiMJTFQt3Rdrxv96XZa93fKyB36an5GDZWPiwEehtjAJ4mQ0oo0v/TmevoJwZd7YTvClQIDAQAB",
    "token-service": "http://10.99.xxx.xxx:8080/auth/realms/test/protocol/openid-connect",
    "account-service": "http://10.99.xxx.xxx:8080/auth/realms/test/account",
    "tokens-not-before": 0
}

如有指点,将不胜感激

您使用了错误的 URL SAML 请求。错误:

http://10.99.xxx.xxx:8080/auth/realms/test?SAMLRequest=

正确:

http://10.99.xxx.xxx:8080/auth/realms/test/protocol/saml?SAMLRequest=