Files
term_portal/express/config/keys.js
T

33 lines
1.8 KiB
JavaScript

module.exports = {
isBehindProxy: process.env.IS_BEHIND_PROXY === 'true',
secret: process.env.SECRET,
cookiesSecure: process.env.COOKIES_SECURE === 'true',
smtpHost: process.env.SMTP_HOST,
smtpPort: process.env.SMTP_PORT,
smtpUser: process.env.SMTP_USER,
smtpPassword: process.env.SMTP_PASSWORD,
smtpSecure: process.env.SMTP_SECURE === 'true',
smtpRequireTls: process.env.SMTP_REQUIRE_TLS === 'true',
smtpAllowInvalidCerts: process.env.SMTP_TLS_ALLOW_INVALID_CERTS === 'true',
smtpFrom: process.env.SMTP_FROM,
origin: process.env.ORIGIN,
portalAdminInitialEmail: process.env.PORTAL_ADMIN_INITIAL_EMAIL,
portalAdminInitialPassword: process.env.PORTAL_ADMIN_INITIAL_PASSWORD,
extractionApiOrigin: process.env.EXTRACTION_API_ORIGIN,
oidcUniLjClientId: process.env.OIDC_UNI_LJ_CLIENT_ID,
oidcUniLjClientSecret: process.env.OIDC_UNI_LJ_CLIENT_SECRET,
// Server-to-server discovery URL (internal `authentik-server:9000` host in dev; the one real
// public University of Ljubljana discovery URL in staging/prod - there is no internal/external
// split there).
oidcUniLjDiscoveryUrl: process.env.OIDC_UNI_LJ_DISCOVERY_URL,
// Optional. When set, overrides the *origin* (scheme+host+port) of the authorization_endpoint
// used to build the browser-facing redirect, without touching the endpoint discovered/used for
// server-to-server calls (token/JWKS/userinfo). Needed only in dev, where the browser can reach
// Authentik solely via `localhost:9000` while the express container can reach it only via the
// compose-internal `authentik-server:9000` hostname. Left unset (no-op) in staging/prod, where
// the University of Ljubljana's discovery document is presumed to be a single publicly-reachable
// URL.
oidcUniLjAuthorizationExternalOrigin:
process.env.OIDC_UNI_LJ_AUTHORIZATION_EXTERNAL_ORIGIN || null
}