stackabletech / stackabletech/opa-operator

Active Directory: Support load-balanced LDAP servers

未关闭
#718 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

type/bug
主要语言
Rust
星标
21
派生
5
平均合并
12 小时 44 分钟
30 天内合并 PR
11

描述

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

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

未指定文件、测试或入口点。首先跟踪 krb5.conf 的生成以及 user-info-fetcher 的 LDAP/Kerberos 连接行为,然后使用受影响的 Stackable 25.3 设置复现 DNS 负载均衡。完成标准是负载均衡的 LDAP 身份验证能够正常工作,且不会重新引入与 Kubernetes PTR 相关的故障。

由索引模型根据 Issue 内容生成。

评估

技术栈
kubernetes
领域
authentication
Issue 类型
缺陷
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
20/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。