stackabletech / stackabletech/opa-operator
Active Directory: Support load-balanced LDAP servers
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ả
Affected Stackable version
25.3
Affected OpenPolicyAgent version
irrelevant, user-info-fetcher
Current and expected behavior
Currently, we don't support connecting to LDAP servers that are behind DNS-based load balancing, instead just returning a kind-of-useless "not found in Kerberos database" error.
This is because we disable krb5's DNS canonicalization. Normally, it does a "canonicalization dance" for each request. Let's say we try to connect to ldap-lb. That would then be resolved to 1.2.3.4, which is what we do a TCP connection to. Then it would do a reverse DNS (PTR) query for the IP address (1.2.3.4), which returns the hostname for that specific replica (ldap-1). Then it'd use that hostname to build the Kerberos principal that we validate against (ldap/ldap-1@CORP.COM).
We disable DNS canonicalization, because it causes other problems in K8s (K8s pods have inconsistent PTR results, which would cause other similar issues depending on the order returned...). That makes krb5 use the specified hostname for the principal instead (ldap/ldap-lb@CORP.COM). The LDAP server doesn't have that principal, so we fail to authenticate. (The actual "Kerberos database" error is because the Kerberos KDC doesn't have any registered principal with that name.)
Possible solution
I honestly don't know.
We can't just blanket-enable canonicalization, because of the aforementioned K8s issues. But we also need to handle this in some way. Maybe we'll need some flag on which krb5.conf to generate, but that feels like a slippery road to start walking.
Additional context
No response
Environment
No response
Would you like to work on fixing this bug?
None
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, bài kiểm thử hoặc điểm vào nào được nêu. Hãy bắt đầu bằng việc truy vết quá trình tạo krb5.conf và hành vi kết nối LDAP/Kerberos của user-info-fetcher, sau đó tái hiện việc cân bằng tải DNS với thiết lập Stackable 25.3 bị ảnh hưởng. Được xem là hoàn tất khi xác thực LDAP có cân bằng tải hoạt động mà không tái gây ra các lỗi liên quan đến PTR của Kubernetes.
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
- Lĩnh vực
- authentication
- Loại issue
- Lỗi
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 20/100