v1.16.0: OpenBao as central secrets store + vault broker + UI rework
- Boot: bao-conf.init('sso-manager') replaces conf_manager; deep-merges
secret/sso-manager/conf over file config (fail-soft). Scoped VAULT_TOKEN
(policy sso-broker), never root.
- /api/vault reworked: middleware.auth -> scopeGuard -> token-injecting
proxy. vault_broker.js mints Redis-cached per-user (user-<uid>) /
per-admin (sso-admin) tokens via the sso-broker role; scopeGuard enforces
path prefix on top of the OpenBao policy. Client auth-token stripped.
- vault UI renamed (vaultwarden.ejs -> vault.ejs), /vault route auth-gated,
role-scoped: users see only secret/users/<uid>/, admins get free-form +
Apps mint tab (secret/apps/<name>/*, token shown once).
- api_conf.js writes via bao-conf.set('sso-manager', ...).
- Remediation: config/*-secrets.js untracked+gitignored, test_plugins.js
deleted, proxy-secrets.js.example placeholder added. Secrets remain in
git history; provider-side rotation is the real fix.
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
module.exports = {
|
||||
oidc: {
|
||||
clientId: '',
|
||||
clientSecret: '',
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
// Example proxy secrets file. theta-env generates a real ./config/proxy-secrets.js
|
||||
// from this shape at setup (with empty clientId/clientSecret), then bootstrap.js
|
||||
// writes the SSO-generated OAuth client creds into it AND into OpenBao
|
||||
// (secret/proxy/conf). The proxy loads it via @simpleworkjs/conf, then overlays
|
||||
// secret/proxy/conf from OpenBao via @simpleworkjs/bao-conf at boot.
|
||||
//
|
||||
// The real file is gitignored (config/*-secrets.js) — never commit live creds.
|
||||
// This .example is tracked to document the expected shape only.
|
||||
module.exports = {
|
||||
oidc: {
|
||||
// The SSO registers the proxy as an OAuth client and writes the real
|
||||
// values here (and into OpenBao). "set-me" is the bootstrap placeholder.
|
||||
clientId: 'set-me',
|
||||
clientSecret: 'set-me',
|
||||
},
|
||||
};
|
||||
@@ -1,35 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
// Local per-deployment configuration for this Theta42 instance.
|
||||
// This file is gitignored — it contains real secrets and per-deployment
|
||||
// values. The committed conf/base.js now ships generic defaults
|
||||
// (example.com / localhost); the theta42-specific non-secret values that
|
||||
// used to live in base.js have been migrated here so this instance keeps
|
||||
// working. New deployments should put their own values here or in app_* env.
|
||||
module.exports = {
|
||||
port: 3001,
|
||||
name: 'Theta42 SSO',
|
||||
ldap: {
|
||||
url: 'ldap://10.2.0.54',
|
||||
bindDN: 'cn=admin,dc=theta42,dc=com',
|
||||
bindPassword: 'Tomisgaypalm7',
|
||||
userBase: 'ou=people,dc=theta42,dc=com',
|
||||
groupBase: 'ou=groups,dc=theta42,dc=com',
|
||||
},
|
||||
smtp: {
|
||||
host: 'mail.wgnode.com',
|
||||
user: 'noreply@users.theta42.com',
|
||||
// user: '',
|
||||
pass: 'ZxAsQw!2',
|
||||
from: 'Theta42 Accounts <noreply@users.theta42.com>',
|
||||
},
|
||||
voipms: {
|
||||
username: 'wmantly@gmail.com',
|
||||
password: 'EMjQvAuHhD!d5dm',
|
||||
did: '9297353350',
|
||||
},
|
||||
oauth: {
|
||||
issuer: 'https://sso.theta42.com',
|
||||
jwtSecret: '09e2501a1c93aef4d5d713c7db17c800c6d7d6f5f9e9cf2efbdfa37549021bf9',
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user