0

我有一个通过 oauth2-proxy 连接到 Keycloak 的应用程序,通常一切都运行良好。

只是有时我在 oauth2-proxy 日志文件中看到以下错误:

unable to redeem refresh token: failed to get token: oauth2: cannot fetch token: 400 Bad Request 
Response: {"error":"invalid_grant","error_description":"Session doesn't have required client"},
removing session.

Keycloak 日志文件中的相应消息是这样的:

org.keycloak.events
type=REFRESH_TOKEN_ERROR, realmId=xxx, clientId=xxx, userId=f:ce9d954a-de51-48a4-a70b-xxx:xxx, ipAddress=x.x.x.x, error=invalid_token, grant_type=refresh_token, refresh_token_type=Refresh, refresh_token_id=bb77d7aa-c061-45d4-b2f7-fe938d5537cb, client_auth_method=client-secret

我在例如“会话没有必需的客户端”是什么意思中发现了相同的错误消息?但是当我使用最新的 16.1.1 时,这个问题是针对 Keycloak 4.x 的。此外,我不使用记住我的会话。

源代码仅在 oidc/TokenManager.java 中包含此消息,其中建议存在“跨 dc 环境”的问题,但我们没有跨数据中心环境,只有三个实例在同一个 Kubernetes 命名空间中安装了最新的 Helm 图表。

还有什么可能导致这个问题?

4

0 回答 0