|
| 1 | +# Vulcan Environment Variables |
| 2 | + |
| 3 | +This document lists all environment variables that can be used to configure Vulcan. |
| 4 | + |
| 5 | +## System Configuration |
| 6 | + |
| 7 | +| Variable | Description | Default | Example | |
| 8 | +|----------|-------------|---------|---------| |
| 9 | +| `VULCAN_CONFIG` | Override path to vulcan.yml config file | `config/vulcan.yml` | `/etc/vulcan/config.yml` | |
| 10 | +| `VULCAN_ENV` | Override Rails environment | Uses `RAILS_ENV` | `production` | |
| 11 | + |
| 12 | +## Database Configuration |
| 13 | + |
| 14 | +| Variable | Description | Default | Example | |
| 15 | +|----------|-------------|---------|---------| |
| 16 | +| `DATABASE_URL` | PostgreSQL connection string | - | `postgres://user:pass@localhost:5432/vulcan_development` | |
| 17 | +| `VULCAN_VUE_DATABASE_PASSWORD` | PostgreSQL password (production only) | - | `postgres_password` | |
| 18 | + |
| 19 | +## General Application Settings |
| 20 | + |
| 21 | +| Variable | Description | Default | Example | |
| 22 | +|----------|-------------|---------|---------| |
| 23 | +| `VULCAN_APP_URL` | Application URL | `http://localhost:3000` | `https://vulcan.example.com` | |
| 24 | +| `VULCAN_WELCOME_TEXT` | Welcome message on login page | `Welcome to Vulcan` | `Welcome to MITRE Vulcan` | |
| 25 | +| `VULCAN_CONTACT_EMAIL` | Contact email for notifications | `do_not_reply@vulcan` | `admin@example.com` | |
| 26 | + |
| 27 | +## Authentication Settings |
| 28 | + |
| 29 | +### Local Login |
| 30 | +| Variable | Description | Default | Example | |
| 31 | +|----------|-------------|---------|---------| |
| 32 | +| `VULCAN_ENABLE_LOCAL_LOGIN` | Enable local username/password login | `true` | `true` or `false` | |
| 33 | +| `VULCAN_ENABLE_EMAIL_CONFIRMATION` | Require email confirmation for new users | `false` | `true` or `false` | |
| 34 | +| `VULCAN_SESSION_TIMEOUT` | Session timeout in minutes | `60` | `120` | |
| 35 | + |
| 36 | +### User Registration |
| 37 | +| Variable | Description | Default | Example | |
| 38 | +|----------|-------------|---------|---------| |
| 39 | +| `VULCAN_ENABLE_USER_REGISTRATION` | Allow new users to register | `true` | `true` or `false` | |
| 40 | + |
| 41 | +### OIDC/OAuth (e.g., Okta) |
| 42 | +| Variable | Description | Default | Example | |
| 43 | +|----------|-------------|---------|---------| |
| 44 | +| `VULCAN_ENABLE_OIDC` | Enable OIDC authentication | `false` | `true` or `false` | |
| 45 | +| `VULCAN_OIDC_PROVIDER_TITLE` | Display name for OIDC provider | `OIDC Provider` | `Okta` | |
| 46 | +| `VULCAN_OIDC_ISSUER_URL` | OIDC issuer URL | - | `https://dev-12345.okta.com` | |
| 47 | +| `VULCAN_OIDC_HOST` | OIDC provider hostname | - | `dev-12345.okta.com` | |
| 48 | +| `VULCAN_OIDC_CLIENT_ID` | OIDC client ID | - | `0oa1b2c3d4e5f6g7h8i9j` | |
| 49 | +| `VULCAN_OIDC_CLIENT_SECRET` | OIDC client secret | - | `secret_key_here` | |
| 50 | +| `VULCAN_OIDC_REDIRECT_URI` | OIDC redirect URI | - | `https://vulcan.example.com/users/auth/oidc/callback` | |
| 51 | +| `VULCAN_OIDC_AUTHORIZATION_URL` | OIDC authorization endpoint | - | `https://dev-12345.okta.com/oauth2/default/v1/authorize` | |
| 52 | +| `VULCAN_OIDC_TOKEN_URL` | OIDC token endpoint | - | `https://dev-12345.okta.com/oauth2/default/v1/token` | |
| 53 | +| `VULCAN_OIDC_USERINFO_URL` | OIDC userinfo endpoint | - | `https://dev-12345.okta.com/oauth2/default/v1/userinfo` | |
| 54 | +| `VULCAN_OIDC_JWKS_URI` | OIDC JWKS endpoint | - | `https://dev-12345.okta.com/oauth2/default/v1/keys` | |
| 55 | +| `VULCAN_OIDC_PORT` | OIDC provider port | `443` | `443` | |
| 56 | +| `VULCAN_OIDC_SCHEME` | OIDC provider scheme | `https` | `https` | |
| 57 | +| `VULCAN_OIDC_CLIENT_SIGNING_ALG` | OIDC signing algorithm | `RS256` | `RS256` | |
| 58 | +| `VULCAN_OIDC_PROMPT` | OIDC prompt parameter | - | `login` (forces re-authentication) | |
| 59 | + |
| 60 | +### LDAP |
| 61 | +| Variable | Description | Default | Example | |
| 62 | +|----------|-------------|---------|---------| |
| 63 | +| `VULCAN_ENABLE_LDAP` | Enable LDAP authentication | `false` | `true` or `false` | |
| 64 | +| `VULCAN_LDAP_HOST` | LDAP server hostname | `localhost` | `ldap.example.com` | |
| 65 | +| `VULCAN_LDAP_PORT` | LDAP server port | `389` | `636` | |
| 66 | +| `VULCAN_LDAP_TITLE` | Display name for LDAP | `LDAP` | `Corporate LDAP` | |
| 67 | +| `VULCAN_LDAP_ATTRIBUTE` | LDAP attribute for user lookup | `uid` | `sAMAccountName` | |
| 68 | +| `VULCAN_LDAP_ENCRYPTION` | LDAP encryption method | `plain` | `simple_tls` or `start_tls` | |
| 69 | +| `VULCAN_LDAP_BIND_DN` | LDAP bind DN | - | `cn=admin,dc=example,dc=com` | |
| 70 | +| `VULCAN_LDAP_ADMIN_PASS` | LDAP bind password | - | `ldap_password` | |
| 71 | +| `VULCAN_LDAP_BASE` | LDAP search base | - | `dc=example,dc=com` | |
| 72 | + |
| 73 | +## Email/SMTP Settings |
| 74 | + |
| 75 | +| Variable | Description | Default | Example | |
| 76 | +|----------|-------------|---------|---------| |
| 77 | +| `VULCAN_ENABLE_SMTP` | Enable SMTP for sending emails | `false` | `true` or `false` | |
| 78 | +| `VULCAN_SMTP_ADDRESS` | SMTP server address | - | `smtp.gmail.com` | |
| 79 | +| `VULCAN_SMTP_PORT` | SMTP server port | - | `587` | |
| 80 | +| `VULCAN_SMTP_DOMAIN` | SMTP domain | - | `example.com` | |
| 81 | +| `VULCAN_SMTP_SERVER_USERNAME` | SMTP username | - | `notifications@example.com` | |
| 82 | +| `VULCAN_SMTP_SERVER_PASSWORD` | SMTP password | - | `smtp_password` | |
| 83 | +| `VULCAN_SMTP_AUTHENTICATION` | SMTP authentication method | - | `plain` | |
| 84 | +| `VULCAN_SMTP_OPENSSL_VERIFY_MODE` | OpenSSL verify mode for SMTP | - | `none` | |
| 85 | +| `VULCAN_SMTP_TLS` | Use TLS for SMTP | - | `true` or `false` | |
| 86 | +| `VULCAN_SMTP_ENABLE_STARTTLS_AUTO` | Enable STARTTLS auto | - | `true` or `false` | |
| 87 | + |
| 88 | +## Slack Integration |
| 89 | + |
| 90 | +| Variable | Description | Default | Example | |
| 91 | +|----------|-------------|---------|---------| |
| 92 | +| `VULCAN_ENABLE_SLACK_COMMS` | Enable Slack notifications | `false` | `true` or `false` | |
| 93 | +| `VULCAN_SLACK_API_TOKEN` | Slack API token | - | `xoxb-your-token` | |
| 94 | +| `VULCAN_SLACK_CHANNEL_ID` | Slack channel ID | - | `C1234567890` | |
| 95 | + |
| 96 | +## Project Settings |
| 97 | + |
| 98 | +| Variable | Description | Default | Example | |
| 99 | +|----------|-------------|---------|---------| |
| 100 | +| `VULCAN_PROJECT_CREATE_PERMISSION_ENABLED` | Require permission to create projects | `true` | `true` or `false` | |
| 101 | + |
| 102 | +## Development Environment |
| 103 | + |
| 104 | +For local development, create a `.env` file in the project root with your settings: |
| 105 | + |
| 106 | +```bash |
| 107 | +# Database |
| 108 | +DATABASE_URL=postgres://postgres:postgres@127.0.0.1:5432/vulcan_vue_development |
| 109 | + |
| 110 | +# Enable OIDC (example for Okta) |
| 111 | +VULCAN_ENABLE_OIDC=true |
| 112 | +VULCAN_OIDC_PROVIDER_TITLE=Okta |
| 113 | +VULCAN_OIDC_ISSUER_URL=https://dev-12345.okta.com |
| 114 | +VULCAN_OIDC_HOST=dev-12345.okta.com |
| 115 | +VULCAN_OIDC_CLIENT_ID=your_client_id |
| 116 | +VULCAN_OIDC_CLIENT_SECRET=your_client_secret |
| 117 | + |
| 118 | +# Disable local login when using OIDC |
| 119 | +VULCAN_ENABLE_LOCAL_LOGIN=false |
| 120 | +``` |
| 121 | + |
| 122 | +## Production Environment |
| 123 | + |
| 124 | +In production, set these as actual environment variables through your deployment platform (Docker, Kubernetes, etc.) rather than using `.env` files. |
| 125 | + |
| 126 | +## Docker Deployment |
| 127 | + |
| 128 | +When using Docker, you can set environment variables in: |
| 129 | +- `docker-compose.yml` using the `environment:` section |
| 130 | +- `.env-prod` file referenced in docker-compose.yml |
| 131 | +- Container runtime with `-e` flags |
| 132 | + |
| 133 | +## Rails/Framework Settings |
| 134 | + |
| 135 | +| Variable | Description | Default | Example | |
| 136 | +|----------|-------------|---------|---------| |
| 137 | +| `RAILS_MASTER_KEY` | Rails master key for credentials | - | Generated by Rails | |
| 138 | +| `RAILS_LOG_TO_STDOUT` | Log to stdout instead of files | - | `true` | |
| 139 | +| `RAILS_SERVE_STATIC_FILES` | Serve static files in production | - | `true` | |
| 140 | +| `FORCE_SSL` | Force SSL connections | - | `true` | |
| 141 | + |
| 142 | +## GitHub OAuth (Optional) |
| 143 | + |
| 144 | +| Variable | Description | Default | Example | |
| 145 | +|----------|-------------|---------|---------| |
| 146 | +| `GITHUB_APP_ID` | GitHub OAuth app ID | - | `your_github_app_id` | |
| 147 | +| `GITHUB_APP_SECRET` | GitHub OAuth app secret | - | `your_github_app_secret` | |
| 148 | + |
| 149 | +## Notes |
| 150 | + |
| 151 | +- Boolean values: Use `true` or `false` (case-insensitive) |
| 152 | +- All boolean environment variables default to `false` unless otherwise specified |
| 153 | +- Variables marked with `-` in the Default column are required when the feature is enabled |
| 154 | +- Sensitive values (passwords, secrets) should never be committed to version control |
0 commit comments