Order of precedence
Active configuration values are determined using the following order of precedence:
Corporate rule
For example: an expired license overrides everything else
Command line or system property value (if appropriate for the language you are using)
For example:
-Dcontrast.enable
Environment variables
For example:
CONTRAST__ENABLE
An application-specific configuration file
For example: web.config
Configuration values in a YAML file are pulled from the first file found in the following order:
A YAML file indicated by the user
For example:
Java: the
contrast.config.path
system propertyNode.js: the
--configFile
command line flagAny agent: the
CONTRAST_CONFIG_PATH
environment variable
A contrast_security.yaml file in the current working directory
For example: ./contrast_security.yaml
A contrast_security.yaml file in the application’s configuration directory
For example:
Ruby on Rails: ./config/contrast_security.yaml
Django: ./settings/contrast_security.yaml
A contrast_security.yaml file in an agent-specific configuration directory. For agents that use a service, use this directory if you need to use separate YAML files for agent and service.
For example:
/etc/contrast/agentname/contrast_security.yaml (where agentname is one of: dotnet, go, java, node, python, ruby, or webserver)
%ProgramData%\Contrast\agentname\contrast_security.yaml (where agentname is one of: dotnet, go, java, node, python, ruby, or webserver)
A contrast_security.yaml file within the server's /etc/contrast directory. For agents that use a service, use this directory if you need to share YAML files between agent and service.
For example:
/etc/contrast/contrast_security.yaml
%ProgramData%\Contrast\contrast_security.yaml
Values set in the Contrast web interface
For example: Server mode toggles for Assess and Protect, which map to
assess.enable
andprotect.enable
Default value