【发布时间】:2018-12-10 14:30:24
【问题描述】:
我在本地成功运行 KeyCloak 网关,为 Kubernetes 仪表板提供 Google OIDC 身份验证。但是,当应用程序部署为集群本身的 pod 时,使用相同的设置会导致错误。
Gateway 在 K8S pod 中运行时看到的错误是:
unable to exchange code for access token {"error": "invalid_request: Credentials in post body and basic Authorization header do not match"}
我使用以下选项调用网关:
--enable-logging=true
--enable-self-signed-tls=true
--listen=:443
--upstream-url=https://mydashboard
--discovery-url=https://accounts.google.com
--client-id=<client id goes here>
--client-secret=<secret goes here>
--resources=uri=/*
将这些设置应用于 pod 中的容器后,我可以浏览到网关,重定向到 Google 进行登录,然后重定向回生成上述错误的网关。
在本地运行应用程序和在 pod 中运行会产生上述错误的区别是什么?
【问题讨论】:
标签: kubernetes keycloak-gatekeeper