【问题标题】:Using KeyCloak Gateway in a K8S Cluster在 K8S 集群中使用 KeyCloak 网关
【发布时间】: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


    【解决方案1】:

    这最终证明是复制/粘贴失败,客户端密码不正确。错误消息在这里没有多大帮助,但至少它是一个简单的修复。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-01-06
      • 1970-01-01
      • 2020-08-11
      • 2022-08-13
      • 1970-01-01
      • 2018-08-23
      • 2018-10-18
      • 2021-07-15
      相关资源
      最近更新 更多