Merge pull request #81 from theta42/feature/seed-ldap-openresty
Also seed OpenLDAP and OpenResty services in the directory
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ for what changed inside the apps it composes.
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- The bootstrap now seeds the SSO directory with the stack's own resources: a site (from the configured domain), a "Stack host", and the SSO Manager + Proxy services (with their public URLs in metadata), linking the proxy's auto-registered OAuth client under its service. The Directory page is populated out of the box instead of starting empty. Idempotent — resources whose slug already exists are operator-owned and never touched, and a seed failure only warns (never fails a bring-up, e.g. against an older sso-manager image without `/api/directory`).
|
||||
- The bootstrap now seeds the SSO directory with the stack's own resources: a site (from the configured domain), a "Stack host", and the SSO Manager + Proxy services (with their public URLs in metadata), linking the proxy's auto-registered OAuth client under its service. Also seeds the two non-obvious services the stack runs: the OpenLDAP directory (advertising the `ldaps://` endpoint legacy apps bind to, honoring `ldap.ldapsHost`) and the OpenResty edge (the 80/443 data plane every hostname flows through, with a wildcard `https://*.<domain>` address). The Directory page is populated out of the box instead of starting empty. Idempotent — resources whose slug already exists are operator-owned and never touched, and a seed failure only warns (never fails a bring-up, e.g. against an older sso-manager image without `/api/directory`).
|
||||
|
||||
## [1.3.3] - 2026-07-23
|
||||
|
||||
|
||||
Vendored
+16
@@ -324,7 +324,23 @@ async function seedDirectory(token, clientId) {
|
||||
const site = await ensure('site', ORG, slugify(DOMAIN || ORG), null, {});
|
||||
const host = await ensure('host', 'Stack host', 'stack-host', site.id, {});
|
||||
await ensure('service', 'SSO Manager', 'sso-manager', host.id, { address: `https://${SSO_HOST}` });
|
||||
// Proxy = the node management UI; OpenResty = the data plane every hostname
|
||||
// in the stack actually flows through (80/443). Two faces, two entries.
|
||||
const psvc = await ensure('service', 'Proxy', 'proxy', host.id, { address: `https://${PROXY_HOST}` });
|
||||
// OpenLDAP is independently consumed (direct LDAPS binds for legacy apps —
|
||||
// see the SSO's /integrations page), so it gets its own entry. Advertise
|
||||
// the operator-configured LDAPS hostname when set, else the SSO host.
|
||||
const LDAPS_HOST = (sso.ldap && sso.ldap.ldapsHost) || SSO_HOST;
|
||||
await ensure('service', 'OpenLDAP Directory', 'openldap', host.id, {
|
||||
address: `ldaps://${LDAPS_HOST}:636`,
|
||||
subType: 'openldap',
|
||||
});
|
||||
// Wildcard address: OpenResty fronts every host under the domain (same
|
||||
// */** wildcard convention the proxy's Host records use).
|
||||
await ensure('service', 'OpenResty Edge', 'openresty', host.id, {
|
||||
address: DOMAIN ? `https://*.${DOMAIN}` : `https://${PROXY_HOST}`,
|
||||
subType: 'openresty',
|
||||
});
|
||||
|
||||
// Link the proxy's OAuth client (Resource-backed since sso-manager 1.3.0)
|
||||
// under its service, if it appears in the directory and isn't linked yet.
|
||||
|
||||
Reference in New Issue
Block a user