0

目前,我正在尝试将我的 Google Cloud 组织设置为使用 Keycloak 接受来自 SSO 的登录。我在设置过程中遵循了 Keycloak 和 Google 的文档,但设置不起作用。有人可以确认客户端配置是否设置正确吗?每当我在 keycloak 中使用我的测试 keycloak 用户登录到 keycloak 时,我都会被重定向到 google 身份验证页面,并且从那里 keycloak 超出了身份验证。当我尝试从 Google 帐户登录页面登录时,我无法重定向到 sso,因此基本上 Keycloak 和 Google 之间的连接无法正常工作。

Client Setup

Client ID - google.com/a/gcp-test2.com
Name - gcp-test2.com

Enabled ON
Consent Required OFF
Client Protocol - saml
Include AuthnStatement - ON
Include OneTimeUse Condition - OFF
Sign Documents - ON
Sign Assertions  - ON
Signature Algorithm -RSA_SHA512
Force POST Binding - ON
Front Channel Logout - ON
Force Name ID Format - ON
Name ID Format - email
Root URL - empty
Valid Redirect URIs - empty
Base URL  - /auth/realms/gcp-test2.com/protocol/saml/clients/gcp-test2.com?RelayState=true
Master SAML Processing URL - https://google.com/a/gcp-test2.com
IDP Initiated SSO URL Name - gcp-test2.com
Target IDP initiated SSO URL: https://fqdn/auth/realms/gcp-test2.com/protocol/saml/clients/gcp-test2.com
Assertion Consumer Service POST Binding URL  - https://google.com/a/gcp-test2.com


SSO config on GCP side:
Login URL: https://fqdn/auth/realms/gcp-test2.com/protocol/saml/clients/gcp-test2.com?RelayState=true
Logout URL: https://fqdn/auth/
Use a domain-specific issuer - checked
Certificate is the one from the REALM certificate with public key.
4

2 回答 2

0

https://cloud.google.com/architecture/identity/keycloak-single-sign-on记录了如何做到这一点,它对我有用。如蓝色所示:

注意:要使 SAML 联合工作,客户端 ID 必须是 google.com。

因此,将您的客户 ID 更改为 google.com.* 。

我不知道你为什么使用 RelayState,我没有看到提到。按照文档进行精确设置,它应该可以工作。

于 2021-10-09T07:26:13.370 回答
0

这个 :

断言消费者服务 POST 绑定 URL -

https://google.com/a/gcp-test2.com

应该指向

https://google.com/a/gcp-test2.com/acs
于 2020-09-10T06:38:20.490 回答