Configuration Server - Standalone Profile
This is the default configuration mode which indicates that CAS does NOT require connections to an external configuration server
and will run in an embedded standalone mode. When this option is turned on, CAS by default will attempt to locate settings and properties
inside a pre-defined directories and files and otherwise falls back to typically using /etc/cas/config as the configuration directory.
Similar to the Spring Cloud external configuration server, the contents of this directory include (cas|application).(yml|properties)
files that can be used to control CAS behavior. Also, note that this configuration directory can be monitored by CAS to auto-pick up changes
and refresh the application context as needed. Please review this guide to learn more.
Note that by default, all CAS settings and configuration is controlled via the embedded application.properties file in the CAS server
web application. There is also an embedded application.yml file that allows you to override all defaults if you wish to ship the
configuration inside the main CAS web application and not rely on externalized configuration files. If you prefer
properties to yaml, then application-standalone.properties will override application.properties as well.
Settings found in external configuration files are and will be able to override the defaults provided by CAS. The naming of the configuration files inside the CAS configuration directory follows the below pattern:
- An
application.(properties|yml|yaml)file is always loaded, if found. - Settings located inside
properties|yml|yamlfiles whose name matches the value ofspring.application.nameare loaded (i.ecas.properties) Note:spring.application.namedefaults to uppercaseCASbut the lowercase name will also be loaded. - Settings located inside
properties|yml|yamlfiles whose name matches the value ofspring.profiles.activeare loaded (i.eldap.properties). - Profile-specific application properties outside of your packaged web application (
application-{profile}.properties|yml|yaml) This allows you to, if needed, split your settings into multiple property files and then locate them by assigning their name to the list of active profiles (i.e.spring.profiles.active=standalone,testldap,stagingMfa)
Configuration files are loaded in the following order where spring.profiles.active=standalone,profile1,profile2. Note
that the last configuration file loaded will override any duplicate properties from configuration files loaded earlier:
application.(properties|yml|yaml)- (lower case)
spring.application.name.(properties|yml|yaml) spring.application.name.(properties|yml|yaml)application-standalone.(properties|yml|yaml)standalone.(properties|yml|yaml)application-profile1.(properties|yml|yaml)profile1.(properties|yml|yaml)application-profile2.(properties|yml|yaml)profile2.(properties|yml|yaml)
If two configuration files with same base name and different extensions exist, they are processed in the order
of properties, yml and then yaml and then groovy (last one processed wins where duplicate properties exist). These
external configuration files will override files located in the classpath (e.g. files from src/main/resources in
your CAS overlay that end up in WEB-INF/classes) but the internal files are loaded per
the Spring Boot rules
which differ from the CAS standalone configuration rules described here (e.g. <profile>.properties
would not be loaded from classpath but application-<profile>.properties would).
Sources
CAS by default will attempt to locate settings and properties using:
/etc/cas/config/opt/cas/config/var/cas/config
CAS has the ability to also load a Groovy file for loading settings. The file
is expected to be found at the above matching directory and should be named ${cas-application-name}.groovy, such as cas.groovy. The
script is able to combine conditional settings for active profiles and common settings that are applicable to all environments and profiles into one location with a structure that is similar to the below example:
1
2
3
4
5
6
7
8
9
// Settings may be filtered by individual profiles
profiles {
standalone {
cas.some.setting="value"
}
}
// This applies to all profiles and environments
cas.common.setting="value"
To prepare CAS to support and integrate with Apache Groovy, please review this guide.
You can also use a dedicated configuration file to directly feed a collection of properties to CAS in form of a file or classpath resource. This is specially useful in cases where a bare CAS server is deployed in the cloud without the extra ceremony of a configuration server or an external directory for that matter and the deployer wishes to avoid overriding embedded configuration files.
The following settings and properties are available from the CAS configuration catalog:
cas.standalone.configuration-directoryDescribes a directory path where CAS configuration may be found.
Describes a directory path where CAS configuration may be found.
cas.standalone.configuration-fileDescribes a file path where that contains the CAS properties in a single file.
Describes a file path where that contains the CAS properties in a single file.
Required settings may be needed to activate or affect the feature; review them even when they have a default. Optional settings only need to be set to change a default or to turn on the behavior they control. Third party settings belong to libraries such as Spring Boot that CAS builds on; their own documentation may have more detail.
Notes on configuration
Configuration Metadata
The collection of configuration properties listed in this section are automatically generated from the CAS source and components that contain the actual field definitions, types, descriptions, modules, etc. This metadata may not always be 100% accurate, or could be lacking details and sufficient explanations.
Be Selective
This section is meant as a guide only. Do NOT copy/paste the entire collection of settings into your CAS configuration; rather pick only the properties that you need. Do NOT enable settings unless you are certain of their purpose and do NOT copy settings into your configuration only to keep them as reference. All these ideas lead to upgrade headaches, maintenance nightmares and premature aging.
YAGNI
Note that for nearly ALL use cases, declaring and configuring properties listed here is sufficient. You should NOT have to explicitly massage a CAS XML/Java/etc configuration file to design an authentication handler, create attribute release policies, etc. CAS at runtime will auto-configure all required changes for you. If you are unsure about the meaning of a given CAS setting, do NOT turn it on without hesitation. Review the codebase or better yet, ask questions to clarify the intended behavior.
Naming Convention
Property names can be specified in very relaxed terms. For instance cas.someProperty, cas.some-property, cas.some_property are all valid names. While all
forms are accepted by CAS, there are certain components (in CAS and other frameworks used) whose activation at runtime is conditional on a property value, where
this property is required to have been specified in CAS configuration using kebab case. This is both true for properties that are owned by CAS as well as those
that might be presented to the system via an external library or framework such as Spring Boot, etc.
When possible, properties should be stored in lower-case kebab format, such as cas.property-name=value.
The only possible exception to this rule is when naming actuator endpoints; The name of the
actuator endpoints (i.e. ssoSessions) MUST remain in camelCase mode.
Settings and properties that are controlled by the CAS platform directly always begin with the prefix cas. All other settings are controlled and provided
to CAS via other underlying frameworks and may have their own schemas and syntax. BE CAREFUL with
the distinction. Unrecognized properties are rejected by CAS and/or frameworks upon which CAS depends. This means if you somehow misspell a property definition
or fail to adhere to the dot-notation syntax and such, your setting is entirely refused by CAS and likely the feature it controls will never be activated in the
way you intend.
Validation
Configuration properties are automatically validated on CAS startup to report issues with configuration binding, especially if defined CAS settings cannot be recognized or validated by the configuration schema. Additional validation processes are also handled via Configuration Metadata and property migrations applied automatically on startup by Spring Boot and family.
Indexed Settings
CAS settings able to accept multiple values are typically documented with an index, such as cas.some.setting[0]=value. The index [0] is meant to be
incremented by the adopter to allow for distinct multiple configuration blocks.
Handling Overrides
You are advised to not overlay or otherwise
modify the built in application.properties or bootstrap.properties files.
This will only complicate and weaken your deployment.
Instead try to comply with the CAS defaults and bootstrap CAS as much as possible via the defaults,
override via application.yml, application-standalone.properties or
use the outlined strategies. Likewise, try to instruct CAS to locate
configuration files external to its own. Premature optimization will only lead to chaos.
The following settings and properties are available from the CAS configuration catalog:
spring.cloud.config.allow-overrideFlag to indicate that #isOverrideSystemProperties() systemPropertiesOverride can be used.
trueFlag to indicate that #isOverrideSystemProperties() systemPropertiesOverride can be used. Set to false to prevent users from changing the default accidentally. Default true.
spring.cloud.config.charsetThe charset to read the resource from the config server.
UTF-8The charset to read the resource from the config server.
spring.cloud.config.enabledFlag to say that remote configuration is enabled.
trueFlag to say that remote configuration is enabled. Default true;
spring.cloud.config.fail-fastFlag to indicate that failure to connect to the server is fatal (default false).
falseFlag to indicate that failure to connect to the server is fatal (default false).
spring.cloud.config.headersAdditional headers used to create the client request.
Additional headers used to create the client request.
spring.cloud.config.initialize-on-context-refreshFlag to initialize bootstrap configuration on context refresh event.
falseFlag to initialize bootstrap configuration on context refresh event. Default false.
spring.cloud.config.labelThe label name to use to pull remote configuration properties.
The label name to use to pull remote configuration properties. The default is set on the server (generally "main" for a git based server).
spring.cloud.config.media-typeThe Accept header media type to send to config server.
The Accept header media type to send to config server.
spring.cloud.config.monitor.endpoint.path
spring.cloud.config.multiple-uri-strategyThe strategy to use when call to server fails and there are multiple URLs configured on the uri property (default MultipleUriStrategy#ALWAYS ).
alwaysThe strategy to use when call to server fails and there are multiple URLs configured on the uri property (default MultipleUriStrategy#ALWAYS).
spring.cloud.config.nameName of application used to fetch remote properties.
Name of application used to fetch remote properties.
spring.cloud.config.override-noneFlag to indicate that when #setAllowOverride(boolean) allowOverride is true, external properties should take lowest priority and should not override any existing property sources (including local config files).
falseFlag to indicate that when #setAllowOverride(boolean) allowOverride is true, external properties should take lowest priority and should not override any existing property sources (including local config files). Default false. This will only have an effect when using config first bootstrap.
spring.cloud.config.override-system-propertiesFlag to indicate that the external properties should override system properties.
trueFlag to indicate that the external properties should override system properties. Default true.
spring.cloud.config.passwordThe password to use (HTTP Basic) when contacting the remote server.
The password to use (HTTP Basic) when contacting the remote server.
spring.cloud.config.profileThe default profile to use when fetching remote configuration (comma-separated).
defaultThe default profile to use when fetching remote configuration (comma-separated). Default is "default".
spring.cloud.config.request-connect-timeouttimeout on waiting to connect to the Config Server.
timeout on waiting to connect to the Config Server.
spring.cloud.config.request-read-timeouttimeout on waiting to read data from the Config Server.
timeout on waiting to read data from the Config Server.
spring.cloud.config.retry.initial-intervalInitial retry interval in milliseconds.
1000Initial retry interval in milliseconds.
spring.cloud.config.retry.max-attemptsMaximum number of attempts.
6Maximum number of attempts.
spring.cloud.config.retry.max-intervalMaximum interval for backoff.
2000Maximum interval for backoff.
spring.cloud.config.retry.multiplierMultiplier for next interval.
1.1Multiplier for next interval.
spring.cloud.config.retry.use-random-policyUse a random exponential backoff policy.
falseUse a random exponential backoff policy.
spring.cloud.config.send-all-labelsIf set to true the client will send all labels to the server instead of sending one at a time.
falseIf set to true the client will send all labels to the server instead of sending one at a time. Support for this would require a config server version of 4.2.0 or higher.
spring.cloud.config.send-stateFlag to indicate whether to send state.
trueFlag to indicate whether to send state. Default true.
spring.cloud.config.server.accept-emptyFlag to indicate that If HTTP 404 needs to be sent if Application is not Found.
trueFlag to indicate that If HTTP 404 needs to be sent if Application is not Found.
spring.cloud.config.server.aws-secretsmanager.default-labelThe default staging label to be used to fetch the secret values.
The default staging label to be used to fetch the secret values. If unset, an active version of the secret will be fetched (AWSCURRENT).
spring.cloud.config.server.aws-secretsmanager.endpointThe endpoint to be used by AWS Secrets Manager client.
The endpoint to be used by AWS Secrets Manager client. This can be used to specify an alternate endpoint for the API requests.
spring.cloud.config.server.aws-secretsmanager.ignore-labelDo not set staging label when fetching the secret values.
falseDo not set staging label when fetching the secret values.
spring.cloud.config.server.aws-secretsmanager.orderThe order of the environment repository.
The order of the environment repository.
spring.cloud.config.server.aws-secretsmanager.originPrefix which indicates the origin of the property.
aws:secrets:Prefix which indicates the origin of the property. Defaults to "aws:secrets:".
spring.cloud.config.server.aws-secretsmanager.prefixPrefix indicating first level for every property loaded from AWS Secrets Manager.
Prefix indicating first level for every property loaded from AWS Secrets Manager. Value must start with a forward slash followed by a valid path segment or be empty. Defaults to "/secret".
spring.cloud.config.server.aws-secretsmanager.profile-separatorString that separates profile from the application name.
-String that separates profile from the application name.
spring.cloud.config.server.aws-secretsmanager.regionThe region to be used by AWS Secrets Manager client.
The region to be used by AWS Secrets Manager client.
spring.cloud.config.server.awsparamstore.decrypt-valuesFlag to indicate the retrieval of all AWS parameters in a hierarchy with their value decrypted.
trueFlag to indicate the retrieval of all AWS parameters in a hierarchy with their value decrypted. Defaults to "true".
spring.cloud.config.server.awsparamstore.endpointThe service endpoint to be used by the AWS Parameter Store client.
The service endpoint to be used by the AWS Parameter Store client.
spring.cloud.config.server.awsparamstore.max-resultsThe maximum number of items to return for an AWS Parameter Store API call.
10The maximum number of items to return for an AWS Parameter Store API call. Defaults to "10".
spring.cloud.config.server.awsparamstore.orderThe order of the environment repository.
The order of the environment repository.
spring.cloud.config.server.awsparamstore.originPrefix indicating the property's origin.
aws:ssm:parameter:Prefix indicating the property's origin. Defaults to "aws:ssm:parameter:".
spring.cloud.config.server.awsparamstore.prefixPrefix indicating first level for every property loaded from the AWS Parameter Store.
Prefix indicating first level for every property loaded from the AWS Parameter Store. Value must start with a forward slash followed by one or more valid path segments or be empty. Defaults to "/config".
spring.cloud.config.server.awsparamstore.profile-separatorString that separates an appended profile from the context name.
-String that separates an appended profile from the context name. Note that an AWS parameter name can only contain dots, dashes and underscores next to alphanumeric characters. Defaults to "-".
spring.cloud.config.server.awsparamstore.recursiveFlag to indicate the retrieval of all AWS parameters within a hierarchy.
trueFlag to indicate the retrieval of all AWS parameters within a hierarchy. Defaults to "true".
spring.cloud.config.server.awsparamstore.regionThe region to be used by the AWS Parameter Store client.
The region to be used by the AWS Parameter Store client.
spring.cloud.config.server.awss3.bucketName of the S3 bucket that contains config.
Name of the S3 bucket that contains config.
spring.cloud.config.server.awss3.endpointAdds the ability to override the baseUrl of the s3 client.
Adds the ability to override the baseUrl of the s3 client.
spring.cloud.config.server.awss3.order
spring.cloud.config.server.awss3.regionAWS region that contains config.
AWS region that contains config.
spring.cloud.config.server.awss3.search-pathsList of directory paths to search for profiles in the bucket.
List of directory paths to search for profiles in the bucket. Analogous to #searchPaths in Git backend.
spring.cloud.config.server.awss3.use-directory-layoutUse application name as intermediate directory.
falseUse application name as intermediate directory. Analogous to #searchPaths from Git backend.
spring.cloud.config.server.bootstrapFlag indicating that the config server should initialize its own Environment with properties from the remote repository.
falseFlag indicating that the config server should initialize its own Environment with properties from the remote repository. Off by default because it delays startup but can be useful when embedding the server in another application.
spring.cloud.config.server.credhub.ca-cert-files
spring.cloud.config.server.credhub.connection-timeout
spring.cloud.config.server.credhub.default-labelThe default label to be used when is not provided by client applications.
masterThe default label to be used when is not provided by client applications.
spring.cloud.config.server.credhub.oauth2.registration-id
spring.cloud.config.server.credhub.order
spring.cloud.config.server.credhub.pathThe common base path for credentials in CredHub.
The common base path for credentials in CredHub. It is empty by default.
spring.cloud.config.server.credhub.read-timeout
spring.cloud.config.server.credhub.url
spring.cloud.config.server.default-application-nameDefault application name when incoming requests do not have a specific one.
applicationDefault application name when incoming requests do not have a specific one.
spring.cloud.config.server.default-labelDefault repository label when incoming requests do not have a specific label.
Default repository label when incoming requests do not have a specific label.
spring.cloud.config.server.default-profileDefault application profile when incoming requests do not have a specific one.
defaultDefault application profile when incoming requests do not have a specific one.
spring.cloud.config.server.enabledFlag indicating config server is enabled.
trueFlag indicating config server is enabled.
spring.cloud.config.server.encrypt.enabledEnable decryption of environment properties before sending to client.
trueEnable decryption of environment properties before sending to client.
spring.cloud.config.server.encrypt.plain-text-encryptEnable decryption of environment properties served by plain text endpoint org.springframework.cloud.config.server.resource.ResourceController .
falseEnable decryption of environment properties served by plain text endpoint org.springframework.cloud.config.server.resource.ResourceController.
spring.cloud.config.server.fail-on-composite-errorFlag indicating that if there are any errors reading properties from a subordinate environment repository in a composite environment repository, then the entire composite read should fail.
trueFlag indicating that if there are any errors reading properties from a subordinate environment repository in a composite environment repository, then the entire composite read should fail. Useful when set to false when a Vault repository is in the composite to allow clients to still read properties from other repositories without providing a valid Vault token. Defaults to true, resulting in a failure on any error.
spring.cloud.config.server.gcp-parameter-manager.application-label
applicationspring.cloud.config.server.gcp-parameter-manager.default-label
mainspring.cloud.config.server.gcp-parameter-manager.location
globalspring.cloud.config.server.gcp-parameter-manager.order
spring.cloud.config.server.gcp-parameter-manager.profile-label
profilespring.cloud.config.server.gcp-parameter-manager.project-id
spring.cloud.config.server.gcp-secret-manager.allowed-project-idsWhen token-mandatory is false : only these project IDs may be used with client-supplied X-Project-ID .
When token-mandatory is false: only these project IDs may be used with client-supplied X-Project-ID. When empty, client-supplied project IDs are rejected. When token-mandatory is true, this list is ignored for the header; use X-Config-Token permission checks instead.
spring.cloud.config.server.gcp-secret-manager.application-label
applicationspring.cloud.config.server.gcp-secret-manager.order
spring.cloud.config.server.gcp-secret-manager.profile-label
profilespring.cloud.config.server.gcp-secret-manager.project-idUsed when X-Project-ID is absent and the metadata server is unavailable (for example local development).
Used when X-Project-ID is absent and the metadata server is unavailable (for example local development). Not validated against #allowedProjectIds.
spring.cloud.config.server.gcp-secret-manager.service-account
spring.cloud.config.server.gcp-secret-manager.token-mandatory
truespring.cloud.config.server.gcp-secret-manager.version
1spring.cloud.config.server.git.azure.identity.client-idClient ID of the Azure managed identity used for Azure DevOps authentication.
Client ID of the Azure managed identity used for Azure DevOps authentication.
spring.cloud.config.server.git.azure.identity.managed-identity-enabledWhether managed identity authentication is enabled for Azure DevOps repositories.
falseWhether managed identity authentication is enabled for Azure DevOps repositories.
spring.cloud.config.server.git.basedirBase directory for local working copy of repository.
Base directory for local working copy of repository.
spring.cloud.config.server.git.clone-on-startFlag to indicate that the repository should be cloned on startup (not on demand).
falseFlag to indicate that the repository should be cloned on startup (not on demand). Generally leads to slower startup but faster first query.
spring.cloud.config.server.git.clone-submodulesFlag to indicate that the submodules in the repository should be cloned.
falseFlag to indicate that the submodules in the repository should be cloned.
spring.cloud.config.server.git.continue-on-multiple-label-failureFlag to indicate whether to continue on multiple label failure.
falseFlag to indicate whether to continue on multiple label failure. Defaults to false.
spring.cloud.config.server.git.default-labelThe default label to be used with the remote repository.
The default label to be used with the remote repository.
spring.cloud.config.server.git.delete-untracked-branchesFlag to indicate that the branch should be deleted locally if it's origin tracked branch was removed.
falseFlag to indicate that the branch should be deleted locally if it's origin tracked branch was removed.
spring.cloud.config.server.git.force-pullFlag to indicate that the repository should force pull.
falseFlag to indicate that the repository should force pull. If true discard any local changes and take from remote repository.
spring.cloud.config.server.git.host-keyValid SSH host key.
Valid SSH host key. Must be set if hostKeyAlgorithm is also set.
spring.cloud.config.server.git.host-key-algorithmOne of ssh-dss, ssh-rsa, ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521.
One of ssh-dss, ssh-rsa, ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521. Must be set if hostKey is also set.
spring.cloud.config.server.git.ignore-local-ssh-settingsIf true, use property-based instead of file-based SSH config.
falseIf true, use property-based instead of file-based SSH config.
spring.cloud.config.server.git.known-hosts-fileLocation of custom .known_hosts file.
Location of custom .known_hosts file.
spring.cloud.config.server.git.orderThe order of the environment repository.
The order of the environment repository.
spring.cloud.config.server.git.passphrasePassphrase for unlocking your ssh private key.
Passphrase for unlocking your ssh private key.
spring.cloud.config.server.git.passwordPassword for authentication with remote repository.
Password for authentication with remote repository.
spring.cloud.config.server.git.preferred-authenticationsOverride server authentication method order.
Override server authentication method order. This should allow for evading login prompts if server has keyboard-interactive authentication before the publickey method.
spring.cloud.config.server.git.private-keyValid SSH private key.
Valid SSH private key. Must be set if ignoreLocalSshSettings is true and Git URI is SSH format.
spring.cloud.config.server.git.proxyHTTP proxy configuration.
HTTP proxy configuration.
spring.cloud.config.server.git.refresh-rateTime (in seconds) between refresh of the git repository.
0Time (in seconds) between refresh of the git repository.
spring.cloud.config.server.git.reposMap of repository identifier to location and other properties.
Map of repository identifier to location and other properties.
spring.cloud.config.server.git.search-pathsSearch paths to use within local working copy.
Search paths to use within local working copy. By default searches only the root.
spring.cloud.config.server.git.skip-ssl-validationFlag to indicate that SSL certificate validation should be bypassed when communicating with a repository served over an HTTPS connection.
falseFlag to indicate that SSL certificate validation should be bypassed when communicating with a repository served over an HTTPS connection.
spring.cloud.config.server.git.strict-host-key-checkingIf false, ignore errors with host key.
trueIf false, ignore errors with host key.
spring.cloud.config.server.git.timeoutTimeout (in seconds) for obtaining HTTP or SSH connection (if applicable), defaults to 5 seconds.
5Timeout (in seconds) for obtaining HTTP or SSH connection (if applicable), defaults to 5 seconds.
spring.cloud.config.server.git.try-master-branchTo maintain compatibility we will try the master branch in addition to main when we try to fetch the default branch.
trueTo maintain compatibility we will try the master branch in addition to main when we try to fetch the default branch.
spring.cloud.config.server.git.uriURI of remote repository.
URI of remote repository.
spring.cloud.config.server.git.usernameUsername for authentication with remote repository.
Username for authentication with remote repository.
spring.cloud.config.server.health.accept-empty
falsespring.cloud.config.server.health.down-health-status
spring.cloud.config.server.health.repositories
spring.cloud.config.server.jdbc.default-label
masterspring.cloud.config.server.jdbc.enabledFlag to indicate that JDBC environment repository configuration is enabled.
trueFlag to indicate that JDBC environment repository configuration is enabled.
spring.cloud.config.server.jdbc.fail-on-errorFlag to determine how to handle query exceptions.
trueFlag to determine how to handle query exceptions.
spring.cloud.config.server.jdbc.order
spring.cloud.config.server.jdbc.sqlSQL used to query database for keys and values.
SELECT "KEY", "VALUE" from PROPERTIES where APPLICATION=? and PROFILE=? and LABEL=?SQL used to query database for keys and values.
spring.cloud.config.server.jdbc.sql-without-profileSQL used to query database for keys and values when profile is null.
SELECT "KEY", "VALUE" from PROPERTIES where APPLICATION=? and PROFILE is null and LABEL=?SQL used to query database for keys and values when profile is null.
spring.cloud.config.server.mongodb.collectionName of the MongoDB collection to query for configuration properties.
propertiesName of the MongoDB collection to query for configuration properties.
spring.cloud.config.server.mongodb.default-labelDefault label to use if none is specified.
masterDefault label to use if none is specified.
spring.cloud.config.server.mongodb.enabledFlag to indicate that MongoDB environment repository configuration is enabled.
trueFlag to indicate that MongoDB environment repository configuration is enabled.
spring.cloud.config.server.mongodb.fail-on-errorFlag to determine how to handle query exceptions.
trueFlag to determine how to handle query exceptions.
spring.cloud.config.server.mongodb.orderOrder of the MongoDB environment repository.
Order of the MongoDB environment repository.
spring.cloud.config.server.monitor.bitbucket.enabled
truespring.cloud.config.server.monitor.bitbucket.validation-enabled
truespring.cloud.config.server.monitor.bitbucket.webhook-secret
spring.cloud.config.server.monitor.endpoint.path
/monitorspring.cloud.config.server.monitor.gitea.enabled
truespring.cloud.config.server.monitor.gitea.validation-enabled
truespring.cloud.config.server.monitor.gitea.webhook-secret
spring.cloud.config.server.monitor.gitee.enabled
truespring.cloud.config.server.monitor.gitee.validation-enabled
truespring.cloud.config.server.monitor.gitee.webhook-secret
spring.cloud.config.server.monitor.github.enabled
truespring.cloud.config.server.monitor.github.validation-enabled
truespring.cloud.config.server.monitor.github.webhook-secret
spring.cloud.config.server.monitor.gitlab.enabled
truespring.cloud.config.server.monitor.gitlab.validation-enabled
truespring.cloud.config.server.monitor.gitlab.webhook-secret
spring.cloud.config.server.monitor.gogs.enabled
truespring.cloud.config.server.monitor.gogs.validation-enabled
truespring.cloud.config.server.monitor.gogs.webhook-secret
spring.cloud.config.server.monitor.http.endpoints
spring.cloud.config.server.monitor.max-dashesUpper bound on the number of dash-separated segments processed when guessing a service name from a notification path.
20Upper bound on the number of dash-separated segments processed when guessing a service name from a notification path. Prevents a long, heavily dashed path from producing an unbounded number of candidate service names (and refresh events).
spring.cloud.config.server.native.add-label-locationsFlag to determine whether label locations should be added.
trueFlag to determine whether label locations should be added.
spring.cloud.config.server.native.default-label
masterspring.cloud.config.server.native.fail-on-errorFlag to determine how to handle exceptions during decryption (default false).
falseFlag to determine how to handle exceptions during decryption (default false).
spring.cloud.config.server.native.order
spring.cloud.config.server.native.search-locationsLocations to search for configuration files.
Locations to search for configuration files. Defaults to the same as a Spring Boot app so [classpath:/,classpath:/config/,file:./,file:./config/].
spring.cloud.config.server.native.versionVersion string to be reported for native repository.
Version string to be reported for native repository.
spring.cloud.config.server.overridesExtra map for a property source to be sent to all clients unconditionally.
Extra map for a property source to be sent to all clients unconditionally.
spring.cloud.config.server.prefixPrefix for configuration resource paths (default is empty).
Prefix for configuration resource paths (default is empty). Useful when embedding in another application when you don't want to change the context path or servlet path.
spring.cloud.config.server.redis.order
spring.cloud.config.server.reverse-location-orderBy default the location order we use in GenericResourceRepository is the order in which they are listed.
falseBy default the location order we use in GenericResourceRepository is the order in which they are listed. Prior to Hoxton.SR11 the order used to be reverse. If this property is set to true then we will reverse ther order like it used to be prior to Hoxton.SR11.
spring.cloud.config.server.strip-document-from-yamlFlag to indicate that YAML documents that are text or collections (not a map) should be returned in "native" form.
trueFlag to indicate that YAML documents that are text or collections (not a map) should be returned in "native" form.
spring.cloud.config.server.svn.basedirBase directory for local working copy of repository.
Base directory for local working copy of repository.
spring.cloud.config.server.svn.continue-on-multiple-label-failureFlag to indicate whether to continue on multiple label failure.
falseFlag to indicate whether to continue on multiple label failure. Defaults to false.
spring.cloud.config.server.svn.default-labelThe default label to be used with the remote repository.
The default label to be used with the remote repository.
spring.cloud.config.server.svn.orderThe order of the environment repository.
The order of the environment repository.
spring.cloud.config.server.svn.passphrasePassphrase for unlocking your ssh private key.
Passphrase for unlocking your ssh private key.
spring.cloud.config.server.svn.passwordPassword for authentication with remote repository.
Password for authentication with remote repository.
spring.cloud.config.server.svn.search-pathsSearch paths to use within local working copy.
Search paths to use within local working copy. By default searches only the root.
spring.cloud.config.server.svn.strict-host-key-checkingReject incoming SSH host keys from remote servers not in the known host list.
trueReject incoming SSH host keys from remote servers not in the known host list.
spring.cloud.config.server.svn.uriURI of remote repository.
URI of remote repository.
spring.cloud.config.server.svn.usernameUsername for authentication with remote repository.
Username for authentication with remote repository.
spring.cloud.config.server.vault.app-role.app-role-pathMount path of the AppRole authentication backend.
approleMount path of the AppRole authentication backend.
spring.cloud.config.server.vault.app-role.roleName of the role, optional, used for pull-mode.
Name of the role, optional, used for pull-mode.
spring.cloud.config.server.vault.app-role.role-idThe RoleId.
The RoleId.
spring.cloud.config.server.vault.app-role.secret-idThe SecretId.
The SecretId.
spring.cloud.config.server.vault.authentication
spring.cloud.config.server.vault.aws-ec2.aws-ec2-pathMount path of the AWS-EC2 authentication backend.
aws-ec2Mount path of the AWS-EC2 authentication backend.
spring.cloud.config.server.vault.aws-ec2.identity-documentURL of the AWS-EC2 PKCS7 identity document.
http://169.254.169.254/latest/dynamic/instance-identity/pkcs7URL of the AWS-EC2 PKCS7 identity document.
spring.cloud.config.server.vault.aws-ec2.nonceNonce used for AWS-EC2 authentication.
Nonce used for AWS-EC2 authentication. An empty nonce defaults to nonce generation.
spring.cloud.config.server.vault.aws-ec2.roleName of the role, optional.
Name of the role, optional.
spring.cloud.config.server.vault.aws-iam.aws-pathMount path of the AWS authentication backend.
awsMount path of the AWS authentication backend.
spring.cloud.config.server.vault.aws-iam.endpoint-uriSTS server URI.
STS server URI. @since 2.2
spring.cloud.config.server.vault.aws-iam.roleName of the role, optional.
Name of the role, optional. Defaults to the friendly IAM name if not set.
spring.cloud.config.server.vault.aws-iam.server-nameName of the server used to set X-Vault-AWS-IAM-Server-ID header in the headers of login requests.
Name of the server used to set X-Vault-AWS-IAM-Server-ID header in the headers of login requests.
spring.cloud.config.server.vault.azure-msi.azure-pathMount path of the Azure MSI authentication backend.
azureMount path of the Azure MSI authentication backend.
spring.cloud.config.server.vault.azure-msi.identity-token-serviceURI to the Azure MSI Identity Service.
URI to the Azure MSI Identity Service.
spring.cloud.config.server.vault.azure-msi.metadata-serviceURI to the Azure MSI Metadata Service.
URI to the Azure MSI Metadata Service.
spring.cloud.config.server.vault.azure-msi.roleName of the role.
Name of the role.
spring.cloud.config.server.vault.backendVault backend.
secretVault backend. Defaults to secret.
spring.cloud.config.server.vault.default-keyThe key in vault shared by all applications.
applicationThe key in vault shared by all applications. Defaults to application. Set to empty to disable.
spring.cloud.config.server.vault.default-label
mainspring.cloud.config.server.vault.enable-labelFlag to indicate that the repository should use 'label' as well as 'application-name' and 'profile', for vault secrets.
falseFlag to indicate that the repository should use 'label' as well as 'application-name' and 'profile', for vault secrets. By default, the vault secrets are expected to be in 'application-name,profile' path. When this flag enabled, they are expected to be in 'application-name,profile,label' path. To maintain compatibility this flag is not enabled by default.
spring.cloud.config.server.vault.full-key-pathInclude the full key path in the PropertySource name.
falseInclude the full key path in the PropertySource name. Defaults to false
spring.cloud.config.server.vault.gcp-gce.gcp-pathMount path of the Kubernetes authentication backend.
gcpMount path of the Kubernetes authentication backend.
spring.cloud.config.server.vault.gcp-gce.roleName of the role against which the login is being attempted.
Name of the role against which the login is being attempted.
spring.cloud.config.server.vault.gcp-gce.service-accountOptional service account id.
Optional service account id. Using the default id if left unconfigured.
spring.cloud.config.server.vault.gcp-iam.credentials.encoded-keyThe base64 encoded contents of an OAuth2 account private key in JSON format.
The base64 encoded contents of an OAuth2 account private key in JSON format.
spring.cloud.config.server.vault.gcp-iam.credentials.locationLocation of the OAuth2 credentials private key.
Location of the OAuth2 credentials private key.
Since this is a Resource, the private key can be in a multitude of locations, such as a local file system, classpath, URL, etc.
spring.cloud.config.server.vault.gcp-iam.gcp-pathMount path of the Kubernetes authentication backend.
gcpMount path of the Kubernetes authentication backend.
spring.cloud.config.server.vault.gcp-iam.jwt-validityValidity of the JWT token.
15mValidity of the JWT token.
spring.cloud.config.server.vault.gcp-iam.project-idOverrides the GCP project Id.
Overrides the GCP project Id.
spring.cloud.config.server.vault.gcp-iam.roleName of the role against which the login is being attempted.
Name of the role against which the login is being attempted.
spring.cloud.config.server.vault.gcp-iam.service-account-idOverrides the GCP service account Id.
Overrides the GCP service account Id.
spring.cloud.config.server.vault.hostVault host.
127.0.0.1Vault host. Defaults to 127.0.0.1.
spring.cloud.config.server.vault.kubernetes.kubernetes-pathMount path of the Kubernetes authentication backend.
kubernetesMount path of the Kubernetes authentication backend.
spring.cloud.config.server.vault.kubernetes.roleName of the role against which the login is being attempted.
Name of the role against which the login is being attempted.
spring.cloud.config.server.vault.kubernetes.service-account-token-filePath to the service account token file.
/var/run/secrets/kubernetes.io/serviceaccount/tokenPath to the service account token file.
spring.cloud.config.server.vault.kv-versionValue to indicate which version of Vault kv backend is used.
1Value to indicate which version of Vault kv backend is used. Defaults to 1.
spring.cloud.config.server.vault.namespaceThe value of the Vault X-Vault-Namespace header.
The value of the Vault X-Vault-Namespace header. Defaults to null. This a Vault Enterprise feature only.
spring.cloud.config.server.vault.order
spring.cloud.config.server.vault.path-to-keyKV2 API required "data" after "mount-path".
KV2 API required "data" after "mount-path". There could be folder/path structure, where the keys/applications are grouped. This property is the path after mount-path, under which application(s) are located (appended after "data") Default value is blank, which means all grouped applications are located right under the mount-path
spring.cloud.config.server.vault.pcf.instance-certificatePath to the instance certificate (PEM).
Path to the instance certificate (PEM). Defaults to CF_INSTANCE_CERT env variable.
spring.cloud.config.server.vault.pcf.instance-keyPath to the instance key (PEM).
Path to the instance key (PEM). Defaults to CF_INSTANCE_KEY env variable.
spring.cloud.config.server.vault.pcf.pcf-pathMount path of the Kubernetes authentication backend.
pcfMount path of the Kubernetes authentication backend.
spring.cloud.config.server.vault.pcf.roleName of the role against which the login is being attempted.
Name of the role against which the login is being attempted.
spring.cloud.config.server.vault.portVault port.
8200Vault port. Defaults to 8200.
spring.cloud.config.server.vault.profile-separatorVault profile separator.
,Vault profile separator. Defaults to comma.
spring.cloud.config.server.vault.proxyHTTP proxy configuration.
HTTP proxy configuration.
spring.cloud.config.server.vault.schemeVault scheme.
httpVault scheme. Defaults to http.
spring.cloud.config.server.vault.skip-ssl-validationFlag to indicate that SSL certificate validation should be bypassed when communicating with a repository served over an HTTPS connection.
falseFlag to indicate that SSL certificate validation should be bypassed when communicating with a repository served over an HTTPS connection.
spring.cloud.config.server.vault.ssl.cert-auth-pathMount path of the TLS cert authentication backend.
certMount path of the TLS cert authentication backend.
spring.cloud.config.server.vault.ssl.key-storeTrust store that holds certificates and private keys.
Trust store that holds certificates and private keys.
spring.cloud.config.server.vault.ssl.key-store-passwordPassword used to access the key store.
Password used to access the key store.
spring.cloud.config.server.vault.ssl.trust-storeTrust store that holds SSL certificates.
Trust store that holds SSL certificates.
spring.cloud.config.server.vault.ssl.trust-store-passwordPassword used to access the trust store.
Password used to access the trust store.
spring.cloud.config.server.vault.timeoutTimeout (in seconds) for obtaining HTTP connection, defaults to 5 seconds.
5Timeout (in seconds) for obtaining HTTP connection, defaults to 5 seconds.
spring.cloud.config.server.vault.tokenStatic vault token.
Static vault token. Required if #authentication is TOKEN.
spring.cloud.config.tlsTLS properties.
TLS properties.
spring.cloud.config.tokenSecurity Token passed thru to underlying environment repository.
Security Token passed thru to underlying environment repository.
spring.cloud.config.uriThe URI of the remote server (default http://localhost:8888).
["http://localhost:8888"]The URI of the remote server (default http://localhost:8888).
spring.cloud.config.usernameThe username to use (HTTP Basic) when contacting the remote server.
The username to use (HTTP Basic) when contacting the remote server.
Required settings may be needed to activate or affect the feature; review them even when they have a default. Optional settings only need to be set to change a default or to turn on the behavior they control. Third party settings belong to libraries such as Spring Boot that CAS builds on; their own documentation may have more detail.
Hibernate & JDBC
Control global properties that are relevant to Hibernate, when CAS attempts to employ and utilize database resources, connections and queries.
cas.jdbc.gen-ddlWhether to generate DDL after the EntityManagerFactory has been initialized creating/updating all relevant tables.
trueWhether to generate DDL after the EntityManagerFactory has been initialized creating/updating all relevant tables.
cas.jdbc.physical-table-namesIndicate a physical table name to be used by the hibernate naming strategy in case table names need to be customized for the specific type of database.
Indicate a physical table name to be used by the hibernate naming strategy in case table names need to be customized for the specific type of database. The key here indicates the CAS-provided table name and the value is the translate physical name for the database. If a match is not found for the CAS-provided table name, then that name will be used by default.
cas.jdbc.show-sqlWhether SQL queries should be displayed in the console/logs.
falseWhether SQL queries should be displayed in the console/logs.
Notes on configuration
Configuration Metadata
The collection of configuration properties listed in this section are automatically generated from the CAS source and components that contain the actual field definitions, types, descriptions, modules, etc. This metadata may not always be 100% accurate, or could be lacking details and sufficient explanations.
Be Selective
This section is meant as a guide only. Do NOT copy/paste the entire collection of settings into your CAS configuration; rather pick only the properties that you need. Do NOT enable settings unless you are certain of their purpose and do NOT copy settings into your configuration only to keep them as reference. All these ideas lead to upgrade headaches, maintenance nightmares and premature aging.
YAGNI
Note that for nearly ALL use cases, declaring and configuring properties listed here is sufficient. You should NOT have to explicitly massage a CAS XML/Java/etc configuration file to design an authentication handler, create attribute release policies, etc. CAS at runtime will auto-configure all required changes for you. If you are unsure about the meaning of a given CAS setting, do NOT turn it on without hesitation. Review the codebase or better yet, ask questions to clarify the intended behavior.
Naming Convention
Property names can be specified in very relaxed terms. For instance cas.someProperty, cas.some-property, cas.some_property are all valid names. While all
forms are accepted by CAS, there are certain components (in CAS and other frameworks used) whose activation at runtime is conditional on a property value, where
this property is required to have been specified in CAS configuration using kebab case. This is both true for properties that are owned by CAS as well as those
that might be presented to the system via an external library or framework such as Spring Boot, etc.
When possible, properties should be stored in lower-case kebab format, such as cas.property-name=value.
The only possible exception to this rule is when naming actuator endpoints; The name of the
actuator endpoints (i.e. ssoSessions) MUST remain in camelCase mode.
Settings and properties that are controlled by the CAS platform directly always begin with the prefix cas. All other settings are controlled and provided
to CAS via other underlying frameworks and may have their own schemas and syntax. BE CAREFUL with
the distinction. Unrecognized properties are rejected by CAS and/or frameworks upon which CAS depends. This means if you somehow misspell a property definition
or fail to adhere to the dot-notation syntax and such, your setting is entirely refused by CAS and likely the feature it controls will never be activated in the
way you intend.
Validation
Configuration properties are automatically validated on CAS startup to report issues with configuration binding, especially if defined CAS settings cannot be recognized or validated by the configuration schema. Additional validation processes are also handled via Configuration Metadata and property migrations applied automatically on startup by Spring Boot and family.
Indexed Settings
CAS settings able to accept multiple values are typically documented with an index, such as cas.some.setting[0]=value. The index [0] is meant to be
incremented by the adopter to allow for distinct multiple configuration blocks.