Skip to main content

Environment Variables

EUDIPLO is configured primarily through environment variables. This page documents all available configuration options organized by functional area.

Quick Reference

The complete environment variable reference is organized into the following sections:

  • Authentication — OAuth client credentials and token validation
  • Configuration — File-based tenant configuration import
  • Cryptography — Key generation and cryptographic defaults
  • Database — Database connection and type selection
  • Encryption — At-rest encryption for database-backed keys
  • General — Public URL, CORS, and operational settings
  • Issuer — Credential issuance flow defaults
  • Logging — Log level and structured logging
  • Observability — OpenTelemetry tracing configuration
  • Session — Session cleanup and retention policies
  • Status — Status list configuration
  • Storage — File storage provider (local/S3)
  • Verifier — Presentation verification defaults
  • Webhook — Outbound webhook security policies

Authentication

Auto-generated. Do not edit manually. Run pnpm --filter @eudiplo/docs run prebuild (scripts/generate-config-docs.ts).

KeyTypeNotes
OIDCstringEnable OIDC mode
OIDC_INTERNAL_ISSUER_URLstringInternal issuer URL in OIDC mode [when OIDC is set → then default=undefined]
OIDC_CLIENT_IDanyClient ID for OIDC [when OIDC is set → then required]
OIDC_CLIENT_SECRETanyClient secret for OIDC [when OIDC is set → then required]
OIDC_SUBanyClaim to use as subject [when OIDC is set → then default="tenant_id"]
OIDC_ALGORITHManyExpected JWT alg [when OIDC is set → then default="RS256"]
MASTER_SECRETanyMaster secret for JWT signing and encryption key derivation - required, minimum 32 characters [when OIDC is set → otherwise required]
JWT_ISSUERanyLocal JWT issuer [when OIDC is set → otherwise default="eudiplo-service"]
JWT_EXPIRES_INanyLocal JWT expiration [when OIDC is set → otherwise default="24h"]
AUTH_CLIENT_SECRETanyClient secret (local auth). In OIDC mode, optional bootstrap secret used to create/update a Keycloak admin/root client when AUTH_CLIENT_ID is also set [when OIDC is set → otherwise required]
AUTH_CLIENT_IDanyClient ID (local auth). In OIDC mode, optional bootstrap client ID used to create/update a Keycloak admin/root client when AUTH_CLIENT_SECRET is also set [when OIDC is set → otherwise required]
OIDC_UI_CLIENT_IDanyPublic client ID for the Angular UI in OIDC mode. Used to register a public Keycloak client for Authorization Code + PKCE login. [when OIDC is set → then default="eudiplo-ui"]

Configuration

Auto-generated. Do not edit manually. Run pnpm --filter @eudiplo/docs run prebuild (scripts/generate-config-docs.ts).

KeyTypeNotes
CONFIG_IMPORT_MODEstringStartup configuration reconciliation mode. Replaces CONFIG_IMPORT and CONFIG_IMPORT_FORCE.
CONFIG_IMPORTbooleanDeprecated: enable startup config import when CONFIG_IMPORT_MODE is unset (default: false)
CONFIG_IMPORT_FORCEbooleanDeprecated: select upsert instead of create when CONFIG_IMPORT_MODE is unset (default: false)
CONFIG_FOLDERstringPath to config import folder (default: /path/to/config/folder)
CONFIG_VARIABLE_STRICTalternativesStrict mode for config import. (default: skip)

Cryptography

Auto-generated. Do not edit manually. Run pnpm --filter @eudiplo/docs run prebuild (scripts/generate-config-docs.ts).

KeyTypeNotes
CRYPTO_ALGstringThe signing algorithm to use (default: ES256)
CRYPTO_TOLERANCEnumberClock tolerance in seconds for JWT verification (default: 5)

Database

Auto-generated. Do not edit manually. Run pnpm --filter @eudiplo/docs run prebuild (scripts/generate-config-docs.ts).

KeyTypeNotes
DB_TYPEstringDatabase type (default: sqlite)
DB_HOSTstringDatabase host [when DB_TYPE is {"override":true} | "sqlite" → otherwise required]
DB_PORTnumberDatabase port [when DB_TYPE is {"override":true} | "sqlite" → otherwise required]
DB_USERNAMEstringDatabase username [when DB_TYPE is {"override":true} | "sqlite" → otherwise required]
DB_PASSWORDstringDatabase password [when DB_TYPE is {"override":true} | "sqlite" → otherwise required]
DB_DATABASEstringDatabase name [when DB_TYPE is {"override":true} | "sqlite" → otherwise required]
DB_SSLbooleanEnable SSL/TLS for PostgreSQL database connections (default: false)
DB_SSL_REJECT_UNAUTHORIZEDbooleanReject PostgreSQL TLS certificates that cannot be validated against trusted CAs (default: true)
DB_SSL_CA_PATHstringPath to CA certificate file used to validate PostgreSQL TLS certificates [optional]
DB_SSL_CERT_PATHstringPath to client certificate file for PostgreSQL TLS [optional]
DB_SSL_KEY_PATHstringPath to client private key file for PostgreSQL TLS [optional]
DB_SSL_KEY_PASSPHRASEstringPassphrase for encrypted DB_SSL_KEY_PATH private key [optional]
DB_SYNCHRONIZEbooleanEnable TypeORM schema synchronization. Set to false in production after initial setup and rely on migrations instead. (default: true)
DB_MIGRATIONS_RUNbooleanRun pending database migrations automatically on startup (default: true)

Encryption

Auto-generated. Do not edit manually. Run pnpm --filter @eudiplo/docs run prebuild (scripts/generate-config-docs.ts).

KeyTypeNotes
ENCRYPTION_KEY_SOURCEstringSource for encryption key: env (dev), vault/aws/azure (prod - key only in RAM) (default: env)
VAULT_ENCRYPTION_KEY_PATHstringPath to encryption key in Vault KV secrets engine [when ENCRYPTION_KEY_SOURCE is {"override":true} | "vault" → then default="secret/data/eudiplo/encryption-key"]
AWS_ENCRYPTION_SECRET_NAMEstringName of the encryption key secret in AWS Secrets Manager [when ENCRYPTION_KEY_SOURCE is {"override":true} | "aws" → then required]
AWS_ENCRYPTION_SECRET_KEYstringJSON key within the AWS secret (if secret is JSON) [when ENCRYPTION_KEY_SOURCE is {"override":true} | "aws" → then default="key"]
AZURE_KEYVAULT_URLstringAzure Key Vault URL (e.g., https://myvault.vault.azure.net) [when ENCRYPTION_KEY_SOURCE is {"override":true} | "azure" → then required]
AZURE_ENCRYPTION_SECRET_NAMEstringName of the encryption key secret in Azure Key Vault [when ENCRYPTION_KEY_SOURCE is {"override":true} | "azure" → then required]

General

Auto-generated. Do not edit manually. Run pnpm --filter @eudiplo/docs run prebuild (scripts/generate-config-docs.ts).

KeyTypeNotes
FOLDERstringRoot working folder for temp files (default: ../../tmp)
PUBLIC_URLstringThe public URL of the issuer (default: http://localhost:3000)

Issuer

Auto-generated. Do not edit manually. Run pnpm --filter @eudiplo/docs run prebuild (scripts/generate-config-docs.ts).

KeyTypeNotes
ISSUER_MULTI_CONSUMPTIONbooleanEnable or disable multi-consumption for the issuer (default: false)

Logging

Auto-generated. Do not edit manually. Run pnpm --filter @eudiplo/docs run prebuild (scripts/generate-config-docs.ts).

KeyTypeNotes
LOG_LEVELstringApplication log level (default: debug)
LOG_ENABLE_HTTP_LOGGERbooleanEnable HTTP request logging (default: false)
LOG_HTTP_RESPONSE_BODYbooleanCapture and log HTTP response bodies (buffered up to LOG_HTTP_RESPONSE_BODY_MAX_LENGTH bytes). Disabled by default because response bodies may contain access tokens, credentials, or other sensitive data. (default: false)
LOG_HTTP_RESPONSE_BODY_MAX_LENGTHnumberMaximum number of bytes to capture for HTTP response bodies. Set to 0 to disable truncation. (default: 4096)
LOG_REDACT_SENSITIVE_DATAbooleanRedact sensitive request/response fields from logs. Disable only for debugging. (default: true)
LOG_ENABLE_SESSION_LOGGERbooleanEnable session flow logging (default: false)
LOG_SESSION_STOREstringControls whether session log entries are persisted to the database. 'off' disables storage, 'errors' stores only warn/error entries, 'all' stores everything, 'verbose' stores everything including full request/response bodies and error stacks. (default: off)
LOG_TO_FILEbooleanEnable logging to file in addition to console (default: false)
LOG_FILE_PATHstringFile path for log output when LOG_TO_FILE is enabled (default: ./logs/session.log)
AUDIT_LOG_RETENTION_DAYSnumberDelete tenant activity audit log entries older than N days. Set to 0 to disable time-based pruning. (default: 0)
OTEL_SDK_DISABLEDbooleanDisable OpenTelemetry SDK (and OTel log forwarding) (default: false)
AUDIT_LOG_MAX_ENTRIES_PER_TENANTnumberKeep only the newest N tenant activity audit log entries per tenant. Set to 0 to disable count-based pruning. (default: 0)

Observability

Auto-generated. Do not edit manually. Run pnpm --filter @eudiplo/docs run prebuild (scripts/generate-config-docs.ts).

KeyTypeNotes
GRAFANA_URLstringBase URL of the Grafana instance for deep linking from the dashboard UI [optional]
GRAFANA_DATASOURCE_TEMPO_UIDstringUID of the Tempo data source in Grafana (default: tempo)
GRAFANA_DATASOURCE_LOKI_UIDstringUID of the Loki data source in Grafana (default: loki)

Session

Auto-generated. Do not edit manually. Run pnpm --filter @eudiplo/docs run prebuild (scripts/generate-config-docs.ts).

KeyTypeNotes
SESSION_TIDY_UP_INTERVALnumberInterval in seconds to run session tidy up (default: 3600)
SESSION_TTLnumberDefault time to live for sessions in seconds. Can be overridden per tenant. (default: 86400)
SESSION_CLEANUP_MODEstringDefault cleanup mode when sessions expire. 'full' deletes the entire session, 'anonymize' keeps metadata but removes personal data. Can be overridden per tenant. (default: full)

Status

Auto-generated. Do not edit manually. Run pnpm --filter @eudiplo/docs run prebuild (scripts/generate-config-docs.ts).

KeyTypeNotes
STATUS_CAPACITYnumberThe default capacity of the status list. Can be overridden per tenant. (default: 10000)
STATUS_BITSnumberThe default number of bits used per status entry. Can be overridden per tenant. (default: 1)
STATUS_TTLnumberThe default TTL in seconds for status list JWTs. Verifiers can cache the JWT until expiration. Can be overridden per tenant. (default: 3600)
STATUS_IMMEDIATE_UPDATEbooleanIf true, regenerate status list JWT immediately on every status change. If false (default), use lazy regeneration when TTL expires. Can be overridden per tenant. (default: false)
STATUS_ENABLE_AGGREGATIONbooleanIf true (default), include aggregation_uri in status list JWTs. This allows relying parties to pre-fetch all status lists for offline validation per RFC draft-ietf-oauth-status-list Section 9. Can be overridden per tenant. (default: true)

Storage

Auto-generated. Do not edit manually. Run pnpm --filter @eudiplo/docs run prebuild (scripts/generate-config-docs.ts).

KeyTypeNotes
STORAGE_DRIVERstringThe storage driver to use (default: local)
LOCAL_STORAGE_DIRstringThe directory to store files in when using local storage [when STORAGE_DRIVER is {"override":true} | "local" → then default=undefined]
S3_REGIONstringThe AWS region for the S3 bucket [when STORAGE_DRIVER is {"override":true} | "s3" → then required]
S3_BUCKETstringThe name of the S3 bucket [when STORAGE_DRIVER is {"override":true} | "s3" → then required]
S3_ACCESS_KEY_IDstringThe access key ID for the S3 bucket [when STORAGE_DRIVER is {"override":true} | "s3" → then required]
S3_SECRET_ACCESS_KEYstringThe secret access key for the S3 bucket [when STORAGE_DRIVER is {"override":true} | "s3" → then required]
S3_ENDPOINTstringThe endpoint URL for the S3 service (for S3-compatible services) [when STORAGE_DRIVER is {"override":true} | "s3"]
S3_FORCE_PATH_STYLEbooleanWhether to force path-style URLs for S3 [when STORAGE_DRIVER is {"override":true} | "s3" → then default=false]

Verifier

Auto-generated. Do not edit manually. Run pnpm --filter @eudiplo/docs run prebuild (scripts/generate-config-docs.ts).

KeyTypeNotes
VP_REMOVE_TAbooleanIf true, strip trusted_authorities from the DCQL query sent to wallets in OID4VP authorization requests. Use this as an escape hatch for wallets that do not yet handle trusted_authorities correctly. (default: false)

Webhook

Auto-generated. Do not edit manually. Run pnpm --filter @eudiplo/docs run prebuild (scripts/generate-config-docs.ts).

KeyTypeNotes
OUTBOUND_URL_ALLOW_HTTPbooleanAllow HTTP (non-TLS) for outbound webhook calls [optional]
OUTBOUND_URL_ALLOW_PRIVATE_NETWORKbooleanAllow outbound webhook calls to private, loopback, or link-local IP ranges [optional]
OUTBOUND_URL_ALLOWED_HOSTSstringComma-separated hostname allowlist for outbound webhook calls (supports exact host and subdomains) [optional]
info

Key Management System (KMS) and Registrar provider settings are configured via JSON files (kms.json, registrar.json), not environment variables — see Key Management System (KMS) and Registrar.