OpaInfoFetcher missing/bad TLS config results in confusing error message
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- kubernetes, rust
調査の方向性
ファイルもテストも指定されていないため、まず OpaInfoFetcher のアクセストークンリクエストと TLS/エラー処理を特定します。示されている Keycloak 設定で再現し、その後、webPki の trust が欠落しているか正しくない場合に、HTTP 405 だけではなく TLS の問題を特定するエラーが発生することを確認します。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Rust
- スター
- 21
- フォーク
- 5
- 平均マージ
- 12時間 44分
- マージ済み PR(30日)
- 11
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stackabletech/opa-operator のほかの issue
-
type/bug
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
stackabletech/opa-operator#823 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
stackabletech/opa-operator#766 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
stackabletech/opa-operator#733 ·
-
難易度 2/5 半日 初心者へのやさしさ 50/100
stackabletech/opa-operator#724 ·
-
type/bug
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
stackabletech/opa-operator#718 ·
stackabletech/opa-operator の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
issue
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
web-infra-dev/rspack#15847 ·