From 28025847d098cba1ca9715be667792200badd970 Mon Sep 17 00:00:00 2001 From: William Mantly Date: Tue, 4 Aug 2026 23:28:58 -0400 Subject: [PATCH] fix: LDAP enrollment uses localhost (not the public domain); align SSH access groups; roll up ldap-client v1.24.0 (v1.38.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - setup.sh: ldap_host defaults to localhost (the public sso. can't reach the 389/636 LDAP ports through NAT); overridable via CFG_LDAPS_HOST - ldap.vars access groups + ldap-client sssd filter now reference the SSO group model (site__hosts_access, site__host__access, god_admin) - GROUPS.md §5/§8 updated to the corrected naming - gitlink: ldap-client ebaac18 (v1.24.0) --- CHANGELOG.md | 6 ++++++ docs/GROUPS.md | 8 ++++---- ldap-client | 2 +- setup.sh | 13 ++++++++++--- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6590401..1b1b634 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ orchestration code; see each submodule's own `CHANGELOG.md` [sso-manager-node](https://github.com/theta42/sso-manager-node/blob/master/CHANGELOG.md)) for what changed inside the apps it composes. +## [v1.38.0] - 2026-08-04 + +### Fixed +- **LDAP enrollment no longer reaches for the public domain** — `setup.sh` generated `ldap.vars` with `ldap_host` defaulting to the public SSO host (`sso.`), which the NAT/firewall blocks on the LDAP ports (389/636). It now defaults to `localhost` (the LDAP server is co-located on the stack host; `ldap_tls_reqcert=never` makes this safe), overridable with `CFG_LDAPS_HOST` for an internal hostname/IP. +- **SSH access groups match the SSO group model** (ldap-client v1.24.0) — the generated `sssd.conf` access filter and `ldap-ssh-key.sh` referenced the legacy names (`_access`, `app_super_admin`); they now use `site__hosts_access` (all-hosts aggregate), `site__host__access`, and `god_admin`. GROUPS.md §8's example updated to match. + ## [v1.37.0] - 2026-08-04 ### Changed diff --git a/docs/GROUPS.md b/docs/GROUPS.md index fa0adcc..762901a 100644 --- a/docs/GROUPS.md +++ b/docs/GROUPS.md @@ -232,12 +232,12 @@ Key ideas: A host should import its **own** resource groups (plus any explicitly granted ones). Because the schema is predictable, `ldap-client` can generate the per-host `ldap_group_search_filter` from the enrolled host's identity, e.g. a host `web01` -at site `main-office` imports: +at site `main-office` (site resource slug `site_main-office`) imports: ``` -(&(objectClass=groupOfNames)(|(cn=main-office_host_web01_access) - (cn=main-office_host_web01_admin) - (cn=main-office_host_web01_sudo))) +(&(objectClass=groupOfNames)(|(cn=site_main-office_host_web01_access) + (cn=site_main-office_host_web01_admin) + (cn=site_main-office_host_web01_sudo))) ``` So the operator (or ldap-client) selects a small allowlist of the host's `_access` diff --git a/ldap-client b/ldap-client index 31d8fa1..ebaac18 160000 --- a/ldap-client +++ b/ldap-client @@ -1 +1 @@ -Subproject commit 31d8fa1229e03d9f3176e554833fa483c02a40a9 +Subproject commit ebaac181bcf49ae8b8a4cdf8af419a7d6e39e698 diff --git a/setup.sh b/setup.sh index 1e508e0..398a3d6 100755 --- a/setup.sh +++ b/setup.sh @@ -1288,8 +1288,13 @@ if [[ "$CFG_THETA_AGENT_ENABLE" == "1" ]] && [[ -x /usr/local/bin/theta-agent ]] ldap_site="${CFG_SITE_NAME:-$(sso_secrets_get siteName)}" ldap_bind_pass="${CFG_SVC_PASS:-$(sso_secrets_get_top serviceAccountPass)}" sso_host="${CFG_SSO_HOST:-$(sso_secrets_get ssoHost)}" - ldaps_host="${CFG_LDAPS_HOST:-}" - [[ -n "$ldaps_host" ]] || ldaps_host="${sso_host:-}" + # The LDAP server is co-located with the stack on THIS host, so the + # host must reach it over the loopback / a local address -- NEVER the + # public domain (sso.), which cannot route back to the 389/636 + # ports through NAT. localhost is fine because the generated sssd.conf + # sets ldap_tls_reqcert=never (hostname verification is off). An + # operator may override with CFG_LDAPS_HOST (an internal hostname/IP). + ldaps_host="${CFG_LDAPS_HOST:-localhost}" cat > ldap-client/ldap.vars <