stackabletech / stackabletech/opa-operator
OpaInfoFetcher missing/bad TLS config results in confusing error message
还没有人认领这个 Issue。
- 主要语言
- Rust
- 星标
- 21
- 派生
- 5
- 平均合并
- 12 小时 44 分钟
- 30 天内合并 PR
- 11
描述
We moved from an on-prem Keycloak (16.0.1) to a managed keycloak (24.0.4) for a customer. It worked fine for basically all required products (Trino, Superset, Datahub etc.) but the OPA infofetcher was unhappy with just changing the endpoint and clientId / clientSecret.
user-info-fetcher 2024-12-05T11:52:15.473210Z WARN stackable_opa_user_info_fetcher: Error while processing request error=failed to get user information from Keycloak error.sources=[failed to get access_token, http response 405 for "https://foo.bar.de/realms/foobar/protocol/openid-connect/token" with response body "{\"error\":\"HTTP 405 Method Not Allowed\",\"error_description\":\"For more on this error consult the server log at the debug level.\"}"]
That was the error from the info fetcher. The get "access-token" call is 100% a POST HTTP call etc.
The managed Keycloak actually was complaining about (and receiving) a GET request.
This was very misleading, since the actual problem was missing the webPki trust.
userInfo:
backend:
keycloak:
hostname: "{{ .Values.keycloak }}"
clientCredentialsSecret: "opa-infofetcher-secret"
adminRealm: "foobar"
userRealm: "foobar"
tls:
verification:
server:
caCert:
webPki: {}
Since Trust/TLS this is a very common configuration mistake, i think the error messages should reflect this better.
Edit: Since this may depend on the (managed) keycloak server and setup, I did not check if i could reproduce this with other setups.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
未指定文件或测试;先定位 OpaInfoFetcher 的访问令牌请求及其 TLS/错误处理。使用所示的 Keycloak 配置重现,然后验证缺少 webPki trust 或 webPki trust 不正确时,会产生能够识别 TLS 问题的错误,而不只是 HTTP 405。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- kubernetes, rust
- 领域
- infrastructure, security
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100