diff --git a/reference/html/README.html b/reference/html/README.html index 53856ae2..f7731fbe 100644 --- a/reference/html/README.html +++ b/reference/html/README.html @@ -149,7 +149,9 @@ $(globalSwitch);
-

Spring Cloud Vault Config provides client-side support for externalized configuration in a distributed system. With HashiCorp’s Vault you have a central place to manage external secret properties for applications across all environments. Vault can manage static and dynamic secrets such as username/password for remote applications/resources and provide credentials for external services such as MySQL, PostgreSQL, Apache Cassandra, MongoDB, Consul, AWS and more.

+

Spring Cloud Vault Config provides client-side support for externalized configuration in a distributed system. +With HashiCorp’s Vault you have a central place to manage external secret properties for applications across all environments. +Vault can manage static and dynamic secrets such as username/password for remote applications/resources and provide credentials for external services such as MySQL, PostgreSQL, Apache Cassandra, MongoDB, Consul, AWS and more.

@@ -167,7 +169,7 @@ $(globalSwitch);

Retrieve secrets from Vault and initialize Spring Environment with remote property sources.

  • -

    Obtain secrets secured with SSL.

    +

    Obtain Key-Value secrets secured with SSL.

  • Generate credentials for @@ -203,8 +205,7 @@ $(globalSwitch);

    Prerequisites

    -

    To get started with Vault and this guide you need a -*NIX-like operating systems that provides:

    +

    To get started with Vault and this guide you need a *NIX-like operating systems that provides:

    Vault will initialize and return a set of unsealing keys and the root token. -Pick 3 keys and unseal Vault. Store the Vault token in the VAULT_TOKEN - environment variable.

    +Pick 3 keys and unseal Vault. +Store the Vault token in the VAULT_TOKEN +environment variable.

    @@ -384,8 +388,8 @@ $ vault token-create -id="00000000-0000-0000-0000-000000000000" -policy="root"
    -

    Spring Cloud Vault accesses different resources. By default, the secret -backend is enabled which accesses secret config settings via JSON endpoints.

    +

    Spring Cloud Vault accesses different resources. +By default, the secret backend is enabled which accesses secret config settings via JSON endpoints.

    The HTTP service has resources in the form:

    @@ -400,10 +404,8 @@ backend is enabled which accesses secret config settings via JSON endpoints.

    where the "application" is injected as the spring.application.name in the -SpringApplication (i.e. what is normally "application" in a regular -Spring Boot app), "profile" is an active profile (or comma-separated -list of properties). Properties retrieved from Vault will be used "as-is" -without further prefixing of the property names.

    +SpringApplication (i.e. what is normally "application" in a regular Spring Boot app), "profile" is an active profile (or comma-separated list of properties). +Properties retrieved from Vault will be used "as-is" without further prefixing of the property names.

    @@ -411,9 +413,8 @@ without further prefixing of the property names.

    Client Side Usage

    -

    To use these features in an application, just build it as a Spring -Boot application that depends on spring-cloud-vault-config (e.g. see -the test cases). Example Maven configuration:

    +

    To use these features in an application, just build it as a Spring Boot application that depends on spring-cloud-vault-config (e.g. see the test cases). +Example Maven configuration:

    Example 1. pom.xml
    @@ -479,11 +480,8 @@ public class Application {
    -

    When it runs it will pick up the external configuration from the -default local Vault server on port 8200 if it is running. To modify -the startup behavior you can change the location of the Vault server -using bootstrap.properties (like application.properties but for -the bootstrap phase of an application context), e.g.

    +

    When it runs it will pick up the external configuration from the default local Vault server on port 8200 if it is running. +To modify the startup behavior you can change the location of the Vault server using bootstrap.properties (like application.properties but for the bootstrap phase of an application context), e.g.

    Example 2. bootstrap.yml
    @@ -506,8 +504,8 @@ the bootstrap phase of an application context), e.g.

    • -

      host sets the hostname of the Vault host. The host name will be used -for SSL certificate validation

      +

      host sets the hostname of the Vault host. +The host name will be used for SSL certificate validation

    • port sets the Vault port

      @@ -531,15 +529,13 @@ Supported schemes are http and https.

    -

    Enabling further integrations requires additional dependencies and -configuration. Depending on how you have set up Vault you might need -additional configuration like +

    Enabling further integrations requires additional dependencies and configuration. +Depending on how you have set up Vault you might need additional configuration like SSL and authentication.

    -

    If the application imports the spring-boot-starter-actuator project, the -status of the vault server will be available via the /health endpoint.

    +

    If the application imports the spring-boot-starter-actuator project, the status of the vault server will be available via the /health endpoint.

    The vault health indicator can be enabled or disabled through the property management.health.vault.enabled (default to true).

    @@ -573,7 +569,9 @@ status of the vault server will be available via the /health endpoi -Consider carefully your security requirements. Static token authentication is fine if you want quickly get started with Vault, but a static token is not protected any further. Any disclosure to unintended parties allows Vault use with the associated token roles. +Consider carefully your security requirements. +Static token authentication is fine if you want quickly get started with Vault, but a static token is not protected any further. +Any disclosure to unintended parties allows Vault use with the associated token roles. @@ -587,9 +585,8 @@ Consider carefully your security requirements. Static token authentication is fi

    Build requirements for Vault

    -

    Spring Cloud Vault Config requires SSL certificates and a running -Vault instance listening on localhost:8200. Certificates and the Vault -setup are scripted, the scripts are located in src/test/bash.

    +

    Spring Cloud Vault Config requires SSL certificates and a running Vault instance listening on localhost:8200. +Certificates and the Vault setup are scripted, the scripts are located in src/test/bash.

    The following scripts need to be run prior to building the project for the tests to pass.

    @@ -602,7 +599,8 @@ $ ./src/test/bash/local_run_vault.sh
    -

    Leave Vault uninitialized, the tests will initialize and unseal Vault. They will also create a root token 00000000-0000-0000-0000-000000000000.

    +

    Leave Vault uninitialized, the tests will initialize and unseal Vault. +They will also create a root token 00000000-0000-0000-0000-000000000000.

    Changes to the documentation should be made to the adocs found under docs/src/main/asciidoc/

    diff --git a/reference/html/index.html b/reference/html/index.html index fb22df0e..20ef4bd5 100644 --- a/reference/html/index.html +++ b/reference/html/index.html @@ -144,7 +144,7 @@ $(globalSwitch);
  • Secret Backends
    -

    Azure MSI authentication fetches environmental details about the virtual machine -(subscription Id, resource group, VM name) from the instance metadata service.

    +

    Azure MSI authentication fetches environmental details about the virtual machine (subscription Id, resource group, VM name) from the instance metadata service.

    See also: Vault Documentation: Using the azure auth backend

    @@ -1305,8 +1273,7 @@ bound to a VM instance.

    TLS certificate authentication

    -

    The cert auth backend allows authentication using SSL/TLS client -certificates that are either signed by a CA or self-signed.

    +

    The cert auth backend allows authentication using SSL/TLS client certificates that are either signed by a CA or self-signed.

    To enable cert authentication you need to:

    @@ -1317,8 +1284,7 @@ certificates that are either signed by a CA or self-signed.

    Use SSL, see Vault Client SSL configuration

  • -

    Configure a Java Keystore that contains the client -certificate and the private key

    +

    Configure a Java Keystore that contains the client certificate and the private key

  • Set the spring.cloud.vault.authentication to CERT

    @@ -1347,12 +1313,11 @@ certificate and the private key

    Cubbyhole authentication

    -

    Cubbyhole authentication uses Vault primitives to provide a secured authentication -workflow. Cubbyhole authentication uses tokens as primary login method. -An ephemeral token is used to obtain a second, login VaultToken from Vault’s -Cubbyhole secret backend. The login token is usually longer-lived and used to -interact with Vault. The login token will be retrieved from a wrapped -response stored at /cubbyhole/response.

    +

    Cubbyhole authentication uses Vault primitives to provide a secured authentication workflow. +Cubbyhole authentication uses tokens as primary login method. +An ephemeral token is used to obtain a second, login VaultToken from Vault’s Cubbyhole secret backend. +The login token is usually longer-lived and used to interact with Vault. +The login token will be retrieved from a wrapped response stored at /cubbyhole/response.

    Creating a wrapped token

    @@ -1421,18 +1386,13 @@ wrapped_accessor: 46b6aebb-187f-932a-26d7-4f3d86a68319 auth backend allows Vault login by using existing GCP (Google Cloud Platform) IAM and GCE credentials.

    -

    GCP GCE (Google Compute Engine) authentication creates a signature in the form of a -JSON Web Token (JWT) for a service account. A JWT for a Compute Engine instance -is obtained from the GCE metadata service using Instance identification. +

    GCP GCE (Google Compute Engine) authentication creates a signature in the form of a JSON Web Token (JWT) for a service account. +A JWT for a Compute Engine instance is obtained from the GCE metadata service using Instance identification. This API creates a JSON Web Token that can be used to confirm the instance identity.

    -

    Unlike most Vault authentication backends, this backend -does not require first-deploying, or provisioning security-sensitive -credentials (tokens, username/password, client certificates, etc.). -Instead, it treats GCP as a Trusted Third Party and uses the -cryptographically signed dynamic metadata information that uniquely -represents each GCP service account.

    +

    Unlike most Vault authentication backends, this backend does not require first-deploying, or provisioning security-sensitive credentials (tokens, username/password, client certificates, etc.). +Instead, it treats GCP as a Trusted Third Party and uses the cryptographically signed dynamic metadata information that uniquely represents each GCP service account.

    Example 22. bootstrap.yml with required GCP-GCE Authentication properties
    @@ -1471,7 +1431,8 @@ represents each GCP service account.

    gcp-path sets the path of the GCP mount to use

  • -

    service-account allows overriding the service account Id to a specific value. Defaults to the default service account.

    +

    service-account allows overriding the service account Id to a specific value. +Defaults to the default service account.

  • @@ -1496,18 +1457,14 @@ represents each GCP service account.

    auth backend allows Vault login by using existing GCP (Google Cloud Platform) IAM and GCE credentials.

    -

    GCP IAM authentication creates a signature in the form of a JSON Web Token (JWT) -for a service account. A JWT for a service account is obtained by -calling GCP IAM’s projects.serviceAccounts.signJwt API. The caller authenticates against GCP IAM -and proves thereby its identity. This Vault backend treats GCP as a Trusted Third Party.

    +

    GCP IAM authentication creates a signature in the form of a JSON Web Token (JWT) for a service account. +A JWT for a service account is obtained by calling GCP IAM’s projects.serviceAccounts.signJwt API. The caller authenticates against GCP IAM and proves thereby its identity. +This Vault backend treats GCP as a Trusted Third Party.

    -

    IAM credentials can be obtained from either the runtime environment -, specifically the GOOGLE_APPLICATION_CREDENTIALS -environment variable, the Google Compute metadata service, -or supplied externally as e.g. JSON or base64 encoded. -JSON is the preferred form as it carries the project id and -service account identifier required for calling projects.serviceAccounts.signJwt.

    +

    IAM credentials can be obtained from either the runtime environment , specifically the GOOGLE_APPLICATION_CREDENTIALS +environment variable, the Google Compute metadata service, or supplied externally as e.g. JSON or base64 encoded. +JSON is the preferred form as it carries the project id and service account identifier required for calling projects.serviceAccounts.signJwt.

    Example 24. bootstrap.yml with required GCP-IAM Authentication properties
    @@ -1557,20 +1514,21 @@ service account identifier required for calling projects.serviceAccounts.s

    gcp-path sets the path of the GCP mount to use

  • -

    jwt-validity configures the JWT token validity. Defaults to 15 minutes.

    +

    jwt-validity configures the JWT token validity. +Defaults to 15 minutes.

  • -

    project-id allows overriding the project Id to a specific value. Defaults to the project Id from the obtained credential.

    +

    project-id allows overriding the project Id to a specific value. +Defaults to the project Id from the obtained credential.

  • -

    service-account allows overriding the service account Id to a specific value. Defaults to the service account from the obtained credential.

    +

    service-account allows overriding the service account Id to a specific value. +Defaults to the service account from the obtained credential.

  • -

    GCP IAM authentication requires the Google Cloud Java SDK dependency -(com.google.apis:google-api-services-iam and com.google.auth:google-auth-library-oauth2-http) -as the authentication implementation uses Google APIs for credentials and JWT signing.

    +

    GCP IAM authentication requires the Google Cloud Java SDK dependency (com.google.apis:google-api-services-iam and com.google.auth:google-auth-library-oauth2-http) as the authentication implementation uses Google APIs for credentials and JWT signing.

    @@ -1579,9 +1537,8 @@ as the authentication implementation uses Google APIs for credentials and JWT si
    -Google credentials require an OAuth 2 token maintaining the token lifecycle. All API -is synchronous therefore, GcpIamAuthentication does not support AuthenticationSteps which is -required for reactive usage. +Google credentials require an OAuth 2 token maintaining the token lifecycle. +All API is synchronous therefore, GcpIamAuthentication does not support AuthenticationSteps which is required for reactive usage.
    @@ -1633,7 +1590,8 @@ The authentication is role based and the role is bound to a service account name

    kubernetes-path sets the path of the Kubernetes mount to use.

  • -

    service-account-token-file sets the location of the file containing the Kubernetes Service Account Token. Defaults to /var/run/secrets/kubernetes.io/serviceaccount/token.

    +

    service-account-token-file sets the location of the file containing the Kubernetes Service Account Token. +Defaults to /var/run/secrets/kubernetes.io/serviceaccount/token.

  • @@ -1729,14 +1687,24 @@ PCF authentication requires BouncyCastle (bcpkix-jdk15on) to be on the classpath

    Generic Backend

    +
    + + + + + +
    + + +This backend is deprecated in favor of the Key-Value backend and will be removed with the next major version. +
    +
    -

    Spring Cloud Vault supports at the basic level the generic secret -backend. The generic secret backend allows storage of arbitrary -values as key-value store. A single context can store one or many -key-value tuples. Contexts can be organized hierarchically. -Spring Cloud Vault allows using the Application name -and a default context name (application) in combination with active -profiles.

    +

    Spring Cloud Vault supports at the basic level the key-value secret backend. +The key-value secret backend allows storage of arbitrary values as key-value store. +A single context can store one or many key-value tuples. +Contexts can be organized hierarchically. +Spring Cloud Vault allows using the Application name and a default context name (application) in combination with active profiles.

    @@ -1763,9 +1731,8 @@ profiles.

    -

    Secrets can be obtained from other contexts within the generic backend by adding their -paths to the application name, separated by commas. For example, given the application -name usefulapp,mysql1,projectx/aws, each of these folders will be used:

    +

    Secrets can be obtained from other contexts within the key-value backend by adding their paths to the application name, separated by commas. +For example, given the application name usefulapp,mysql1,projectx/aws, each of these folders will be used:

      @@ -1805,8 +1772,7 @@ No active profiles will skip accessing contexts with a profile name.

      • -

        enabled setting this value to false disables the secret backend -config usage

        +

        enabled setting this value to false disables the secret backend config usage

      • backend sets the path of the secret mount to use

        @@ -1815,40 +1781,26 @@ config usage

        default-context sets the context name used by all applications

      • -

        application-name overrides the application name for use in the generic backend

        +

        application-name overrides the application name for use in the key-value backend

      • -

        profile-separator separates the profile name from the context in -property sources with profiles

        +

        profile-separator separates the profile name from the context in property sources with profiles

      -
      - - - - - -
      - - -The key-value secret backend can be operated in versioned (v2) and non-versioned (v1) modes. Depending on the mode of operation, a different API is required to access secrets. Make sure to enable generic secret backend usage for non-versioned key-value backends and kv secret backend usage for versioned key-value backends. -
      -
    -

    Versioned Key-Value Backend

    +

    Key-Value Backend

    -

    Spring Cloud Vault supports the versioned Key-Value secret -backend. The key-value backend allows storage of arbitrary -values as key-value store. A single context can store one or many -key-value tuples. Contexts can be organized hierarchically. -Spring Cloud Vault allows using the Application name -and a default context name (application) in combination with active -profiles.

    +

    Spring Cloud Vault supports the Key-Value secret backend. +The key-value backend allows storage of arbitrary values as key-value store. +A single context can store one or many key-value tuples. +Contexts can be organized hierarchically. +Spring Cloud Vault determines itself whether a secret is using versioning. +Spring Cloud Vault allows using the Application name and a default context name (application) in combination with active profiles.

    @@ -1875,9 +1827,8 @@ profiles.

    -

    Secrets can be obtained from other contexts within the key-value backend by adding their -paths to the application name, separated by commas. For example, given the application -name usefulapp,mysql1,projectx/aws, each of these folders will be used:

    +

    Secrets can be obtained from other contexts within the key-value backend by adding their paths to the application name, separated by commas. +For example, given the application name usefulapp,mysql1,projectx/aws, each of these folders will be used:

      @@ -1929,8 +1880,7 @@ Spring Cloud Vault adds the data/ context between the mount path an
      • -

        enabled setting this value to false disables the secret backend -config usage

        +

        enabled setting this value to false disables the secret backend config usage

      • backend sets the path of the secret mount to use

        @@ -1939,11 +1889,10 @@ config usage

        default-context sets the context name used by all applications

      • -

        application-name overrides the application name for use in the generic backend

        +

        application-name overrides the application name for use in the key-value backend

      • -

        profile-separator separates the profile name from the context in -property sources with profiles

        +

        profile-separator separates the profile name from the context in property sources with profiles

      @@ -1954,13 +1903,23 @@ property sources with profiles

      -The key-value secret backend can be operated in versioned (v2) and non-versioned (v1) modes. Depending on the mode of operation, a different API is required to access secrets. Make sure to enable generic secret backend usage for non-versioned key-value backends and kv secret backend usage for versioned key-value backends. +The key-value secret backend can be operated in versioned (v2) and non-versioned (v1) modes.
    +
    @@ -1988,14 +1947,12 @@ dependency.

    The integration can be enabled by setting -spring.cloud.vault.consul.enabled=true (default false) and -providing the role name with spring.cloud.vault.consul.role=….

    +spring.cloud.vault.consul.enabled=true (default false) and providing the role name with spring.cloud.vault.consul.role=….

    The obtained token is stored in spring.cloud.consul.token -so using Spring Cloud Consul can pick up the generated -credentials without further configuration. You can configure -the property name by setting spring.cloud.vault.consul.token-property.

    +so using Spring Cloud Consul can pick up the generated credentials without further configuration. +You can configure the property name by setting spring.cloud.vault.consul.token-property.

    @@ -2058,14 +2015,12 @@ dependency.

    The integration can be enabled by setting -spring.cloud.vault.rabbitmq.enabled=true (default false) -and providing the role name with spring.cloud.vault.rabbitmq.role=….

    +spring.cloud.vault.rabbitmq.enabled=true (default false) and providing the role name with spring.cloud.vault.rabbitmq.role=….

    Username and password are stored in spring.rabbitmq.username -and spring.rabbitmq.password so using Spring Boot will pick up the generated -credentials without further configuration. You can configure the property names -by setting spring.cloud.vault.rabbitmq.username-property and +and spring.rabbitmq.password so using Spring Boot will pick up the generated credentials without further configuration. +You can configure the property names by setting spring.cloud.vault.rabbitmq.username-property and spring.cloud.vault.rabbitmq.password-property.

    @@ -2133,14 +2088,12 @@ dependency.

    The integration can be enabled by setting -spring.cloud.vault.aws=true (default false) -and providing the role name with spring.cloud.vault.aws.role=….

    +spring.cloud.vault.aws=true (default false) and providing the role name with spring.cloud.vault.aws.role=….

    The access key and secret key are stored in cloud.aws.credentials.accessKey -and cloud.aws.credentials.secretKey so using Spring Cloud AWS will pick up the generated -credentials without further configuration. You can configure the property names -by setting spring.cloud.vault.aws.access-key-property and +and cloud.aws.credentials.secretKey so using Spring Cloud AWS will pick up the generated credentials without further configuration. +You can configure the property names by setting spring.cloud.vault.aws.access-key-property and spring.cloud.vault.aws.secret-key-property.

    @@ -2187,11 +2140,8 @@ by setting spring.cloud.vault.aws.access-key-property and

    Database backends

    -

    Vault supports several database secret backends to generate database -credentials dynamically based on configured roles. This means -services that need to access a database no longer need to configure -credentials: they can request them from Vault, and use Vault’s leasing -mechanism to more easily roll keys.

    +

    Vault supports several database secret backends to generate database credentials dynamically based on configured roles. +This means services that need to access a database no longer need to configure credentials: they can request them from Vault, and use Vault’s leasing mechanism to more easily roll keys.

    Spring Cloud Vault integrates with these backends:

    @@ -2216,15 +2166,13 @@ mechanism to more easily roll keys.

    -

    Using a database secret backend requires to enable the -backend in the configuration and the spring-cloud-vault-config-databases +

    Using a database secret backend requires to enable the backend in the configuration and the spring-cloud-vault-config-databases dependency.

    -

    Vault ships since 0.7.1 with a dedicated database secret backend that allows -database integration via plugins. You can use that specific backend by using the -generic database backend. Make sure to specify the appropriate -backend path, e.g. spring.cloud.vault.mysql.role.backend=database.

    +

    Vault ships since 0.7.1 with a dedicated database secret backend that allows database integration via plugins. +You can use that specific backend by using the generic database backend. +Make sure to specify the appropriate backend path, e.g. spring.cloud.vault.mysql.role.backend=database.

    Example 32. pom.xml
    @@ -2249,9 +2197,7 @@ backend path, e.g. spring.cloud.vault.mysql.role.backend=database.< -Enabling multiple JDBC-compliant databases will generate credentials -and store them by default in the same property keys hence property names for -JDBC secrets need to be configured separately. +Enabling multiple JDBC-compliant databases will generate credentials and store them by default in the same property keys hence property names for JDBC secrets need to be configured separately. @@ -2262,15 +2208,13 @@ JDBC secrets need to be configured separately.

    Spring Cloud Vault can obtain credentials for any database listed at https://www.vaultproject.io/api/secret/databases/index.html. The integration can be enabled by setting -spring.cloud.vault.database.enabled=true (default false) and -providing the role name with spring.cloud.vault.database.role=….

    +spring.cloud.vault.database.enabled=true (default false) and providing the role name with spring.cloud.vault.database.role=….

    While the database backend is a generic one, spring.cloud.vault.database -specifically targets JDBC databases. Username and password are -stored in spring.datasource.username and spring.datasource.password -so using Spring Boot will pick up the generated credentials -for your DataSource without further configuration. +specifically targets JDBC databases. +Username and password are stored in spring.datasource.username and spring.datasource.password +so using Spring Boot will pick up the generated credentials for your DataSource without further configuration. You can configure the property names by setting spring.cloud.vault.database.username-property and spring.cloud.vault.database.password-property.

    @@ -2319,11 +2263,8 @@ You can configure the property names by setting -Spring Cloud Vault does not support getting new credentials and -configuring your DataSource with them when the maximum lease time -has been reached. That is, if max_ttl of the Database role in Vault -is set to 24h that means that 24 hours after your application has -started it can no longer authenticate with the database. +Spring Cloud Vault does not support getting new credentials and configuring your DataSource with them when the maximum lease time has been reached. +That is, if max_ttl of the Database role in Vault is set to 24h that means that 24 hours after your application has started it can no longer authenticate with the database. @@ -2338,8 +2279,7 @@ started it can no longer authenticate with the database. -The cassandra backend has been deprecated in Vault 0.7.1 and -it is recommended to use the database backend and mount it as cassandra. +The cassandra backend has been deprecated in Vault 0.7.1 and it is recommended to use the database backend and mount it as cassandra. @@ -2347,13 +2287,11 @@ it is recommended to use the database backend and mount it as

    Spring Cloud Vault can obtain credentials for Apache Cassandra. The integration can be enabled by setting -spring.cloud.vault.cassandra.enabled=true (default false) and -providing the role name with spring.cloud.vault.cassandra.role=….

    +spring.cloud.vault.cassandra.enabled=true (default false) and providing the role name with spring.cloud.vault.cassandra.role=….

    Username and password are stored in spring.data.cassandra.username -and spring.data.cassandra.password so using Spring Boot will pick -up the generated credentials without further configuration. +and spring.data.cassandra.password so using Spring Boot will pick up the generated credentials without further configuration. You can configure the property names by setting spring.cloud.vault.cassandra.username-property and spring.cloud.vault.cassandra.password-property.

    @@ -2405,8 +2343,7 @@ You can configure the property names by setting -The mongodb backend has been deprecated in Vault 0.7.1 and -it is recommended to use the database backend and mount it as mongodb. +The mongodb backend has been deprecated in Vault 0.7.1 and it is recommended to use the database backend and mount it as mongodb. @@ -2414,13 +2351,11 @@ it is recommended to use the database backend and mount it as

    Spring Cloud Vault can obtain credentials for MongoDB. The integration can be enabled by setting -spring.cloud.vault.mongodb.enabled=true (default false) and -providing the role name with spring.cloud.vault.mongodb.role=….

    +spring.cloud.vault.mongodb.enabled=true (default false) and providing the role name with spring.cloud.vault.mongodb.role=….

    Username and password are stored in spring.data.mongodb.username -and spring.data.mongodb.password so using Spring Boot will -pick up the generated credentials without further configuration. +and spring.data.mongodb.password so using Spring Boot will pick up the generated credentials without further configuration. You can configure the property names by setting spring.cloud.vault.mongodb.username-property and spring.cloud.vault.mongodb.password-property.

    @@ -2472,8 +2407,7 @@ You can configure the property names by setting -The mysql backend has been deprecated in Vault 0.7.1 and -it is recommended to use the database backend and mount it as mysql. +The mysql backend has been deprecated in Vault 0.7.1 and it is recommended to use the database backend and mount it as mysql. Configuration for spring.cloud.vault.mysql will be removed in a future version. @@ -2482,13 +2416,11 @@ Configuration for spring.cloud.vault.mysql will be removed in a fut

    Spring Cloud Vault can obtain credentials for MySQL. The integration can be enabled by setting -spring.cloud.vault.mysql.enabled=true (default false) and -providing the role name with spring.cloud.vault.mysql.role=….

    +spring.cloud.vault.mysql.enabled=true (default false) and providing the role name with spring.cloud.vault.mysql.role=….

    Username and password are stored in spring.datasource.username -and spring.datasource.password so using Spring Boot will -pick up the generated credentials without further configuration. +and spring.datasource.password so using Spring Boot will pick up the generated credentials without further configuration. You can configure the property names by setting spring.cloud.vault.mysql.username-property and spring.cloud.vault.mysql.password-property.

    @@ -2540,8 +2472,7 @@ You can configure the property names by setting -The postgresql backend has been deprecated in Vault 0.7.1 and -it is recommended to use the database backend and mount it as postgresql. +The postgresql backend has been deprecated in Vault 0.7.1 and it is recommended to use the database backend and mount it as postgresql. Configuration for spring.cloud.vault.postgresql will be removed in a future version. @@ -2550,13 +2481,11 @@ Configuration for spring.cloud.vault.postgresql will be removed in

    Spring Cloud Vault can obtain credentials for PostgreSQL. The integration can be enabled by setting -spring.cloud.vault.postgresql.enabled=true (default false) and -providing the role name with spring.cloud.vault.postgresql.role=….

    +spring.cloud.vault.postgresql.enabled=true (default false) and providing the role name with spring.cloud.vault.postgresql.role=….

    Username and password are stored in spring.datasource.username -and spring.datasource.password so using Spring Boot will -pick up the generated credentials without further configuration. +and spring.datasource.password so using Spring Boot will pick up the generated credentials without further configuration. You can configure the property names by setting spring.cloud.vault.postgresql.username-property and spring.cloud.vault.postgresql.password-property.

    @@ -2605,23 +2534,20 @@ You can configure the property names by setting

    Configure PropertySourceLocator behavior

    -

    Spring Cloud Vault uses property-based configuration to create PropertySources -for generic and discovered secret backends.

    +

    Spring Cloud Vault uses property-based configuration to create PropertySources for key-value and discovered secret backends.

    -

    Discovered backends provide VaultSecretBackendDescriptor beans to describe the configuration -state to use secret backend as PropertySource. A SecretBackendMetadataFactory is required -to create a SecretBackendMetadata object which contains path, name and property transformation -configuration.

    +

    Discovered backends provide VaultSecretBackendDescriptor beans to describe the configuration state to use secret backend as PropertySource. +A SecretBackendMetadataFactory is required to create a SecretBackendMetadata object which contains path, name and property transformation configuration.

    SecretBackendMetadata is used to back a particular PropertySource.

    You can register an arbitrary number of beans implementing VaultConfigurer for customization. -Default generic and discovered backend registration is disabled if Spring Cloud Vault discovers -at least one VaultConfigurer bean. You can however enable default registration with -SecretBackendConfigurer.registerDefaultGenericSecretBackends() and SecretBackendConfigurer.registerDefaultDiscoveredSecretBackends().

    +Default key-value and discovered backend registration is disabled if Spring Cloud Vault discovers at least one VaultConfigurer bean. +You can however enable default registration with +SecretBackendConfigurer.registerDefaultKeyValueSecretBackends() and SecretBackendConfigurer.registerDefaultDiscoveredSecretBackends().

    @@ -2634,7 +2560,7 @@ at least one VaultConfigurer bean. You can however enable default r configurer.add("secret/my-application"); - configurer.registerDefaultGenericSecretBackends(false); + configurer.registerDefaultKeyValueSecretBackends(false); configurer.registerDefaultDiscoveredSecretBackends(true); } } @@ -2649,8 +2575,8 @@ at least one VaultConfigurer bean. You can however enable default r -All customization is required to happen in the bootstrap context. Add your configuration -classes to META-INF/spring.factories at org.springframework.cloud.bootstrap.BootstrapConfiguration +All customization is required to happen in the bootstrap context. +Add your configuration classes to META-INF/spring.factories at org.springframework.cloud.bootstrap.BootstrapConfiguration in your application. @@ -2662,22 +2588,17 @@ in your application.

    Service Registry Configuration

    -

    You can use a DiscoveryClient (such as from Spring Cloud Consul) to locate -a Vault server by setting spring.cloud.vault.discovery.enabled=true (default false). -The net result of that is that your apps need a bootstrap.yml (or an environment variable) -with the appropriate discovery configuration. -The benefit is that the Vault can change its co-ordinates, as long as the discovery service -is a fixed point. The default service id is vault but you can change that on the client with +

    You can use a DiscoveryClient (such as from Spring Cloud Consul) to locate a Vault server by setting spring.cloud.vault.discovery.enabled=true (default false). +The net result of that is that your apps need a bootstrap.yml (or an environment variable) with the appropriate discovery configuration. +The benefit is that the Vault can change its co-ordinates, as long as the discovery service is a fixed point. +The default service id is vault but you can change that on the client with spring.cloud.vault.discovery.serviceId.

    -

    The discovery client implementations all support some kind of metadata map -(e.g. for Eureka we have eureka.instance.metadataMap). Some additional properties of the service -may need to be configured in its service registration metadata so that clients can connect -correctly. Service registries that do not provide details about transport layer security -need to provide a scheme metadata entry to be set either to https or http. -If no scheme is configured and the service is not exposed as secure service, then -configuration defaults to spring.cloud.vault.scheme which is https when it’s not set.

    +

    The discovery client implementations all support some kind of metadata map (e.g. for Eureka we have eureka.instance.metadataMap). +Some additional properties of the service may need to be configured in its service registration metadata so that clients can connect correctly. +Service registries that do not provide details about transport layer security need to provide a scheme metadata entry to be set either to https or http. +If no scheme is configured and the service is not exposed as secure service, then configuration defaults to spring.cloud.vault.scheme which is https when it’s not set.

    @@ -2696,11 +2617,9 @@ configuration defaults to spring.cloud.vault.scheme which is

    Vault Client Fail Fast

    -

    In some cases, it may be desirable to fail startup of a service if -it cannot connect to the Vault Server. If this is the desired -behavior, set the bootstrap configuration property -spring.cloud.vault.fail-fast=true and the client will halt with -an Exception.

    +

    In some cases, it may be desirable to fail startup of a service if it cannot connect to the Vault Server. +If this is the desired behavior, set the bootstrap configuration property +spring.cloud.vault.fail-fast=true and the client will halt with an Exception.

    @@ -2718,15 +2637,14 @@ an Exception.

    Vault Enterprise Namespace Support

    -

    Vault Enterprise allows using namespaces to isolate multiple Vaults -on a single Vault server. Configuring a namespace by setting +

    Vault Enterprise allows using namespaces to isolate multiple Vaults on a single Vault server. +Configuring a namespace by setting spring.cloud.vault.namespace=… enables the namespace header X-Vault-Namespace on every outgoing HTTP request when using the Vault RestTemplate or WebClient.

    -

    Please note that this feature is not supported by Vault Community edition -and has no effect on Vault operations.

    +

    Please note that this feature is not supported by Vault Community edition and has no effect on Vault operations.

    @@ -2748,8 +2666,7 @@ and has no effect on Vault operations.

    SSL can be configured declaratively by setting various properties. -You can set either javax.net.ssl.trustStore to configure -JVM-wide SSL settings or spring.cloud.vault.ssl.trust-store +You can set either javax.net.ssl.trustStore to configure JVM-wide SSL settings or spring.cloud.vault.ssl.trust-store to set SSL settings only for Spring Cloud Vault Config.

    @@ -2767,9 +2684,8 @@ to set SSL settings only for Spring Cloud Vault Config.

    • -

      trust-store sets the resource for the trust-store. SSL-secured Vault -communication will validate the Vault SSL certificate with the specified -trust-store.

      +

      trust-store sets the resource for the trust-store. +SSL-secured Vault communication will validate the Vault SSL certificate with the specified trust-store.

    • trust-store-password sets the trust-store password

      @@ -2777,9 +2693,7 @@ trust-store.

    -

    Please note that configuring spring.cloud.vault.ssl.* can be only -applied when either Apache Http Components or the OkHttp client -is on your class-path.

    +

    Please note that configuring spring.cloud.vault.ssl.* can be only applied when either Apache Http Components or the OkHttp client is on your class-path.

    @@ -2788,28 +2702,19 @@ is on your class-path.

    With every secret, Vault creates a lease: -metadata containing information such as a time duration, -renewability, and more.

    +metadata containing information such as a time duration, renewability, and more.

    -

    Vault promises that the data will be valid for the given duration, -or Time To Live (TTL). Once the lease is expired, Vault can -revoke the data, and the consumer of the secret can no longer -be certain that it is valid.

    +

    Vault promises that the data will be valid for the given duration, or Time To Live (TTL). +Once the lease is expired, Vault can revoke the data, and the consumer of the secret can no longer be certain that it is valid.

    -

    Spring Cloud Vault maintains a lease lifecycle beyond -the creation of login tokens and secrets. That said, -login tokens and secrets associated with a lease -are scheduled for renewal just before the lease expires -until terminal expiry. -Application shutdown revokes obtained login tokens and renewable -leases.

    +

    Spring Cloud Vault maintains a lease lifecycle beyond the creation of login tokens and secrets. +That said, login tokens and secrets associated with a lease are scheduled for renewal just before the lease expires until terminal expiry. +Application shutdown revokes obtained login tokens and renewable leases.

    -

    Secret service and database backends (such as MongoDB or MySQL) -usually generate a renewable lease so generated credentials will -be disabled on application shutdown.

    +

    Secret service and database backends (such as MongoDB or MySQL) usually generate a renewable lease so generated credentials will be disabled on application shutdown.

    @@ -2824,12 +2729,9 @@ Static tokens are not renewed or revoked.
    -

    Lease renewal and revocation is enabled by default and can -be disabled by setting spring.cloud.vault.config.lifecycle.enabled -to false. This is not recommended as leases can expire and -Spring Cloud Vault cannot longer access Vault or services -using generated credentials and valid credentials remain active -after application shutdown.

    +

    Lease renewal and revocation is enabled by default and can be disabled by setting spring.cloud.vault.config.lifecycle.enabled +to false. +This is not recommended as leases can expire and Spring Cloud Vault cannot longer access Vault or services using generated credentials and valid credentials remain active after application shutdown.

    @@ -2848,16 +2750,20 @@ after application shutdown.

    • -

      enabled controls whether leases associated with secrets are considered to be renewed and expired secrets are rotated. Enabled by default.

      +

      enabled controls whether leases associated with secrets are considered to be renewed and expired secrets are rotated. +Enabled by default.

    • -

      min-renewal sets the duration that is at least required before renewing a lease. This setting prevents renewals from happening too often.

      +

      min-renewal sets the duration that is at least required before renewing a lease. +This setting prevents renewals from happening too often.

    • -

      expiry-threshold sets the expiry threshold. A lease is renewed the configured period of time before it expires.

      +

      expiry-threshold sets the expiry threshold. +A lease is renewed the configured period of time before it expires.

    • -

      lease-endpoints sets the endpoints for renew and revoke. Legacy for vault versions before 0.8 and SysLeases for later.

      +

      lease-endpoints sets the endpoints for renew and revoke. +Legacy for vault versions before 0.8 and SysLeases for later.

    diff --git a/reference/html/intro.html b/reference/html/intro.html index 04ae45c5..b9abff24 100644 --- a/reference/html/intro.html +++ b/reference/html/intro.html @@ -116,7 +116,9 @@ $(globalSwitch);
    -

    Spring Cloud Vault Config provides client-side support for externalized configuration in a distributed system. With HashiCorp’s Vault you have a central place to manage external secret properties for applications across all environments. Vault can manage static and dynamic secrets such as username/password for remote applications/resources and provide credentials for external services such as MySQL, PostgreSQL, Apache Cassandra, MongoDB, Consul, AWS and more.

    +

    Spring Cloud Vault Config provides client-side support for externalized configuration in a distributed system. +With HashiCorp’s Vault you have a central place to manage external secret properties for applications across all environments. +Vault can manage static and dynamic secrets such as username/password for remote applications/resources and provide credentials for external services such as MySQL, PostgreSQL, Apache Cassandra, MongoDB, Consul, AWS and more.

    diff --git a/reference/html/quickstart.html b/reference/html/quickstart.html index e07c1859..e47925c1 100644 --- a/reference/html/quickstart.html +++ b/reference/html/quickstart.html @@ -129,8 +129,7 @@ $(globalSwitch);

    Prerequisites

    -

    To get started with Vault and this guide you need a -*NIX-like operating systems that provides:

    +

    To get started with Vault and this guide you need a *NIX-like operating systems that provides:

      @@ -149,7 +148,8 @@ $(globalSwitch); -This guide explains Vault setup from a Spring Cloud Vault perspective for integration testing. You can find a getting started guide directly on the Vault project site: https://learn.hashicorp.com/vault +This guide explains Vault setup from a Spring Cloud Vault perspective for integration testing. +You can find a getting started guide directly on the Vault project site: https://learn.hashicorp.com/vault @@ -204,7 +204,8 @@ These steps can be achieved by downloading and running -create_certificates.sh creates certificates in work/ca and a JKS truststore work/keystore.jks. If you want to run Spring Cloud Vault using this quickstart guide you need to configure the truststore the spring.cloud.vault.ssl.trust-store property to file:work/keystore.jks. +create_certificates.sh creates certificates in work/ca and a JKS truststore work/keystore.jks. +If you want to run Spring Cloud Vault using this quickstart guide you need to configure the truststore the spring.cloud.vault.ssl.trust-store property to file:work/keystore.jks. @@ -257,8 +258,8 @@ Vault is sealed and not initialized when starting up.

      -If you want to run tests, leave Vault uninitialized. The tests will -initialize Vault and create a root token 00000000-0000-0000-0000-000000000000. +If you want to run tests, leave Vault uninitialized. +The tests will initialize Vault and create a root token 00000000-0000-0000-0000-000000000000. @@ -296,8 +297,9 @@ your Vault will remain permanently sealed.

    Vault will initialize and return a set of unsealing keys and the root token. -Pick 3 keys and unseal Vault. Store the Vault token in the VAULT_TOKEN - environment variable.

    +Pick 3 keys and unseal Vault. +Store the Vault token in the VAULT_TOKEN +environment variable.

    @@ -310,8 +312,8 @@ $ vault token-create -id="00000000-0000-0000-0000-000000000000" -policy="root"
    -

    Spring Cloud Vault accesses different resources. By default, the secret -backend is enabled which accesses secret config settings via JSON endpoints.

    +

    Spring Cloud Vault accesses different resources. +By default, the secret backend is enabled which accesses secret config settings via JSON endpoints.

    The HTTP service has resources in the form:

    @@ -326,10 +328,8 @@ backend is enabled which accesses secret config settings via JSON endpoints.

    where the "application" is injected as the spring.application.name in the -SpringApplication (i.e. what is normally "application" in a regular -Spring Boot app), "profile" is an active profile (or comma-separated -list of properties). Properties retrieved from Vault will be used "as-is" -without further prefixing of the property names.

    +SpringApplication (i.e. what is normally "application" in a regular Spring Boot app), "profile" is an active profile (or comma-separated list of properties). +Properties retrieved from Vault will be used "as-is" without further prefixing of the property names.

    @@ -337,9 +337,8 @@ without further prefixing of the property names.

    Client Side Usage

    -

    To use these features in an application, just build it as a Spring -Boot application that depends on spring-cloud-vault-config (e.g. see -the test cases). Example Maven configuration:

    +

    To use these features in an application, just build it as a Spring Boot application that depends on spring-cloud-vault-config (e.g. see the test cases). +Example Maven configuration:

    Example 1. pom.xml
    @@ -405,11 +404,8 @@ public class Application {
    -

    When it runs it will pick up the external configuration from the -default local Vault server on port 8200 if it is running. To modify -the startup behavior you can change the location of the Vault server -using bootstrap.properties (like application.properties but for -the bootstrap phase of an application context), e.g.

    +

    When it runs it will pick up the external configuration from the default local Vault server on port 8200 if it is running. +To modify the startup behavior you can change the location of the Vault server using bootstrap.properties (like application.properties but for the bootstrap phase of an application context), e.g.

    Example 2. bootstrap.yml
    @@ -432,8 +428,8 @@ the bootstrap phase of an application context), e.g.

    • -

      host sets the hostname of the Vault host. The host name will be used -for SSL certificate validation

      +

      host sets the hostname of the Vault host. +The host name will be used for SSL certificate validation

    • port sets the Vault port

      @@ -457,15 +453,13 @@ Supported schemes are http and https.

    -

    Enabling further integrations requires additional dependencies and -configuration. Depending on how you have set up Vault you might need -additional configuration like +

    Enabling further integrations requires additional dependencies and configuration. +Depending on how you have set up Vault you might need additional configuration like SSL and authentication.

    -

    If the application imports the spring-boot-starter-actuator project, the -status of the vault server will be available via the /health endpoint.

    +

    If the application imports the spring-boot-starter-actuator project, the status of the vault server will be available via the /health endpoint.

    The vault health indicator can be enabled or disabled through the property management.health.vault.enabled (default to true).

    @@ -499,7 +493,9 @@ status of the vault server will be available via the /health endpoi -Consider carefully your security requirements. Static token authentication is fine if you want quickly get started with Vault, but a static token is not protected any further. Any disclosure to unintended parties allows Vault use with the associated token roles. +Consider carefully your security requirements. +Static token authentication is fine if you want quickly get started with Vault, but a static token is not protected any further. +Any disclosure to unintended parties allows Vault use with the associated token roles. diff --git a/reference/html/spring-cloud-vault.html b/reference/html/spring-cloud-vault.html index fb22df0e..20ef4bd5 100644 --- a/reference/html/spring-cloud-vault.html +++ b/reference/html/spring-cloud-vault.html @@ -144,7 +144,7 @@ $(globalSwitch);
  • Secret Backends
  • -

    Spring Cloud Vault Config provides client-side support for externalized configuration in a distributed system. With HashiCorp’s Vault you have a central place to manage external secret properties for applications across all environments. Vault can manage static and dynamic secrets such as username/password for remote applications/resources and provide credentials for external services such as MySQL, PostgreSQL, Apache Cassandra, MongoDB, Consul, AWS and more.

    +

    Spring Cloud Vault Config provides client-side support for externalized configuration in a distributed system. +With HashiCorp’s Vault you have a central place to manage external secret properties for applications across all environments. +Vault can manage static and dynamic secrets such as username/password for remote applications/resources and provide credentials for external services such as MySQL, PostgreSQL, Apache Cassandra, MongoDB, Consul, AWS and more.

    @@ -198,8 +200,7 @@ $(globalSwitch);

    Prerequisites

    -

    To get started with Vault and this guide you need a -*NIX-like operating systems that provides:

    +

    To get started with Vault and this guide you need a *NIX-like operating systems that provides:

      @@ -218,7 +219,8 @@ $(globalSwitch); -This guide explains Vault setup from a Spring Cloud Vault perspective for integration testing. You can find a getting started guide directly on the Vault project site: https://learn.hashicorp.com/vault +This guide explains Vault setup from a Spring Cloud Vault perspective for integration testing. +You can find a getting started guide directly on the Vault project site: https://learn.hashicorp.com/vault @@ -273,7 +275,8 @@ These steps can be achieved by downloading and running -create_certificates.sh creates certificates in work/ca and a JKS truststore work/keystore.jks. If you want to run Spring Cloud Vault using this quickstart guide you need to configure the truststore the spring.cloud.vault.ssl.trust-store property to file:work/keystore.jks. +create_certificates.sh creates certificates in work/ca and a JKS truststore work/keystore.jks. +If you want to run Spring Cloud Vault using this quickstart guide you need to configure the truststore the spring.cloud.vault.ssl.trust-store property to file:work/keystore.jks. @@ -326,8 +329,8 @@ Vault is sealed and not initialized when starting up.

      -If you want to run tests, leave Vault uninitialized. The tests will -initialize Vault and create a root token 00000000-0000-0000-0000-000000000000. +If you want to run tests, leave Vault uninitialized. +The tests will initialize Vault and create a root token 00000000-0000-0000-0000-000000000000. @@ -365,8 +368,9 @@ your Vault will remain permanently sealed.

    Vault will initialize and return a set of unsealing keys and the root token. -Pick 3 keys and unseal Vault. Store the Vault token in the VAULT_TOKEN - environment variable.

    +Pick 3 keys and unseal Vault. +Store the Vault token in the VAULT_TOKEN +environment variable.

    @@ -379,8 +383,8 @@ $ vault token-create -id="00000000-0000-0000-0000-000000000000" -policy="root"
    -

    Spring Cloud Vault accesses different resources. By default, the secret -backend is enabled which accesses secret config settings via JSON endpoints.

    +

    Spring Cloud Vault accesses different resources. +By default, the secret backend is enabled which accesses secret config settings via JSON endpoints.

    The HTTP service has resources in the form:

    @@ -395,10 +399,8 @@ backend is enabled which accesses secret config settings via JSON endpoints.

    where the "application" is injected as the spring.application.name in the -SpringApplication (i.e. what is normally "application" in a regular -Spring Boot app), "profile" is an active profile (or comma-separated -list of properties). Properties retrieved from Vault will be used "as-is" -without further prefixing of the property names.

    +SpringApplication (i.e. what is normally "application" in a regular Spring Boot app), "profile" is an active profile (or comma-separated list of properties). +Properties retrieved from Vault will be used "as-is" without further prefixing of the property names.

    @@ -406,9 +408,8 @@ without further prefixing of the property names.

    Client Side Usage

    -

    To use these features in an application, just build it as a Spring -Boot application that depends on spring-cloud-vault-config (e.g. see -the test cases). Example Maven configuration:

    +

    To use these features in an application, just build it as a Spring Boot application that depends on spring-cloud-vault-config (e.g. see the test cases). +Example Maven configuration:

    Example 1. pom.xml
    @@ -474,11 +475,8 @@ public class Application {
    -

    When it runs it will pick up the external configuration from the -default local Vault server on port 8200 if it is running. To modify -the startup behavior you can change the location of the Vault server -using bootstrap.properties (like application.properties but for -the bootstrap phase of an application context), e.g.

    +

    When it runs it will pick up the external configuration from the default local Vault server on port 8200 if it is running. +To modify the startup behavior you can change the location of the Vault server using bootstrap.properties (like application.properties but for the bootstrap phase of an application context), e.g.

    Example 2. bootstrap.yml
    @@ -501,8 +499,8 @@ the bootstrap phase of an application context), e.g.

    • -

      host sets the hostname of the Vault host. The host name will be used -for SSL certificate validation

      +

      host sets the hostname of the Vault host. +The host name will be used for SSL certificate validation

    • port sets the Vault port

      @@ -526,15 +524,13 @@ Supported schemes are http and https.

    -

    Enabling further integrations requires additional dependencies and -configuration. Depending on how you have set up Vault you might need -additional configuration like +

    Enabling further integrations requires additional dependencies and configuration. +Depending on how you have set up Vault you might need additional configuration like SSL and authentication.

    -

    If the application imports the spring-boot-starter-actuator project, the -status of the vault server will be available via the /health endpoint.

    +

    If the application imports the spring-boot-starter-actuator project, the status of the vault server will be available via the /health endpoint.

    The vault health indicator can be enabled or disabled through the property management.health.vault.enabled (default to true).

    @@ -568,7 +564,9 @@ status of the vault server will be available via the /health endpoi -Consider carefully your security requirements. Static token authentication is fine if you want quickly get started with Vault, but a static token is not protected any further. Any disclosure to unintended parties allows Vault use with the associated token roles. +Consider carefully your security requirements. +Static token authentication is fine if you want quickly get started with Vault, but a static token is not protected any further. +Any disclosure to unintended parties allows Vault use with the associated token roles. @@ -580,9 +578,9 @@ Consider carefully your security requirements. Static token authentication is fi

    Authentication methods

    -

    Different organizations have different requirements for security -and authentication. Vault reflects that need by shipping multiple authentication -methods. Spring Cloud Vault supports token and AppId authentication.

    +

    Different organizations have different requirements for security and authentication. +Vault reflects that need by shipping multiple authentication methods. +Spring Cloud Vault supports token and AppId authentication.

    Token authentication

    @@ -599,8 +597,7 @@ Token authentication requires a static token to be provided using the Token authentication is the default authentication method. -If a token is disclosed an unintended party gains access to Vault and -can access secrets for the intended client. +If a token is disclosed an unintended party gains access to Vault and can access secrets for the intended client. @@ -620,8 +617,7 @@ can access secrets for the intended client.
    • -

      authentication setting this value to TOKEN selects the Token -authentication method

      +

      authentication setting this value to TOKEN selects the Token authentication method

    • token sets the static token to use

      @@ -635,12 +631,12 @@ authentication method

      Vault Agent authentication

      -

      Vault ships a sidecar utility with Vault Agent since version 0.11.0. -Vault Agent implements the functionality of Spring Vault’s SessionManager -with its Auto-Auth feature. Applications can reuse cached session credentials by relying -on Vault Agent running on localhost. Spring Vault can send requests without the -X-Vault-Token header. Disable Spring Vault’s authentication infrastructure to -disable client authentication and session management.

      +

      Vault ships a sidecar utility with Vault Agent since version 0.11.0. Vault Agent implements the functionality of Spring Vault’s SessionManager +with its Auto-Auth feature. +Applications can reuse cached session credentials by relying on Vault Agent running on localhost. +Spring Vault can send requests without the +X-Vault-Token header. +Disable Spring Vault’s authentication infrastructure to disable client authentication and session management.

      Example 5. bootstrap.yml
      @@ -669,12 +665,11 @@ and SessionManager.

      AppId authentication

      Vault supports AppId -authentication that consists of two hard to guess tokens. The AppId -defaults to spring.application.name that is statically configured. -The second token is the UserId which is a part determined by the application, -usually related to the runtime environment. IP address, Mac address or a -Docker container name are good examples. Spring Cloud Vault Config supports -IP address, Mac address and static UserId’s (e.g. supplied via System properties). +authentication that consists of two hard to guess tokens. +The AppId defaults to spring.application.name that is statically configured. +The second token is the UserId which is a part determined by the application, usually related to the runtime environment. +IP address, Mac address or a Docker container name are good examples. +Spring Cloud Vault Config supports IP address, Mac address and static UserId’s (e.g. supplied via System properties). The IP and Mac address are represented as Hex-encoded SHA256 hash.

      @@ -696,14 +691,14 @@ The IP and Mac address are represented as Hex-encoded SHA256 hash.

      • -

        authentication setting this value to APPID selects the AppId -authentication method

        +

        authentication setting this value to APPID selects the AppId authentication method

      • app-id-path sets the path of the AppId mount to use

      • -

        user-id sets the UserId method. Possible values are IP_ADDRESS, +

        user-id sets the UserId method. +Possible values are IP_ADDRESS, MAC_ADDRESS or a class name implementing a custom AppIdUserIdMechanism

      @@ -723,18 +718,16 @@ authentication method

      -Including the line break of echo leads to a different hash value -so make sure to include the -n flag. +Including the line break of echo leads to a different hash value so make sure to include the -n flag.
      -

      Mac address-based UserId’s obtain their network device from the -localhost-bound device. The configuration also allows specifying -a network-interface hint to pick the right device. The value of -network-interface is optional and can be either an interface -name or interface index (0-based).

      +

      Mac address-based UserId’s obtain their network device from the localhost-bound device. +The configuration also allows specifying a network-interface hint to pick the right device. +The value of +network-interface is optional and can be either an interface name or interface index (0-based).

      Example 7. bootstrap.yml using SHA256 Mac-Address UserId’s
      @@ -773,8 +766,7 @@ name or interface index (0-based).

      The Mac address is specified uppercase and without colons. -Including the line break of echo leads to a different hash value -so make sure to include the -n flag. +Including the line break of echo leads to a different hash value so make sure to include the -n flag. @@ -782,17 +774,14 @@ so make sure to include the -n flag.

      Custom UserId

      -

      The UserId generation is an open mechanism. You can set -spring.cloud.vault.app-id.user-id to any string and the configured -value will be used as static UserId.

      +

      The UserId generation is an open mechanism. +You can set +spring.cloud.vault.app-id.user-id to any string and the configured value will be used as static UserId.

      -

      A more advanced approach lets you set spring.cloud.vault.app-id.user-id to a -classname. This class must be on your classpath and must implement -the org.springframework.cloud.vault.AppIdUserIdMechanism interface -and the createUserId method. Spring Cloud Vault will obtain the UserId -by calling createUserId each time it authenticates using AppId to -obtain a token.

      +

      A more advanced approach lets you set spring.cloud.vault.app-id.user-id to a classname. +This class must be on your classpath and must implement the org.springframework.cloud.vault.AppIdUserIdMechanism interface and the createUserId method. +Spring Cloud Vault will obtain the UserId by calling createUserId each time it authenticates using AppId to obtain a token.

      Example 8. bootstrap.yml
      @@ -832,16 +821,14 @@ obtain a token.

      AppRole authentication

      -

      AppRole is intended for machine -authentication, like the deprecated (since Vault 0.6.1) AppId authentication. +

      AppRole is intended for machine authentication, like the deprecated (since Vault 0.6.1) AppId authentication. AppRole authentication consists of two hard to guess (secret) tokens: RoleId and SecretId.

      Spring Vault supports various AppRole scenarios (push/pull mode and wrapped).

      -

      RoleId and optionally SecretId must be provided by configuration, -Spring Vault will not look up these or create a custom SecretId.

      +

      RoleId and optionally SecretId must be provided by configuration, Spring Vault will not look up these or create a custom SecretId.

      Example 10. bootstrap.yml with AppRole authentication properties
      @@ -1016,7 +1003,8 @@ Spring Vault will not look up these or create a custom SecretId.

      -You can use still all combinations of push/pull/wrapped modes by providing a configured AppRoleAuthentication bean within the bootstrap context. Spring Cloud Vault cannot derive all possible AppRole combinations from the configuration properties. +You can use still all combinations of push/pull/wrapped modes by providing a configured AppRoleAuthentication bean within the bootstrap context. +Spring Cloud Vault cannot derive all possible AppRole combinations from the configuration properties. @@ -1028,7 +1016,9 @@ You can use still all combinations of push/pull/wrapped modes by providing a con -AppRole authentication is limited to simple pull mode using reactive infrastructure. Full pull mode is not yet supported. Using Spring Cloud Vault with the Spring WebFlux stack enables Vault’s reactive auto-configuration which can be disabled by setting spring.cloud.vault.reactive.enabled=false. +AppRole authentication is limited to simple pull mode using reactive infrastructure. +Full pull mode is not yet supported. +Using Spring Cloud Vault with the Spring WebFlux stack enables Vault’s reactive auto-configuration which can be disabled by setting spring.cloud.vault.reactive.enabled=false. @@ -1055,7 +1045,8 @@ AppRole authentication is limited to simple pull mode using reactive infrastruct

      role-id sets the RoleId.

    • -

      secret-id sets the SecretId. SecretId can be omitted if AppRole is configured without requiring SecretId (See bind_secret_id).

      +

      secret-id sets the SecretId. +SecretId can be omitted if AppRole is configured without requiring SecretId (See bind_secret_id).

    • role: sets the AppRole name for pull mode.

      @@ -1073,14 +1064,9 @@ AppRole authentication is limited to simple pull mode using reactive infrastruct

      AWS-EC2 authentication

      The aws-ec2 -auth backend provides a secure introduction mechanism -for AWS EC2 instances, allowing automated retrieval of a Vault -token. Unlike most Vault authentication backends, this backend -does not require first-deploying, or provisioning security-sensitive -credentials (tokens, username/password, client certificates, etc.). -Instead, it treats AWS as a Trusted Third Party and uses the -cryptographically signed dynamic metadata information that uniquely -represents each EC2 instance.

      +auth backend provides a secure introduction mechanism for AWS EC2 instances, allowing automated retrieval of a Vault token. +Unlike most Vault authentication backends, this backend does not require first-deploying, or provisioning security-sensitive credentials (tokens, username/password, client certificates, etc.). +Instead, it treats AWS as a Trusted Third Party and uses the cryptographically signed dynamic metadata information that uniquely represents each EC2 instance.

      Example 12. bootstrap.yml using AWS-EC2 Authentication
      @@ -1094,17 +1080,13 @@ represents each EC2 instance.

    -

    AWS-EC2 authentication enables nonce by default to follow -the Trust On First Use (TOFU) principle. Any unintended party that -gains access to the PKCS#7 identity metadata can authenticate -against Vault.

    +

    AWS-EC2 authentication enables nonce by default to follow the Trust On First Use (TOFU) principle. +Any unintended party that gains access to the PKCS#7 identity metadata can authenticate against Vault.

    -

    During the first login, Spring Cloud Vault generates a nonce -that is stored in the auth backend aside the instance Id. -Re-authentication requires the same nonce to be sent. Any other -party does not have the nonce and can raise an alert in Vault for -further investigation.

    +

    During the first login, Spring Cloud Vault generates a nonce that is stored in the auth backend aside the instance Id. +Re-authentication requires the same nonce to be sent. +Any other party does not have the nonce and can raise an alert in Vault for further investigation.

    The nonce is kept in memory and is lost during application restart. @@ -1147,8 +1129,7 @@ You can configure the authentication role by setting the

    • -

      authentication setting this value to AWS_EC2 selects the AWS EC2 -authentication method

      +

      authentication setting this value to AWS_EC2 selects the AWS EC2 authentication method

    • role sets the name of the role against which the login is being attempted.

      @@ -1160,7 +1141,8 @@ authentication method

      identity-document sets URL of the PKCS#7 AWS EC2 identity document

    • -

      nonce used for AWS-EC2 authentication. An empty nonce defaults to nonce generation

      +

      nonce used for AWS-EC2 authentication. +An empty nonce defaults to nonce generation

    @@ -1171,27 +1153,18 @@ authentication method

    AWS-IAM authentication

    -

    The aws backend provides a secure -authentication mechanism for AWS IAM roles, allowing the automatic authentication with -vault based on the current IAM role of the running application. - Unlike most Vault authentication backends, this backend -does not require first-deploying, or provisioning security-sensitive -credentials (tokens, username/password, client certificates, etc.). -Instead, it treats AWS as a Trusted Third Party and uses the -4 pieces of information signed by the caller with their IAM credentials - to verify that the caller is indeed using that IAM role.

    +

    The aws backend provides a secure authentication mechanism for AWS IAM roles, allowing the automatic authentication with vault based on the current IAM role of the running application. +Unlike most Vault authentication backends, this backend does not require first-deploying, or provisioning security-sensitive credentials (tokens, username/password, client certificates, etc.). +Instead, it treats AWS as a Trusted Third Party and uses the 4 pieces of information signed by the caller with their IAM credentials to verify that the caller is indeed using that IAM role.

    The current IAM role the application is running in is automatically calculated. -If you are running your application on AWS ECS then the application -will use the IAM role assigned to the ECS task of the running container. -If you are running your application naked on top of an EC2 instance then -the IAM role used will be the one assigned to the EC2 instance.

    +If you are running your application on AWS ECS then the application will use the IAM role assigned to the ECS task of the running container. +If you are running your application naked on top of an EC2 instance then the IAM role used will be the one assigned to the EC2 instance.

    -

    When using the AWS-IAM authentication you must create a role in Vault -and assign it to your IAM role. An empty role defaults to -the friendly name the current IAM role.

    +

    When using the AWS-IAM authentication you must create a role in Vault and assign it to your IAM role. +An empty role defaults to the friendly name the current IAM role.

    Example 15. bootstrap.yml with required AWS-IAM Authentication properties
    @@ -1223,7 +1196,9 @@ the friendly name the current IAM role.

    • -

      role sets the name of the role against which the login is being attempted. This should be bound to your IAM role. If one is not supplied then the friendly name of the current IAM user will be used as the vault role.

      +

      role sets the name of the role against which the login is being attempted. +This should be bound to your IAM role. +If one is not supplied then the friendly name of the current IAM user will be used as the vault role.

    • aws-path sets the path of the AWS mount to use

      @@ -1237,8 +1212,7 @@ the friendly name the current IAM role.

    -

    AWS-IAM requires the AWS Java SDK dependency (com.amazonaws:aws-java-sdk-core) -as the authentication implementation uses AWS SDK types for credentials and request signing.

    +

    AWS-IAM requires the AWS Java SDK dependency (com.amazonaws:aws-java-sdk-core) as the authentication implementation uses AWS SDK types for credentials and request signing.

    See also: Vault Documentation: Using the aws auth backend

    @@ -1248,14 +1222,9 @@ as the authentication implementation uses AWS SDK types for credentials and requ

    Azure MSI authentication

    The azure -auth backend provides a secure introduction mechanism -for Azure VM instances, allowing automated retrieval of a Vault -token. Unlike most Vault authentication backends, this backend -does not require first-deploying, or provisioning security-sensitive -credentials (tokens, username/password, client certificates, etc.). -Instead, it treats Azure as a Trusted Third Party and uses the -managed service identity and instance metadata information that can be -bound to a VM instance.

    +auth backend provides a secure introduction mechanism for Azure VM instances, allowing automated retrieval of a Vault token. +Unlike most Vault authentication backends, this backend does not require first-deploying, or provisioning security-sensitive credentials (tokens, username/password, client certificates, etc.). +Instead, it treats Azure as a Trusted Third Party and uses the managed service identity and instance metadata information that can be bound to a VM instance.

    Example 17. bootstrap.yml with required Azure Authentication properties
    @@ -1295,8 +1264,7 @@ bound to a VM instance.

    -

    Azure MSI authentication fetches environmental details about the virtual machine -(subscription Id, resource group, VM name) from the instance metadata service.

    +

    Azure MSI authentication fetches environmental details about the virtual machine (subscription Id, resource group, VM name) from the instance metadata service.

    See also: Vault Documentation: Using the azure auth backend

    @@ -1305,8 +1273,7 @@ bound to a VM instance.

    TLS certificate authentication

    -

    The cert auth backend allows authentication using SSL/TLS client -certificates that are either signed by a CA or self-signed.

    +

    The cert auth backend allows authentication using SSL/TLS client certificates that are either signed by a CA or self-signed.

    To enable cert authentication you need to:

    @@ -1317,8 +1284,7 @@ certificates that are either signed by a CA or self-signed.

    Use SSL, see Vault Client SSL configuration

  • -

    Configure a Java Keystore that contains the client -certificate and the private key

    +

    Configure a Java Keystore that contains the client certificate and the private key

  • Set the spring.cloud.vault.authentication to CERT

    @@ -1347,12 +1313,11 @@ certificate and the private key

    Cubbyhole authentication

    -

    Cubbyhole authentication uses Vault primitives to provide a secured authentication -workflow. Cubbyhole authentication uses tokens as primary login method. -An ephemeral token is used to obtain a second, login VaultToken from Vault’s -Cubbyhole secret backend. The login token is usually longer-lived and used to -interact with Vault. The login token will be retrieved from a wrapped -response stored at /cubbyhole/response.

    +

    Cubbyhole authentication uses Vault primitives to provide a secured authentication workflow. +Cubbyhole authentication uses tokens as primary login method. +An ephemeral token is used to obtain a second, login VaultToken from Vault’s Cubbyhole secret backend. +The login token is usually longer-lived and used to interact with Vault. +The login token will be retrieved from a wrapped response stored at /cubbyhole/response.

    Creating a wrapped token

    @@ -1421,18 +1386,13 @@ wrapped_accessor: 46b6aebb-187f-932a-26d7-4f3d86a68319 auth backend allows Vault login by using existing GCP (Google Cloud Platform) IAM and GCE credentials.

    -

    GCP GCE (Google Compute Engine) authentication creates a signature in the form of a -JSON Web Token (JWT) for a service account. A JWT for a Compute Engine instance -is obtained from the GCE metadata service using Instance identification. +

    GCP GCE (Google Compute Engine) authentication creates a signature in the form of a JSON Web Token (JWT) for a service account. +A JWT for a Compute Engine instance is obtained from the GCE metadata service using Instance identification. This API creates a JSON Web Token that can be used to confirm the instance identity.

    -

    Unlike most Vault authentication backends, this backend -does not require first-deploying, or provisioning security-sensitive -credentials (tokens, username/password, client certificates, etc.). -Instead, it treats GCP as a Trusted Third Party and uses the -cryptographically signed dynamic metadata information that uniquely -represents each GCP service account.

    +

    Unlike most Vault authentication backends, this backend does not require first-deploying, or provisioning security-sensitive credentials (tokens, username/password, client certificates, etc.). +Instead, it treats GCP as a Trusted Third Party and uses the cryptographically signed dynamic metadata information that uniquely represents each GCP service account.

    Example 22. bootstrap.yml with required GCP-GCE Authentication properties
    @@ -1471,7 +1431,8 @@ represents each GCP service account.

    gcp-path sets the path of the GCP mount to use

  • -

    service-account allows overriding the service account Id to a specific value. Defaults to the default service account.

    +

    service-account allows overriding the service account Id to a specific value. +Defaults to the default service account.

  • @@ -1496,18 +1457,14 @@ represents each GCP service account.

    auth backend allows Vault login by using existing GCP (Google Cloud Platform) IAM and GCE credentials.

    -

    GCP IAM authentication creates a signature in the form of a JSON Web Token (JWT) -for a service account. A JWT for a service account is obtained by -calling GCP IAM’s projects.serviceAccounts.signJwt API. The caller authenticates against GCP IAM -and proves thereby its identity. This Vault backend treats GCP as a Trusted Third Party.

    +

    GCP IAM authentication creates a signature in the form of a JSON Web Token (JWT) for a service account. +A JWT for a service account is obtained by calling GCP IAM’s projects.serviceAccounts.signJwt API. The caller authenticates against GCP IAM and proves thereby its identity. +This Vault backend treats GCP as a Trusted Third Party.

    -

    IAM credentials can be obtained from either the runtime environment -, specifically the GOOGLE_APPLICATION_CREDENTIALS -environment variable, the Google Compute metadata service, -or supplied externally as e.g. JSON or base64 encoded. -JSON is the preferred form as it carries the project id and -service account identifier required for calling projects.serviceAccounts.signJwt.

    +

    IAM credentials can be obtained from either the runtime environment , specifically the GOOGLE_APPLICATION_CREDENTIALS +environment variable, the Google Compute metadata service, or supplied externally as e.g. JSON or base64 encoded. +JSON is the preferred form as it carries the project id and service account identifier required for calling projects.serviceAccounts.signJwt.

    Example 24. bootstrap.yml with required GCP-IAM Authentication properties
    @@ -1557,20 +1514,21 @@ service account identifier required for calling projects.serviceAccounts.s

    gcp-path sets the path of the GCP mount to use

  • -

    jwt-validity configures the JWT token validity. Defaults to 15 minutes.

    +

    jwt-validity configures the JWT token validity. +Defaults to 15 minutes.

  • -

    project-id allows overriding the project Id to a specific value. Defaults to the project Id from the obtained credential.

    +

    project-id allows overriding the project Id to a specific value. +Defaults to the project Id from the obtained credential.

  • -

    service-account allows overriding the service account Id to a specific value. Defaults to the service account from the obtained credential.

    +

    service-account allows overriding the service account Id to a specific value. +Defaults to the service account from the obtained credential.

  • -

    GCP IAM authentication requires the Google Cloud Java SDK dependency -(com.google.apis:google-api-services-iam and com.google.auth:google-auth-library-oauth2-http) -as the authentication implementation uses Google APIs for credentials and JWT signing.

    +

    GCP IAM authentication requires the Google Cloud Java SDK dependency (com.google.apis:google-api-services-iam and com.google.auth:google-auth-library-oauth2-http) as the authentication implementation uses Google APIs for credentials and JWT signing.

    @@ -1579,9 +1537,8 @@ as the authentication implementation uses Google APIs for credentials and JWT si
    -Google credentials require an OAuth 2 token maintaining the token lifecycle. All API -is synchronous therefore, GcpIamAuthentication does not support AuthenticationSteps which is -required for reactive usage. +Google credentials require an OAuth 2 token maintaining the token lifecycle. +All API is synchronous therefore, GcpIamAuthentication does not support AuthenticationSteps which is required for reactive usage.
    @@ -1633,7 +1590,8 @@ The authentication is role based and the role is bound to a service account name

    kubernetes-path sets the path of the Kubernetes mount to use.

  • -

    service-account-token-file sets the location of the file containing the Kubernetes Service Account Token. Defaults to /var/run/secrets/kubernetes.io/serviceaccount/token.

    +

    service-account-token-file sets the location of the file containing the Kubernetes Service Account Token. +Defaults to /var/run/secrets/kubernetes.io/serviceaccount/token.

  • @@ -1729,14 +1687,24 @@ PCF authentication requires BouncyCastle (bcpkix-jdk15on) to be on the classpath

    Generic Backend

    +
    + + + + + +
    + + +This backend is deprecated in favor of the Key-Value backend and will be removed with the next major version. +
    +
    -

    Spring Cloud Vault supports at the basic level the generic secret -backend. The generic secret backend allows storage of arbitrary -values as key-value store. A single context can store one or many -key-value tuples. Contexts can be organized hierarchically. -Spring Cloud Vault allows using the Application name -and a default context name (application) in combination with active -profiles.

    +

    Spring Cloud Vault supports at the basic level the key-value secret backend. +The key-value secret backend allows storage of arbitrary values as key-value store. +A single context can store one or many key-value tuples. +Contexts can be organized hierarchically. +Spring Cloud Vault allows using the Application name and a default context name (application) in combination with active profiles.

    @@ -1763,9 +1731,8 @@ profiles.

    -

    Secrets can be obtained from other contexts within the generic backend by adding their -paths to the application name, separated by commas. For example, given the application -name usefulapp,mysql1,projectx/aws, each of these folders will be used:

    +

    Secrets can be obtained from other contexts within the key-value backend by adding their paths to the application name, separated by commas. +For example, given the application name usefulapp,mysql1,projectx/aws, each of these folders will be used:

      @@ -1805,8 +1772,7 @@ No active profiles will skip accessing contexts with a profile name.

      • -

        enabled setting this value to false disables the secret backend -config usage

        +

        enabled setting this value to false disables the secret backend config usage

      • backend sets the path of the secret mount to use

        @@ -1815,40 +1781,26 @@ config usage

        default-context sets the context name used by all applications

      • -

        application-name overrides the application name for use in the generic backend

        +

        application-name overrides the application name for use in the key-value backend

      • -

        profile-separator separates the profile name from the context in -property sources with profiles

        +

        profile-separator separates the profile name from the context in property sources with profiles

      -
      - - - - - -
      - - -The key-value secret backend can be operated in versioned (v2) and non-versioned (v1) modes. Depending on the mode of operation, a different API is required to access secrets. Make sure to enable generic secret backend usage for non-versioned key-value backends and kv secret backend usage for versioned key-value backends. -
      -
    -

    Versioned Key-Value Backend

    +

    Key-Value Backend

    -

    Spring Cloud Vault supports the versioned Key-Value secret -backend. The key-value backend allows storage of arbitrary -values as key-value store. A single context can store one or many -key-value tuples. Contexts can be organized hierarchically. -Spring Cloud Vault allows using the Application name -and a default context name (application) in combination with active -profiles.

    +

    Spring Cloud Vault supports the Key-Value secret backend. +The key-value backend allows storage of arbitrary values as key-value store. +A single context can store one or many key-value tuples. +Contexts can be organized hierarchically. +Spring Cloud Vault determines itself whether a secret is using versioning. +Spring Cloud Vault allows using the Application name and a default context name (application) in combination with active profiles.

    @@ -1875,9 +1827,8 @@ profiles.

    -

    Secrets can be obtained from other contexts within the key-value backend by adding their -paths to the application name, separated by commas. For example, given the application -name usefulapp,mysql1,projectx/aws, each of these folders will be used:

    +

    Secrets can be obtained from other contexts within the key-value backend by adding their paths to the application name, separated by commas. +For example, given the application name usefulapp,mysql1,projectx/aws, each of these folders will be used:

      @@ -1929,8 +1880,7 @@ Spring Cloud Vault adds the data/ context between the mount path an
      • -

        enabled setting this value to false disables the secret backend -config usage

        +

        enabled setting this value to false disables the secret backend config usage

      • backend sets the path of the secret mount to use

        @@ -1939,11 +1889,10 @@ config usage

        default-context sets the context name used by all applications

      • -

        application-name overrides the application name for use in the generic backend

        +

        application-name overrides the application name for use in the key-value backend

      • -

        profile-separator separates the profile name from the context in -property sources with profiles

        +

        profile-separator separates the profile name from the context in property sources with profiles

      @@ -1954,13 +1903,23 @@ property sources with profiles

      -The key-value secret backend can be operated in versioned (v2) and non-versioned (v1) modes. Depending on the mode of operation, a different API is required to access secrets. Make sure to enable generic secret backend usage for non-versioned key-value backends and kv secret backend usage for versioned key-value backends. +The key-value secret backend can be operated in versioned (v2) and non-versioned (v1) modes.
    +
    @@ -1988,14 +1947,12 @@ dependency.

    The integration can be enabled by setting -spring.cloud.vault.consul.enabled=true (default false) and -providing the role name with spring.cloud.vault.consul.role=….

    +spring.cloud.vault.consul.enabled=true (default false) and providing the role name with spring.cloud.vault.consul.role=….

    The obtained token is stored in spring.cloud.consul.token -so using Spring Cloud Consul can pick up the generated -credentials without further configuration. You can configure -the property name by setting spring.cloud.vault.consul.token-property.

    +so using Spring Cloud Consul can pick up the generated credentials without further configuration. +You can configure the property name by setting spring.cloud.vault.consul.token-property.

    @@ -2058,14 +2015,12 @@ dependency.

    The integration can be enabled by setting -spring.cloud.vault.rabbitmq.enabled=true (default false) -and providing the role name with spring.cloud.vault.rabbitmq.role=….

    +spring.cloud.vault.rabbitmq.enabled=true (default false) and providing the role name with spring.cloud.vault.rabbitmq.role=….

    Username and password are stored in spring.rabbitmq.username -and spring.rabbitmq.password so using Spring Boot will pick up the generated -credentials without further configuration. You can configure the property names -by setting spring.cloud.vault.rabbitmq.username-property and +and spring.rabbitmq.password so using Spring Boot will pick up the generated credentials without further configuration. +You can configure the property names by setting spring.cloud.vault.rabbitmq.username-property and spring.cloud.vault.rabbitmq.password-property.

    @@ -2133,14 +2088,12 @@ dependency.

    The integration can be enabled by setting -spring.cloud.vault.aws=true (default false) -and providing the role name with spring.cloud.vault.aws.role=….

    +spring.cloud.vault.aws=true (default false) and providing the role name with spring.cloud.vault.aws.role=….

    The access key and secret key are stored in cloud.aws.credentials.accessKey -and cloud.aws.credentials.secretKey so using Spring Cloud AWS will pick up the generated -credentials without further configuration. You can configure the property names -by setting spring.cloud.vault.aws.access-key-property and +and cloud.aws.credentials.secretKey so using Spring Cloud AWS will pick up the generated credentials without further configuration. +You can configure the property names by setting spring.cloud.vault.aws.access-key-property and spring.cloud.vault.aws.secret-key-property.

    @@ -2187,11 +2140,8 @@ by setting spring.cloud.vault.aws.access-key-property and

    Database backends

    -

    Vault supports several database secret backends to generate database -credentials dynamically based on configured roles. This means -services that need to access a database no longer need to configure -credentials: they can request them from Vault, and use Vault’s leasing -mechanism to more easily roll keys.

    +

    Vault supports several database secret backends to generate database credentials dynamically based on configured roles. +This means services that need to access a database no longer need to configure credentials: they can request them from Vault, and use Vault’s leasing mechanism to more easily roll keys.

    Spring Cloud Vault integrates with these backends:

    @@ -2216,15 +2166,13 @@ mechanism to more easily roll keys.

    -

    Using a database secret backend requires to enable the -backend in the configuration and the spring-cloud-vault-config-databases +

    Using a database secret backend requires to enable the backend in the configuration and the spring-cloud-vault-config-databases dependency.

    -

    Vault ships since 0.7.1 with a dedicated database secret backend that allows -database integration via plugins. You can use that specific backend by using the -generic database backend. Make sure to specify the appropriate -backend path, e.g. spring.cloud.vault.mysql.role.backend=database.

    +

    Vault ships since 0.7.1 with a dedicated database secret backend that allows database integration via plugins. +You can use that specific backend by using the generic database backend. +Make sure to specify the appropriate backend path, e.g. spring.cloud.vault.mysql.role.backend=database.

    Example 32. pom.xml
    @@ -2249,9 +2197,7 @@ backend path, e.g. spring.cloud.vault.mysql.role.backend=database.< -Enabling multiple JDBC-compliant databases will generate credentials -and store them by default in the same property keys hence property names for -JDBC secrets need to be configured separately. +Enabling multiple JDBC-compliant databases will generate credentials and store them by default in the same property keys hence property names for JDBC secrets need to be configured separately. @@ -2262,15 +2208,13 @@ JDBC secrets need to be configured separately.

    Spring Cloud Vault can obtain credentials for any database listed at https://www.vaultproject.io/api/secret/databases/index.html. The integration can be enabled by setting -spring.cloud.vault.database.enabled=true (default false) and -providing the role name with spring.cloud.vault.database.role=….

    +spring.cloud.vault.database.enabled=true (default false) and providing the role name with spring.cloud.vault.database.role=….

    While the database backend is a generic one, spring.cloud.vault.database -specifically targets JDBC databases. Username and password are -stored in spring.datasource.username and spring.datasource.password -so using Spring Boot will pick up the generated credentials -for your DataSource without further configuration. +specifically targets JDBC databases. +Username and password are stored in spring.datasource.username and spring.datasource.password +so using Spring Boot will pick up the generated credentials for your DataSource without further configuration. You can configure the property names by setting spring.cloud.vault.database.username-property and spring.cloud.vault.database.password-property.

    @@ -2319,11 +2263,8 @@ You can configure the property names by setting -Spring Cloud Vault does not support getting new credentials and -configuring your DataSource with them when the maximum lease time -has been reached. That is, if max_ttl of the Database role in Vault -is set to 24h that means that 24 hours after your application has -started it can no longer authenticate with the database. +Spring Cloud Vault does not support getting new credentials and configuring your DataSource with them when the maximum lease time has been reached. +That is, if max_ttl of the Database role in Vault is set to 24h that means that 24 hours after your application has started it can no longer authenticate with the database. @@ -2338,8 +2279,7 @@ started it can no longer authenticate with the database. -The cassandra backend has been deprecated in Vault 0.7.1 and -it is recommended to use the database backend and mount it as cassandra. +The cassandra backend has been deprecated in Vault 0.7.1 and it is recommended to use the database backend and mount it as cassandra. @@ -2347,13 +2287,11 @@ it is recommended to use the database backend and mount it as

    Spring Cloud Vault can obtain credentials for Apache Cassandra. The integration can be enabled by setting -spring.cloud.vault.cassandra.enabled=true (default false) and -providing the role name with spring.cloud.vault.cassandra.role=….

    +spring.cloud.vault.cassandra.enabled=true (default false) and providing the role name with spring.cloud.vault.cassandra.role=….

    Username and password are stored in spring.data.cassandra.username -and spring.data.cassandra.password so using Spring Boot will pick -up the generated credentials without further configuration. +and spring.data.cassandra.password so using Spring Boot will pick up the generated credentials without further configuration. You can configure the property names by setting spring.cloud.vault.cassandra.username-property and spring.cloud.vault.cassandra.password-property.

    @@ -2405,8 +2343,7 @@ You can configure the property names by setting -The mongodb backend has been deprecated in Vault 0.7.1 and -it is recommended to use the database backend and mount it as mongodb. +The mongodb backend has been deprecated in Vault 0.7.1 and it is recommended to use the database backend and mount it as mongodb. @@ -2414,13 +2351,11 @@ it is recommended to use the database backend and mount it as

    Spring Cloud Vault can obtain credentials for MongoDB. The integration can be enabled by setting -spring.cloud.vault.mongodb.enabled=true (default false) and -providing the role name with spring.cloud.vault.mongodb.role=….

    +spring.cloud.vault.mongodb.enabled=true (default false) and providing the role name with spring.cloud.vault.mongodb.role=….

    Username and password are stored in spring.data.mongodb.username -and spring.data.mongodb.password so using Spring Boot will -pick up the generated credentials without further configuration. +and spring.data.mongodb.password so using Spring Boot will pick up the generated credentials without further configuration. You can configure the property names by setting spring.cloud.vault.mongodb.username-property and spring.cloud.vault.mongodb.password-property.

    @@ -2472,8 +2407,7 @@ You can configure the property names by setting -The mysql backend has been deprecated in Vault 0.7.1 and -it is recommended to use the database backend and mount it as mysql. +The mysql backend has been deprecated in Vault 0.7.1 and it is recommended to use the database backend and mount it as mysql. Configuration for spring.cloud.vault.mysql will be removed in a future version. @@ -2482,13 +2416,11 @@ Configuration for spring.cloud.vault.mysql will be removed in a fut

    Spring Cloud Vault can obtain credentials for MySQL. The integration can be enabled by setting -spring.cloud.vault.mysql.enabled=true (default false) and -providing the role name with spring.cloud.vault.mysql.role=….

    +spring.cloud.vault.mysql.enabled=true (default false) and providing the role name with spring.cloud.vault.mysql.role=….

    Username and password are stored in spring.datasource.username -and spring.datasource.password so using Spring Boot will -pick up the generated credentials without further configuration. +and spring.datasource.password so using Spring Boot will pick up the generated credentials without further configuration. You can configure the property names by setting spring.cloud.vault.mysql.username-property and spring.cloud.vault.mysql.password-property.

    @@ -2540,8 +2472,7 @@ You can configure the property names by setting -The postgresql backend has been deprecated in Vault 0.7.1 and -it is recommended to use the database backend and mount it as postgresql. +The postgresql backend has been deprecated in Vault 0.7.1 and it is recommended to use the database backend and mount it as postgresql. Configuration for spring.cloud.vault.postgresql will be removed in a future version. @@ -2550,13 +2481,11 @@ Configuration for spring.cloud.vault.postgresql will be removed in

    Spring Cloud Vault can obtain credentials for PostgreSQL. The integration can be enabled by setting -spring.cloud.vault.postgresql.enabled=true (default false) and -providing the role name with spring.cloud.vault.postgresql.role=….

    +spring.cloud.vault.postgresql.enabled=true (default false) and providing the role name with spring.cloud.vault.postgresql.role=….

    Username and password are stored in spring.datasource.username -and spring.datasource.password so using Spring Boot will -pick up the generated credentials without further configuration. +and spring.datasource.password so using Spring Boot will pick up the generated credentials without further configuration. You can configure the property names by setting spring.cloud.vault.postgresql.username-property and spring.cloud.vault.postgresql.password-property.

    @@ -2605,23 +2534,20 @@ You can configure the property names by setting

    Configure PropertySourceLocator behavior

    -

    Spring Cloud Vault uses property-based configuration to create PropertySources -for generic and discovered secret backends.

    +

    Spring Cloud Vault uses property-based configuration to create PropertySources for key-value and discovered secret backends.

    -

    Discovered backends provide VaultSecretBackendDescriptor beans to describe the configuration -state to use secret backend as PropertySource. A SecretBackendMetadataFactory is required -to create a SecretBackendMetadata object which contains path, name and property transformation -configuration.

    +

    Discovered backends provide VaultSecretBackendDescriptor beans to describe the configuration state to use secret backend as PropertySource. +A SecretBackendMetadataFactory is required to create a SecretBackendMetadata object which contains path, name and property transformation configuration.

    SecretBackendMetadata is used to back a particular PropertySource.

    You can register an arbitrary number of beans implementing VaultConfigurer for customization. -Default generic and discovered backend registration is disabled if Spring Cloud Vault discovers -at least one VaultConfigurer bean. You can however enable default registration with -SecretBackendConfigurer.registerDefaultGenericSecretBackends() and SecretBackendConfigurer.registerDefaultDiscoveredSecretBackends().

    +Default key-value and discovered backend registration is disabled if Spring Cloud Vault discovers at least one VaultConfigurer bean. +You can however enable default registration with +SecretBackendConfigurer.registerDefaultKeyValueSecretBackends() and SecretBackendConfigurer.registerDefaultDiscoveredSecretBackends().

    @@ -2634,7 +2560,7 @@ at least one VaultConfigurer bean. You can however enable default r configurer.add("secret/my-application"); - configurer.registerDefaultGenericSecretBackends(false); + configurer.registerDefaultKeyValueSecretBackends(false); configurer.registerDefaultDiscoveredSecretBackends(true); } } @@ -2649,8 +2575,8 @@ at least one VaultConfigurer bean. You can however enable default r -All customization is required to happen in the bootstrap context. Add your configuration -classes to META-INF/spring.factories at org.springframework.cloud.bootstrap.BootstrapConfiguration +All customization is required to happen in the bootstrap context. +Add your configuration classes to META-INF/spring.factories at org.springframework.cloud.bootstrap.BootstrapConfiguration in your application. @@ -2662,22 +2588,17 @@ in your application.

    Service Registry Configuration

    -

    You can use a DiscoveryClient (such as from Spring Cloud Consul) to locate -a Vault server by setting spring.cloud.vault.discovery.enabled=true (default false). -The net result of that is that your apps need a bootstrap.yml (or an environment variable) -with the appropriate discovery configuration. -The benefit is that the Vault can change its co-ordinates, as long as the discovery service -is a fixed point. The default service id is vault but you can change that on the client with +

    You can use a DiscoveryClient (such as from Spring Cloud Consul) to locate a Vault server by setting spring.cloud.vault.discovery.enabled=true (default false). +The net result of that is that your apps need a bootstrap.yml (or an environment variable) with the appropriate discovery configuration. +The benefit is that the Vault can change its co-ordinates, as long as the discovery service is a fixed point. +The default service id is vault but you can change that on the client with spring.cloud.vault.discovery.serviceId.

    -

    The discovery client implementations all support some kind of metadata map -(e.g. for Eureka we have eureka.instance.metadataMap). Some additional properties of the service -may need to be configured in its service registration metadata so that clients can connect -correctly. Service registries that do not provide details about transport layer security -need to provide a scheme metadata entry to be set either to https or http. -If no scheme is configured and the service is not exposed as secure service, then -configuration defaults to spring.cloud.vault.scheme which is https when it’s not set.

    +

    The discovery client implementations all support some kind of metadata map (e.g. for Eureka we have eureka.instance.metadataMap). +Some additional properties of the service may need to be configured in its service registration metadata so that clients can connect correctly. +Service registries that do not provide details about transport layer security need to provide a scheme metadata entry to be set either to https or http. +If no scheme is configured and the service is not exposed as secure service, then configuration defaults to spring.cloud.vault.scheme which is https when it’s not set.

    @@ -2696,11 +2617,9 @@ configuration defaults to spring.cloud.vault.scheme which is

    Vault Client Fail Fast

    -

    In some cases, it may be desirable to fail startup of a service if -it cannot connect to the Vault Server. If this is the desired -behavior, set the bootstrap configuration property -spring.cloud.vault.fail-fast=true and the client will halt with -an Exception.

    +

    In some cases, it may be desirable to fail startup of a service if it cannot connect to the Vault Server. +If this is the desired behavior, set the bootstrap configuration property +spring.cloud.vault.fail-fast=true and the client will halt with an Exception.

    @@ -2718,15 +2637,14 @@ an Exception.

    Vault Enterprise Namespace Support

    -

    Vault Enterprise allows using namespaces to isolate multiple Vaults -on a single Vault server. Configuring a namespace by setting +

    Vault Enterprise allows using namespaces to isolate multiple Vaults on a single Vault server. +Configuring a namespace by setting spring.cloud.vault.namespace=… enables the namespace header X-Vault-Namespace on every outgoing HTTP request when using the Vault RestTemplate or WebClient.

    -

    Please note that this feature is not supported by Vault Community edition -and has no effect on Vault operations.

    +

    Please note that this feature is not supported by Vault Community edition and has no effect on Vault operations.

    @@ -2748,8 +2666,7 @@ and has no effect on Vault operations.

    SSL can be configured declaratively by setting various properties. -You can set either javax.net.ssl.trustStore to configure -JVM-wide SSL settings or spring.cloud.vault.ssl.trust-store +You can set either javax.net.ssl.trustStore to configure JVM-wide SSL settings or spring.cloud.vault.ssl.trust-store to set SSL settings only for Spring Cloud Vault Config.

    @@ -2767,9 +2684,8 @@ to set SSL settings only for Spring Cloud Vault Config.

    • -

      trust-store sets the resource for the trust-store. SSL-secured Vault -communication will validate the Vault SSL certificate with the specified -trust-store.

      +

      trust-store sets the resource for the trust-store. +SSL-secured Vault communication will validate the Vault SSL certificate with the specified trust-store.

    • trust-store-password sets the trust-store password

      @@ -2777,9 +2693,7 @@ trust-store.

    -

    Please note that configuring spring.cloud.vault.ssl.* can be only -applied when either Apache Http Components or the OkHttp client -is on your class-path.

    +

    Please note that configuring spring.cloud.vault.ssl.* can be only applied when either Apache Http Components or the OkHttp client is on your class-path.

    @@ -2788,28 +2702,19 @@ is on your class-path.

    With every secret, Vault creates a lease: -metadata containing information such as a time duration, -renewability, and more.

    +metadata containing information such as a time duration, renewability, and more.

    -

    Vault promises that the data will be valid for the given duration, -or Time To Live (TTL). Once the lease is expired, Vault can -revoke the data, and the consumer of the secret can no longer -be certain that it is valid.

    +

    Vault promises that the data will be valid for the given duration, or Time To Live (TTL). +Once the lease is expired, Vault can revoke the data, and the consumer of the secret can no longer be certain that it is valid.

    -

    Spring Cloud Vault maintains a lease lifecycle beyond -the creation of login tokens and secrets. That said, -login tokens and secrets associated with a lease -are scheduled for renewal just before the lease expires -until terminal expiry. -Application shutdown revokes obtained login tokens and renewable -leases.

    +

    Spring Cloud Vault maintains a lease lifecycle beyond the creation of login tokens and secrets. +That said, login tokens and secrets associated with a lease are scheduled for renewal just before the lease expires until terminal expiry. +Application shutdown revokes obtained login tokens and renewable leases.

    -

    Secret service and database backends (such as MongoDB or MySQL) -usually generate a renewable lease so generated credentials will -be disabled on application shutdown.

    +

    Secret service and database backends (such as MongoDB or MySQL) usually generate a renewable lease so generated credentials will be disabled on application shutdown.

    @@ -2824,12 +2729,9 @@ Static tokens are not renewed or revoked.
    -

    Lease renewal and revocation is enabled by default and can -be disabled by setting spring.cloud.vault.config.lifecycle.enabled -to false. This is not recommended as leases can expire and -Spring Cloud Vault cannot longer access Vault or services -using generated credentials and valid credentials remain active -after application shutdown.

    +

    Lease renewal and revocation is enabled by default and can be disabled by setting spring.cloud.vault.config.lifecycle.enabled +to false. +This is not recommended as leases can expire and Spring Cloud Vault cannot longer access Vault or services using generated credentials and valid credentials remain active after application shutdown.

    @@ -2848,16 +2750,20 @@ after application shutdown.

    • -

      enabled controls whether leases associated with secrets are considered to be renewed and expired secrets are rotated. Enabled by default.

      +

      enabled controls whether leases associated with secrets are considered to be renewed and expired secrets are rotated. +Enabled by default.

    • -

      min-renewal sets the duration that is at least required before renewing a lease. This setting prevents renewals from happening too often.

      +

      min-renewal sets the duration that is at least required before renewing a lease. +This setting prevents renewals from happening too often.

    • -

      expiry-threshold sets the expiry threshold. A lease is renewed the configured period of time before it expires.

      +

      expiry-threshold sets the expiry threshold. +A lease is renewed the configured period of time before it expires.

    • -

      lease-endpoints sets the endpoints for renew and revoke. Legacy for vault versions before 0.8 and SysLeases for later.

      +

      lease-endpoints sets the endpoints for renew and revoke. +Legacy for vault versions before 0.8 and SysLeases for later.