fe9b7c168b
All-in-one Dockerfile.openldap bundling the app + OpenLDAP + Redis in one container, plus an idempotent bare-metal install.sh, and a Jekyll docs site for GitHub Pages: - Dockerfile.openldap (node:20-alpine; openldap + pw-sha2/ppolicy/memberof/ refint; dumb-init PID 1; npm ci --omit=dev; tos.md copied to /). - docker-entrypoint.sh: generate slapd.conf (mdb + overlays + TLS + indexes + access), self-signed LDAPS cert, seed directory tree + required groups, bundled redis, export app_* config, exec node. - docker-compose.yml, .dockerignore, DEPLOYMENT.md, secrets.js.example. - install.sh: idempotent Debian/Ubuntu bare-metal installer (Node 20.x, OpenLDAP, Redis, systemd unit) with flags + --dry-run/--skip-ldap/--skip-app. - ops/ldif/: memberof/refint/tls/index/nodes/logging LDIFs. - nodejs/conf/base.js: generic defaults (dc=example,dc=com / localhost / SSO Manager) so per-deployment values move to secrets.js or app_* env. - nodejs/package.json: bump @simpleworkjs/conf to ^1.1.0 (app_* env overrides). - nodejs/routes/index.js: /health endpoint for healthchecks. - docs/: _config.yml + index/deployment/configuration/oauth/ldap pages (jekyll-theme-cayman) for GitHub Pages from /docs. Co-Authored-By: Claude <noreply@anthropic.com>
46 lines
1.4 KiB
JavaScript
46 lines
1.4 KiB
JavaScript
'use strict';
|
|
|
|
// Base configuration — generic defaults usable by anyone.
|
|
//
|
|
// These are NON-secret defaults. Per-deployment values (LDAP bind DN, user/group
|
|
// bases, SMTP host/user, OAuth issuer, sender address) should be overridden via
|
|
// conf/secrets.js or `app_*` environment variables (see @simpleworkjs/conf).
|
|
// Secret values (passwords, JWT secret, API keys) MUST come from secrets.js or
|
|
// `app_*` env vars — never commit them here.
|
|
module.exports = {
|
|
name: "SSO Manager", // displayed in the UI and outbound email
|
|
userModel: 'ldap', // pam, redis, ldap
|
|
redis: {
|
|
prefix: 'sso_manager_'
|
|
},
|
|
ldap: {
|
|
url: 'ldap://localhost',
|
|
bindDN: 'cn=admin,dc=example,dc=com',
|
|
bindPassword: '__in secrets file__',
|
|
userBase: 'ou=people,dc=example,dc=com',
|
|
groupBase: 'ou=groups,dc=example,dc=com',
|
|
userFilter: '(objectClass=posixAccount)',
|
|
userNameAttribute: 'uid'
|
|
},
|
|
oauth: {
|
|
issuer: '', // falls back to the request host at runtime (routes/index.js)
|
|
jwtSecret: '__in secrets file__',
|
|
token_lifetime: {
|
|
access_token: 3600, // 1 hour (seconds)
|
|
refresh_token: 2592000 // 30 days (seconds)
|
|
}
|
|
},
|
|
voipms: {
|
|
username: '__in secrets file__',
|
|
password: '__in secrets file__',
|
|
did: '__in secrets file__',
|
|
},
|
|
smtp: {
|
|
host: 'localhost',
|
|
port: 587,
|
|
secure: false,
|
|
user: 'noreply@example.com',
|
|
pass: '__in secrets file__',
|
|
from: 'SSO Manager <noreply@example.com>',
|
|
},
|
|
}; |