diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c32282..b5133fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,14 @@ for what changed inside the apps it composes. ## [Unreleased] +## [1.15.0] - 2026-07-28 + +### Fixed +- **sso-manager's Directory data (every site/host/service/oauth-client resource and their relationships/LDAP-group associations) had no persistent volume** — `@simpleworkjs/orm` fell back to `./config/inventory.sqlite` (relative to the app's `/app` cwd) whenever `conf.orm` wasn't set, which sits in the container's ephemeral writable layer, not any mounted volume. Every container recreate (`docker compose up --build`, `down`/`up`, an image rebuild) silently wiped the entire Directory Management page. `setup.sh`'s generated `sso-secrets.js` (and the example template) now set `orm: { dialect: 'sqlite', storage: '/data/inventory.sqlite' }`, co-locating it with the already-persisted `sso-data` volume (where Redis lives). **Existing deployments**: this repo doesn't rewrite an operator's existing `config/sso-secrets.js` (re-running `setup.sh` leaves it untouched by design) — add the `orm` block above manually, and copy the container's current `/app/config/inventory.sqlite` to `/data/inventory.sqlite` *before* recreating the container, or the existing Directory data will be lost on the next recreate instead of migrated. + +### Bumped +- sso-manager-node -> [v1.8.0](https://github.com/theta42/sso-manager-node/releases/tag/v1.8.0) + ## [1.14.0] - 2026-07-28 ### Fixed diff --git a/config.example/sso-secrets.js.example b/config.example/sso-secrets.js.example index a39e288..32c36cc 100644 --- a/config.example/sso-secrets.js.example +++ b/config.example/sso-secrets.js.example @@ -30,6 +30,16 @@ module.exports = { jwtSecret: 'CHANGE-ME', // signs all tokens — keep secret token_lifetime: { access_token: 3600, refresh_token: 2592000 }, }, + // Without this, @simpleworkjs/orm falls back to './config/inventory.sqlite' + // (relative to the app's /app cwd) -- inside the container's ephemeral + // layer, not any mounted volume, so every Resource/site/host/service/oauth + // row (the whole Directory Management page) would be silently wiped on + // every container recreate. /data is already a persisted volume (Redis + // lives there too), so this just co-locates the sqlite file with it. + orm: { + dialect: 'sqlite', + storage: '/data/inventory.sqlite', + }, // ── Orchestrator-only (ignored by the app; read by setup.sh + bootstrap) ── stack: { diff --git a/setup.sh b/setup.sh index 37d5a22..c7e0270 100755 --- a/setup.sh +++ b/setup.sh @@ -292,6 +292,16 @@ module.exports = { jwtSecret: $(js_str "$CFG_JWT_SECRET"), token_lifetime: { access_token: 3600, refresh_token: 2592000 }, }, + // Without this, @simpleworkjs/orm falls back to './config/inventory.sqlite' + // relative to the app's /app cwd -- inside the container's ephemeral layer, + // not any mounted volume -- so every Resource/site/host/service/oauth row + // (the whole Directory Management page) would be silently wiped on every + // container recreate. /data is already a persisted volume (Redis lives + // there too), so this just co-locates the sqlite file with it. + orm: { + dialect: 'sqlite', + storage: '/data/inventory.sqlite', + }, // ── Orchestrator-only (ignored by the app) ─────────────────────────────── stack: { diff --git a/sso-manager-node b/sso-manager-node index 6988383..782ef69 160000 --- a/sso-manager-node +++ b/sso-manager-node @@ -1 +1 @@ -Subproject commit 69883836e1f4c46b246ff26bd5d29fe272db54d7 +Subproject commit 782ef69fb8865e002f249c02ac421dafa3f7f95b