Security variables
Tokens, encryption, outbound REST hosts, masking and HashiCorp Vault
| Variable | Choices/Defaults | Comments |
|---|---|---|
| VAULT_ADDR string | HashiCorp Vault address
Base URL of a HashiCorp Vault server (e.g. | |
| VAULT_TOKEN string | HashiCorp Vault token
Authentication token used by AnsibleForms to read secrets from Vault. Required when | |
| VAULT_NAMESPACE string | HashiCorp Vault namespace
Optional Vault Enterprise namespace. Sent as the | |
| VAULT_KV_VERSION number | Default: 2 | Vault KV secret engine version
Version of the Vault KV secret engine. Defaults to 2 (recommended). For KV v2, the client automatically inserts the |
| VAULT_DEFAULT_MOUNT string | Default: secret | Default Vault KV mount
Default KV mount used when a credential’s |
| VAULT_CACHE_TTL_MS number | Default: 60000 | Vault read cache TTL (ms)
Time-to-live in milliseconds of the in-memory cache used by AnsibleForms when reading secrets from Vault. Lower this if you rotate secrets aggressively; raise it to reduce load on Vault. |
| VAULT_SKIP_VERIFY string | Default: false | Skip Vault TLS verification
Disable TLS certificate verification when calling Vault. For development/testing only — never enable this in production. |
| AZURE_GRAPH_URI string added in version 4.0.3 | Default: https://graph.microsoft.com | The Azure Graph API base URI
The Microsoft Graph endpoint the server calls at an Azure AD login to read the user’s group membership ( |
| REST_ALLOWED_HOSTS string added in version 6.0.0 | Default: | Whitelist of hosts/CIDRs reachable from REST expressions
Comma-separated list of hostnames and/or CIDR ranges that REST helper functions ( When set, only these destinations are allowed; everything else is blocked. When unset, no allow-list is applied (default behaviour, all hosts allowed). Hostnames are matched case-insensitively against the URL host; CIDRs are matched against the IPs that the host resolves to (so an entry like Example: Caveat: this only protects the AnsibleForms Node.js process. Ansible playbooks run on the host directly and bypass this guard. |
| REST_DENIED_HOSTS string added in version 6.0.0 | Default: | Blacklist of hosts/CIDRs unreachable from REST expressions
Comma-separated list of hostnames and/or CIDR ranges that REST helper functions ( Wins over Hostnames are matched case-insensitively against the URL host; CIDRs are matched against the IPs that the host resolves to. Caveat: this only protects the AnsibleForms Node.js process. Ansible playbooks run on the host directly and bypass this guard. |
| EXPRESSION_SANITIZER string added in version 6.3.0 | Choices:
| Strictness of the server-side expression sanitizer
Server expressions (fields of type
An unknown value falls back to |
| ACCESS_TOKEN_SECRET string | Default: *** NOT REVEALED *** | Secret to encrypt access tokens
AnsibleForm uses Basic Authentication as authentication mechanism. |
| ACCESS_TOKEN_EXPIRATION string | Default: 30m | Access token expiration
A JWT (Json Web Token) is only valid for a certain amount of time. |
| ACCESS_TOKEN_REFRESH_EXPIRATION string | Default: 24h | Refresh token expiration
Once the access token is expired, and the client tries to connect to the server, the client hits a 401 error (unauthorized). The client application captures this error, and calls the refresh API with its refresh token. If the refresh token is valid, the client gets a new set of access and refresh tokens and retries the last unauthorized api call with the renew access token. |
| ACCESS_TOKEN_ISSUER string added in version 5.0.8 | Default: ansibleforms | Issuer of the access token
The issuer of the access token is the name of the application that issues the token. |
| ENCRYPTION_SECRET string | Default: *** NOT REVEALED *** | Database encryption secret
Ansible Forms encrypts passwords in the database using this secret. |
| REGEX_FILTER_JOB_OUTPUT string | Default: \[low\] | Filter out job output tasks
Sometime, the job output is flooded with meaningless output, such as ‘Gathering Facts’, or ‘Includes’. You filter out these by add a piece of string in the taskname, i.e. |
| MASK_EXTRAVARS_REGEX string | Default: password|secret|token | Regex to mask extravars values
When you have sensitive extravars, such as passwords, tokens, keys, credentials, you do not want these to be shown in clear text in the extravars section of a job. Since 6.4.1 the value of every |
| EXTRAVARS_USER_FIELDS string | Default: | Which keys of the user go into the extravars
Every job carries the launching user as Leave it empty (the default) and the whole object is sent, exactly as in every release before this one. Set it to a comma separated list of top level keys, for example A single form can override this with its Note : |