Skip to content

Vulcan Environment Variables

This document lists all environment variables that can be used to configure Vulcan.

System Configuration

VariableDescriptionDefaultExample
VULCAN_CONFIGOverride path to vulcan.yml config fileconfig/vulcan.yml/etc/vulcan/config.yml
VULCAN_ENVOverride Rails environmentUses RAILS_ENVproduction

Database Configuration

VariableDescriptionDefaultExample
DATABASE_URLPostgreSQL connection string (12-factor, takes precedence)-postgres://user:pass@localhost:5432/vulcan_production
DATABASE_PORTPostgreSQL client connection port (used by database.yml)54325435
DATABASE_HOSTPostgreSQL host (used by database.yml)127.0.0.1localhost
DATABASE_GSSENCMODEGSSAPI encryption mode (set to disable on macOS with Kerberos)preferdisable
DB_SUFFIXDatabase name suffix for worktree isolation (development only)-_v2, _v3
POSTGRES_PORTDocker host-side port mapping (should match DATABASE_PORT)54325435
POSTGRES_USERPostgreSQL username (Docker init + database.yml)postgresvulcan_user
POSTGRES_PASSWORDPostgreSQL password (Docker init + database.yml)postgressecure_password
POSTGRES_DBPostgreSQL database name (Docker init + production database.yml)vulcan_postgres_productionvulcan_prod
PORTApplication server (Puma) listen port30003001

Note: DATABASE_URL takes precedence when set (recommended for Heroku, Kubernetes). Individual variables (POSTGRES_USER, POSTGRES_PASSWORD, etc.) are used as fallback.

Multi-Project Development: See port-registry for recommended port assignments when running multiple projects simultaneously.

Worktree Isolation: When developing with multiple git worktrees (e.g., v2.x and v3.x), set DB_SUFFIX in each worktree's .env to give each branch its own database. This prevents migration conflicts when branches have diverging schemas. Not needed in production — each deployment has its own database.

bash
# v2.x worktree .env
DB_SUFFIX=_v2    # → vulcan_vue_development_v2, vulcan_vue_test_v2

# v3.x worktree .env
DB_SUFFIX=_v3    # → vulcan_vue_development_v3, vulcan_vue_test_v3

Deprecated: VULCAN_VUE_DATABASE_PASSWORD is deprecated. Use POSTGRES_PASSWORD instead.

General Application Settings

VariableDescriptionDefaultExample
VULCAN_APP_URLApplication URLhttp://localhost:3000https://vulcan.example.com
VULCAN_WELCOME_TEXTWelcome message on login pageWelcome to VulcanWelcome to MITRE Vulcan
VULCAN_CONTACT_EMAILContact email for notifications and default SMTP usernamevulcan-support@example.comsupport@mycompany.com

Authentication Settings

Local Login

VariableDescriptionDefaultExample
VULCAN_ENABLE_LOCAL_LOGINEnable local username/password logintruetrue or false
VULCAN_ENABLE_EMAIL_CONFIRMATIONRequire email confirmation for new usersfalsetrue or false
VULCAN_SESSION_TIMEOUTSession inactivity timeout. Accepts explicit suffix (30s, 15m, 1h) or plain numbers (1-9 = hours, 10-299 = minutes, 300+ = seconds).1h900 (DoD 15-min), 15m, 1h
VULCAN_ENABLE_REMEMBER_MEShow "Remember Me" checkbox on login formstruefalse for DoD
VULCAN_REMEMBER_ME_DURATIONHow long Remember Me keeps session alive. Same format as session timeout.8h1d, 28800

Account Linking

VariableDescriptionDefaultExample
VULCAN_AUTO_LINK_USERAutomatically link external identities (OIDC, LDAP, GitHub) to existing local accounts with the same email. Only enable when all configured identity providers verify email ownership. When false, users see a clear error directing them to sign in with their existing method or contact an administrator.falsetrue or false

User Registration

VariableDescriptionDefaultExample
VULCAN_ENABLE_USER_REGISTRATIONAllow new users to registertruetrue or false

Admin Bootstrap

Vulcan provides multiple ways to create the initial admin user. These are evaluated in priority order:

VariableDescriptionDefaultExample
VULCAN_ADMIN_EMAILEmail for auto-created admin user-admin@example.com
VULCAN_ADMIN_PASSWORDPassword for auto-created admin userAuto-generatedSecurePass123!
VULCAN_FIRST_USER_ADMINFirst registered user becomes admintrue (Docker)true or false

Priority Order:

  1. Environment Variables (Most Secure): Set VULCAN_ADMIN_EMAIL and optionally VULCAN_ADMIN_PASSWORD

    • Admin is created automatically during db:prepare
    • If password is omitted, a secure random password is generated and logged
    • Best for: Production, CI/CD, Kubernetes
  2. First User Admin (Convenience): Set VULCAN_FIRST_USER_ADMIN=true

    • First user to register or login becomes admin automatically
    • Protected by database advisory lock to prevent race conditions
    • Best for: Quick demos, development, evaluations
  3. Manual Rake Task: Run rails db:create_admin

    • Interactive terminal prompt
    • Best for: Traditional deployments, manual setup

Docker Default: In Docker deployments, VULCAN_FIRST_USER_ADMIN=true is the default, allowing immediate use after docker compose up. For production, disable this and use VULCAN_ADMIN_EMAIL.

Security Note: The first-user-admin feature uses PostgreSQL advisory locks to prevent race condition attacks (similar to WordPress installer vulnerabilities). However, for production deployments, explicit admin configuration via environment variables is recommended.

Demo/Evaluation Data

VariableDescriptionDefaultExample
VULCAN_SEED_DEMO_DATAPopulate database with demo data in productionfalsetrue

When VULCAN_SEED_DEMO_DATA=true, db:seed creates sample users, projects, and components for evaluation purposes. In development/test environments, demo data is always seeded.

If no admin user exists (i.e., VULCAN_ADMIN_EMAIL was not set), a fallback demo admin is created:

  • Email: admin@example.com
  • Password: 12qwaszx\!@QWASZX (DoD 2222/15 compliant)

If an admin already exists from admin:bootstrap, the demo admin is skipped and only sample projects/users are created.

OIDC/OAuth (e.g., Okta, Auth0, Keycloak)

New in v2.2+: Vulcan supports automatic endpoint discovery, reducing configuration from 8+ variables to just 4 essential ones.

Essential Configuration (Auto-Discovery Enabled)

VariableDescriptionRequiredExample
VULCAN_ENABLE_OIDCEnable OIDC authenticationtrue
VULCAN_OIDC_ISSUER_URLOIDC issuer URLhttps://dev-12345.okta.com
VULCAN_OIDC_CLIENT_IDOIDC client ID0oa1b2c3d4e5f6g7h8i9j
VULCAN_OIDC_CLIENT_SECRETOIDC client secretsecret_key_here
VULCAN_OIDC_REDIRECT_URIOIDC redirect URIhttps://vulcan.example.com/users/auth/oidc/callback

Optional Configuration

VariableDescriptionDefaultExample
VULCAN_OIDC_DISCOVERYEnable automatic endpoint discoverytruefalse (to disable)
VULCAN_OIDC_PROVIDER_TITLEDisplay name for OIDC providerOIDC ProviderOkta
VULCAN_OIDC_PROMPTOIDC prompt parameter-login (forces re-authentication)
VULCAN_OIDC_CLIENT_SIGNING_ALGOIDC signing algorithmRS256RS256

Manual Configuration (Legacy/Fallback)

Only required when VULCAN_OIDC_DISCOVERY=false or as fallback endpoints

VariableDescriptionExample
VULCAN_OIDC_AUTHORIZATION_URLOIDC authorization endpointhttps://dev-12345.okta.com/oauth2/default/v1/authorize
VULCAN_OIDC_TOKEN_URLOIDC token endpointhttps://dev-12345.okta.com/oauth2/default/v1/token
VULCAN_OIDC_USERINFO_URLOIDC userinfo endpointhttps://dev-12345.okta.com/oauth2/default/v1/userinfo
VULCAN_OIDC_JWKS_URIOIDC JWKS endpointhttps://dev-12345.okta.com/oauth2/default/v1/keys

Deprecated Variables

These variables are no longer needed with auto-discovery enabled

VariableReplacementNotes
VULCAN_OIDC_HOSTUse VULCAN_OIDC_ISSUER_URLAutomatically extracted from issuer URL
VULCAN_OIDC_PORTUse VULCAN_OIDC_ISSUER_URLAutomatically extracted from issuer URL
VULCAN_OIDC_SCHEMEUse VULCAN_OIDC_ISSUER_URLAutomatically extracted from issuer URL

Migration Examples

Before (8+ variables):

bash
VULCAN_ENABLE_OIDC=true
VULCAN_OIDC_ISSUER_URL=https://dev-12345.okta.com
VULCAN_OIDC_CLIENT_ID=your-client-id
VULCAN_OIDC_CLIENT_SECRET=your-secret
VULCAN_OIDC_REDIRECT_URI=https://vulcan.example.com/users/auth/oidc/callback
VULCAN_OIDC_AUTHORIZATION_URL=https://dev-12345.okta.com/oauth2/default/v1/authorize
VULCAN_OIDC_TOKEN_URL=https://dev-12345.okta.com/oauth2/default/v1/token
VULCAN_OIDC_USERINFO_URL=https://dev-12345.okta.com/oauth2/default/v1/userinfo
VULCAN_OIDC_JWKS_URI=https://dev-12345.okta.com/oauth2/default/v1/keys

After (4 variables):

bash
VULCAN_ENABLE_OIDC=true
VULCAN_OIDC_ISSUER_URL=https://dev-12345.okta.com
VULCAN_OIDC_CLIENT_ID=your-client-id
VULCAN_OIDC_CLIENT_SECRET=your-secret
VULCAN_OIDC_REDIRECT_URI=https://vulcan.example.com/users/auth/oidc/callback
# Endpoints automatically discovered from /.well-known/openid-configuration

LDAP

VariableDescriptionDefaultExample
VULCAN_ENABLE_LDAPEnable LDAP authenticationfalsetrue or false
VULCAN_LDAP_HOSTLDAP server hostnamelocalhostldap.example.com
VULCAN_LDAP_PORTLDAP server port389636
VULCAN_LDAP_TITLEDisplay name for LDAPLDAPCorporate LDAP
VULCAN_LDAP_ATTRIBUTELDAP attribute for user lookupuidsAMAccountName
VULCAN_LDAP_ENCRYPTIONLDAP encryption methodplainsimple_tls or start_tls
VULCAN_LDAP_BIND_DNLDAP bind DN-cn=admin,dc=example,dc=com
VULCAN_LDAP_ADMIN_PASSLDAP bind password-ldap_password
VULCAN_LDAP_BASELDAP search base-dc=example,dc=com

Email/SMTP Settings

VariableDescriptionDefaultExample
VULCAN_ENABLE_SMTPEnable SMTP for sending emailsfalsetrue or false
VULCAN_SMTP_ADDRESSSMTP server address-smtp.gmail.com
VULCAN_SMTP_PORTSMTP server port-587
VULCAN_SMTP_DOMAINSMTP domain-example.com
VULCAN_SMTP_SERVER_USERNAMESMTP username (defaults to VULCAN_CONTACT_EMAIL if not set)-notifications@example.com
VULCAN_SMTP_SERVER_PASSWORDSMTP password-smtp_password
VULCAN_SMTP_AUTHENTICATIONSMTP authentication method-plain
VULCAN_SMTP_OPENSSL_VERIFY_MODEOpenSSL verify mode for SMTP-none
VULCAN_SMTP_TLSUse TLS for SMTP-true or false
VULCAN_SMTP_ENABLE_STARTTLS_AUTOEnable STARTTLS auto-true or false

Slack Integration

VariableDescriptionDefaultExample
VULCAN_ENABLE_SLACK_COMMSEnable Slack notificationsfalsetrue or false
VULCAN_SLACK_API_TOKENSlack API token-xoxb-your-token
VULCAN_SLACK_CHANNEL_IDSlack channel ID-C1234567890

Classification Banner

Display a colored banner at the top and bottom of every page, commonly used for DoD classification markings.

VariableDescriptionDefaultExample
VULCAN_BANNER_ENABLEDEnable classification bannerfalsetrue
VULCAN_BANNER_TEXTBanner text displayed on every page (plain text, no formatting)""UNCLASSIFIED
VULCAN_BANNER_BACKGROUND_COLORBanner background color (hex)#007a33#c8102e
VULCAN_BANNER_TEXT_COLORBanner text color (hex)#ffffff#000000

DoD Standard Colors:

ClassificationBackgroundText
UNCLASSIFIED#007a33#ffffff
CUI#502b85#ffffff
CONFIDENTIAL#0033a0#ffffff
SECRET#c8102e#ffffff
TOP SECRET#ff671f#ffffff
TS/SCI#f7ea48#000000

Display a blocking consent modal that users must acknowledge before accessing the application. Acknowledgment is stored in the browser's localStorage per version — incrementing the version re-prompts all users.

VariableDescriptionDefaultExample
VULCAN_CONSENT_ENABLEDEnable consent modalfalsetrue
VULCAN_CONSENT_VERSIONVersion string for consent (increment to re-prompt)12
VULCAN_CONSENT_TITLEModal titleTerms of UseAcceptable Use Policy
VULCAN_CONSENT_CONTENTModal body content (supports Markdown)""By using this system you agree to the **AUP**.
VULCAN_CONSENT_TTLHow long consent acknowledgment remains valid. 0 = per-session (re-prompt on every new session, DoD compliant). Accepts durations: 1h, 30m, 24h.024h

Consent Content Formatting: The VULCAN_CONSENT_CONTENT variable supports full Markdown formatting including headings, bold, italics, numbered/bulleted lists, links, and blockquotes. HTML is sanitized for security. The banner text (VULCAN_BANNER_TEXT) is plain text only — no formatting is applied.

Account Lockout

Lock accounts after consecutive failed login attempts. Enabled by default.

VariableDescriptionDefaultExample
VULCAN_LOCKOUT_ENABLEDEnable account lockouttruefalse
VULCAN_LOCKOUT_MAX_ATTEMPTSFailed attempts before lock35
VULCAN_LOCKOUT_UNLOCK_IN_MINUTESMinutes before auto-unlock1530
VULCAN_LOCKOUT_UNLOCK_STRATEGYUnlock method: email, time, or bothbothtime
VULCAN_LOCKOUT_LAST_ATTEMPT_WARNINGWarn user on last attempt before locktruefalse

Unlock strategies:

  • email — sends an unlock link to the user's email (requires SMTP)
  • time — automatically unlocks after VULCAN_LOCKOUT_UNLOCK_IN_MINUTES
  • both — either method works (recommended, ensures unlock even without SMTP)

Administrators can also manually unlock accounts from the Users page (/users).

Password Policy

DoD-aligned defaults ("2222" policy). Set any count to 0 to disable that requirement.

VariableDescriptionDefaultExample
VULCAN_PASSWORD_MIN_LENGTHMinimum password length158
VULCAN_PASSWORD_MIN_UPPERCASEMinimum uppercase letters20
VULCAN_PASSWORD_MIN_LOWERCASEMinimum lowercase letters20
VULCAN_PASSWORD_MIN_NUMBERMinimum digits20
VULCAN_PASSWORD_MIN_SPECIALMinimum special characters20

Input Length Limits

Configurable maximum lengths for text fields. Defaults are based on analysis of real DISA STIG/SRG data across 1,785 rules. Group limits by category rather than individual fields — each env var controls a category of related fields.

See Input Length Limits for the complete field-to-setting mapping.

VariableDescriptionDefaultExample
VULCAN_LIMIT_SHORT_STRINGIDs, version strings, reference fields255512
VULCAN_LIMIT_IDENTComma-joined CCI list (real max: 310)20484096
VULCAN_LIMIT_TITLERule titles (real max: 436)5001000
VULCAN_LIMIT_MEDIUM_TEXTStatus justification, brief text10002000
VULCAN_LIMIT_LONG_TEXTDescriptions, check content, fixtext (real max: 6,330)1000020000
VULCAN_LIMIT_INSPEC_CODEInSpec control bodies (user-authored)50000100000
VULCAN_LIMIT_COMPONENT_NAMEComponent name255500
VULCAN_LIMIT_COMPONENT_PREFIXSTIG ID prefix1015
VULCAN_LIMIT_COMPONENT_TITLEComponent title5001000
VULCAN_LIMIT_COMPONENT_DESCRIPTIONComponent description500010000
VULCAN_LIMIT_PROJECT_NAMEProject name255500
VULCAN_LIMIT_PROJECT_DESCRIPTIONProject description500010000
VULCAN_LIMIT_USER_NAMEUser display name255500
VULCAN_LIMIT_USER_EMAILUser email address255500
VULCAN_LIMIT_REVIEW_COMMENTReview comments1000020000
VULCAN_LIMIT_BENCHMARK_NAMESRG/STIG display name5001000
VULCAN_LIMIT_BENCHMARK_TITLESRG/STIG title5001000
VULCAN_LIMIT_BENCHMARK_DESCRIPTIONSTIG description1000020000

Project Settings

VariableDescriptionDefaultExample
VULCAN_PROJECT_CREATE_PERMISSION_ENABLEDRequire permission to create projectstruetrue or false

Development Environment

For local development, create a .env file in the project root with your settings:

bash
# Database
DATABASE_URL=postgres://postgres:postgres@127.0.0.1:5432/vulcan_vue_development

# Enable OIDC (example for Okta)
VULCAN_ENABLE_OIDC=true
VULCAN_OIDC_PROVIDER_TITLE=Okta
VULCAN_OIDC_ISSUER_URL=https://dev-12345.okta.com
VULCAN_OIDC_HOST=dev-12345.okta.com
VULCAN_OIDC_CLIENT_ID=your_client_id
VULCAN_OIDC_CLIENT_SECRET=your_client_secret

# Disable local login when using OIDC
VULCAN_ENABLE_LOCAL_LOGIN=false

Production Environment

In production, set these as actual environment variables through your deployment platform (Docker, Kubernetes, etc.) rather than using .env files.

Docker Deployment

When using Docker, you can set environment variables in:

  • .env file (created by setup-docker-secrets.sh)
  • docker-compose.yml using the environment: section
  • Container runtime with -e flags

For Container Deployments (Docker, ECS, Kubernetes):

yaml
# docker-compose.yml
environment:
  RAILS_LOG_TO_STDOUT: "true"
  STRUCTURED_LOGGING: "true"  # Enable JSON logging for CloudWatch/monitoring
  # Other environment variables...

AWS ECS Example:

json
{
  "environment": [
    {"name": "RAILS_LOG_TO_STDOUT", "value": "true"},
    {"name": "STRUCTURED_LOGGING", "value": "true"}
  ]
}

This ensures OIDC auto-discovery events and all application logs are visible in your container orchestration platform's logging system.

Rails/Framework Settings

VariableDescriptionDefaultExample
RAILS_MASTER_KEYRails master key for credentials-Generated by Rails
RAILS_LOG_TO_STDOUTLog to stdout instead of files-true
RAILS_SERVE_STATIC_FILESServe static files in production-true
RAILS_FORCE_SSLForce HTTPS redirects (set to false for Docker without SSL termination)truefalse

Container Logging (Production)

VariableDescriptionDefaultExample
RAILS_LOG_TO_STDOUTEnable container-friendly loggingfalsetrue
STRUCTURED_LOGGINGEnable JSON structured logging for CloudWatch/monitoringfalsetrue
DOCKER_CONTAINERIndicates running in Docker container (auto-detected)-true
ECS_CONTAINER_METADATA_URIAWS ECS metadata URI (auto-detected)-Auto-set by ECS

Container Logging Features:

  • Automatic Detection: Vulcan automatically detects container environments (Docker, ECS, Kubernetes)
  • JSON Logging: When STRUCTURED_LOGGING=true, logs are output in JSON format for easy parsing by CloudWatch, Splunk, etc.
  • OIDC Discovery Visibility: All OIDC auto-discovery events are logged with detailed context for production debugging
  • Request Tracking: Includes request IDs in structured logs when available

GitHub OAuth (Optional)

VariableDescriptionDefaultExample
GITHUB_APP_IDGitHub OAuth app ID-your_github_app_id
GITHUB_APP_SECRETGitHub OAuth app secret-your_github_app_secret

Notes

  • Boolean values: Use true or false (case-insensitive)
  • All boolean environment variables default to false unless otherwise specified
  • Variables marked with - in the Default column are required when the feature is enabled
  • Sensitive values (passwords, secrets) should never be committed to version control

Part of the MITRE Security Automation Framework (SAF)