stackabletech / stackabletech/opa-operator
OpaInfoFetcher missing/bad TLS config results in confusing error message
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Rust
- Star
- 21
- Fork
- 5
- Merge trung bình
- 12 giờ 44 phút
- Pull request đã merge (30 ngày)
- 11
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Không có tệp hoặc bài kiểm thử nào được nêu tên; hãy bắt đầu bằng cách xác định yêu cầu access-token của OpaInfoFetcher và phần xử lý TLS/lỗi của nó. Tái hiện với cấu hình Keycloak được hiển thị, sau đó xác minh rằng việc thiếu hoặc cấu hình trust webPki không chính xác sẽ tạo ra lỗi xác định được vấn đề TLS thay vì chỉ trả về HTTP 405.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- kubernetes, rust
- Lĩnh vực
- infrastructure, security
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 38/100