(window.webpackJsonp=window.webpackJsonp||[]).push([[81],{515:function(e,t,a){"use strict";a.r(t);var n=a(56),o=Object(n.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"spring-cloud-vault"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#spring-cloud-vault"}},[e._v("#")]),e._v(" Spring Cloud Vault")]),e._v(" "),a("h2",{attrs:{id:"_1-new-noteworthy"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-new-noteworthy"}},[e._v("#")]),e._v(" 1. New & Noteworthy")]),e._v(" "),a("p",[e._v("This section briefly covers items that are new and noteworthy in the latest releases.")]),e._v(" "),a("h3",{attrs:{id:"_1-1-new-in-spring-cloud-vault-3-0"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-1-new-in-spring-cloud-vault-3-0"}},[e._v("#")]),e._v(" 1.1. New in Spring Cloud Vault 3.0")]),e._v(" "),a("ul",[a("li",[a("p",[e._v("Migration of "),a("code",[e._v("PropertySource")]),e._v(" initialization from Spring Cloud’s Bootstrap Context to Spring Boot’s "),a("a",{attrs:{href:"#vault.configdata"}},[e._v("ConfigData API")]),e._v(".")])]),e._v(" "),a("li",[a("p",[e._v("Support for the "),a("a",{attrs:{href:"#vault.config.backends.couchbase"}},[e._v("Couchbase Database")]),e._v(" backend.")])]),e._v(" "),a("li",[a("p",[e._v("Configuration of keystore/truststore types through "),a("code",[e._v("spring.cloud.vault.ssl.key-store-type=…")]),e._v("/"),a("code",[e._v("spring.cloud.vault.ssl.trust-store-type=…")]),e._v(" including PEM support.")])]),e._v(" "),a("li",[a("p",[e._v("Support for "),a("code",[e._v("ReactiveDiscoveryClient")]),e._v(" by configuring a "),a("code",[e._v("ReactiveVaultEndpointProvider")]),e._v(".")])]),e._v(" "),a("li",[a("p",[e._v("Support to configure "),a("a",{attrs:{href:"#vault.config.backends.databases"}},[e._v("Multiple Databases")]),e._v(".")])])]),e._v(" "),a("h2",{attrs:{id:"_2-quick-start"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-quick-start"}},[e._v("#")]),e._v(" 2. Quick Start")]),e._v(" "),a("p",[a("strong",[e._v("Prerequisites")])]),e._v(" "),a("p",[e._v("To get started with Vault and this guide you need a *NIX-like operating systems that provides:")]),e._v(" "),a("ul",[a("li",[a("p",[a("code",[e._v("wget")]),e._v(", "),a("code",[e._v("openssl")]),e._v(" and "),a("code",[e._v("unzip")])])]),e._v(" "),a("li",[a("p",[e._v("at least Java 8 and a properly configured "),a("code",[e._v("JAVA_HOME")]),e._v(" environment variable")])])]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("This guide explains Vault setup from a Spring Cloud Vault perspective for integration testing."),a("br"),e._v("You can find a getting started guide directly on the Vault project site: "),a("a",{attrs:{href:"https://learn.hashicorp.com/vault",target:"_blank",rel:"noopener noreferrer"}},[e._v("learn.hashicorp.com/vault"),a("OutboundLink")],1)])])]),e._v(" "),a("tbody")]),e._v(" "),a("p",[a("strong",[e._v("Install Vault")])]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("$ wget https://releases.hashicorp.com/vault/${vault_version}/vault_${vault_version}_${platform}.zip\n$ unzip vault_${vault_version}_${platform}.zip\n")])])]),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("These steps can be achieved by downloading and running "),a("a",{attrs:{href:"https://github.com/spring-cloud/spring-cloud-vault/blob/master/src/test/bash/install_vault.sh",target:"_blank",rel:"noopener noreferrer"}},[a("code",[e._v("install_vault.sh")]),a("OutboundLink")],1),e._v(".")])])]),e._v(" "),a("tbody")]),e._v(" "),a("p",[a("strong",[e._v("Create SSL certificates for Vault")])]),e._v(" "),a("p",[e._v("Next, you’r required to generate a set of certificates:")]),e._v(" "),a("ul",[a("li",[a("p",[e._v("Root CA")])]),e._v(" "),a("li",[a("p",[e._v("Vault Certificate (decrypted key "),a("code",[e._v("work/ca/private/localhost.decrypted.key.pem")]),e._v(" and certificate "),a("code",[e._v("work/ca/certs/localhost.cert.pem")]),e._v(")")])])]),e._v(" "),a("p",[e._v("Make sure to import the Root Certificate into a Java-compliant truststore.")]),e._v(" "),a("p",[e._v("The easiest way to achieve this is by using OpenSSL.")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[a("a",{attrs:{href:"https://github.com/spring-cloud/spring-cloud-vault/blob/master/src/test/bash/",target:"_blank",rel:"noopener noreferrer"}},[a("code",[e._v("create_certificates.sh")]),a("OutboundLink")],1),e._v(" creates certificates in "),a("code",[e._v("work/ca")]),e._v(" and a JKS truststore "),a("code",[e._v("work/keystore.jks")]),e._v("."),a("br"),e._v("If you want to run Spring Cloud Vault using this quickstart guide you need to configure the truststore the "),a("code",[e._v("spring.cloud.vault.ssl.trust-store")]),e._v(" property to "),a("code",[e._v("file:work/keystore.jks")]),e._v(".")])])]),e._v(" "),a("tbody")]),e._v(" "),a("p",[a("strong",[e._v("Start Vault server")])]),e._v(" "),a("p",[e._v("Next create a config file along the lines of:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('backend "inmem" {\n}\n\nlistener "tcp" {\n address = "0.0.0.0:8200"\n tls_cert_file = "work/ca/certs/localhost.cert.pem"\n tls_key_file = "work/ca/private/localhost.decrypted.key.pem"\n}\n\ndisable_mlock = true\n')])])]),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("You can find an example config file at "),a("a",{attrs:{href:"https://github.com/spring-clod/spring-cloud-vault/blob/master/src/test/bash/vault.conf",target:"_blank",rel:"noopener noreferrer"}},[a("code",[e._v("vault.conf")]),a("OutboundLink")],1),e._v(".")])])]),e._v(" "),a("tbody")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("$ vault server -config=vault.conf\n")])])]),a("p",[e._v("Vault is started listening on "),a("code",[e._v("0.0.0.0:8200")]),e._v(" using the "),a("code",[e._v("inmem")]),e._v(" storage and "),a("code",[e._v("https")]),e._v(".\nVault is sealed and not initialized when starting up.")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("If you want to run tests, leave Vault uninitialized."),a("br"),e._v("The tests will initialize Vault and create a root token "),a("code",[e._v("00000000-0000-0000-0000-000000000000")]),e._v(".")])])]),e._v(" "),a("tbody")]),e._v(" "),a("p",[e._v("If you want to use Vault for your application or give it a try then you need to initialize it first.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('$ export VAULT_ADDR="https://localhost:8200"\n$ export VAULT_SKIP_VERIFY=true # Don\'t do this for production\n$ vault operator init\n')])])]),a("p",[e._v("You should see something like:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("Key 1: 7149c6a2e16b8833f6eb1e76df03e47f6113a3288b3093faf5033d44f0e70fe701\nKey 2: 901c534c7988c18c20435a85213c683bdcf0efcd82e38e2893779f152978c18c02\nKey 3: 03ff3948575b1165a20c20ee7c3e6edf04f4cdbe0e82dbff5be49c63f98bc03a03\nKey 4: 216ae5cc3ddaf93ceb8e1d15bb9fc3176653f5b738f5f3d1ee00cd7dccbe926e04\nKey 5: b2898fc8130929d569c1677ee69dc5f3be57d7c4b494a6062693ce0b1c4d93d805\nInitial Root Token: 19aefa97-cccc-bbbb-aaaa-225940e63d76\n\nVault initialized with 5 keys and a key threshold of 3. Please\nsecurely distribute the above keys. When the Vault is re-sealed,\nrestarted, or stopped, you must provide at least 3 of these keys\nto unseal it again.\n\nVault does not store the master key. Without at least 3 keys,\nyour Vault will remain permanently sealed.\n")])])]),a("p",[e._v("Vault will initialize and return a set of unsealing keys and the root token.\nPick 3 keys and unseal Vault.\nStore the Vault token in the "),a("code",[e._v("VAULT_TOKEN")]),e._v("environment variable.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('$ vault operator unseal (Key 1)\n$ vault operator unseal (Key 2)\n$ vault operator unseal (Key 3)\n$ export VAULT_TOKEN=(Root token)\n# Required to run Spring Cloud Vault tests after manual initialization\n$ vault token create -id="00000000-0000-0000-0000-000000000000" -policy="root"\n')])])]),a("p",[e._v("Spring Cloud Vault accesses different resources.\nBy default, the secret backend is enabled which accesses secret config settings via JSON endpoints.")]),e._v(" "),a("p",[e._v("The HTTP service has resources in the form:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("/secret/{application}/{profile}\n/secret/{application}\n/secret/{defaultContext}/{profile}\n/secret/{defaultContext}\n")])])]),a("p",[e._v('where the "application" is injected as the '),a("code",[e._v("spring.application.name")]),e._v(" in the"),a("code",[e._v("SpringApplication")]),e._v(' (i.e. what is normally "application" in a regular Spring Boot app), "profile" is an active profile (or comma-separated list of properties).\nProperties retrieved from Vault will be used "as-is" without further prefixing of the property names.')]),e._v(" "),a("h2",{attrs:{id:"_3-client-side-usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-client-side-usage"}},[e._v("#")]),e._v(" 3. Client Side Usage")]),e._v(" "),a("p",[e._v("To use these features in an application, just build it as a Spring Boot application that depends on "),a("code",[e._v("spring-cloud-vault-config")]),e._v(" (e.g. see the test cases).\nExample Maven configuration:")]),e._v(" "),a("p",[e._v("Example 1. pom.xml")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("\n org.springframework.boot\n spring-boot-starter-parent\n 2.4.0.RELEASE\n \x3c!-- lookup parent from repository --\x3e\n\n\n\n \n org.springframework.cloud\n spring-cloud-starter-vault-config\n 3.1.0\n \n \n org.springframework.boot\n spring-boot-starter-test\n test\n \n\n\n\n \n \n org.springframework.boot\n spring-boot-maven-plugin\n \n \n\n\n\x3c!-- repositories also needed for snapshots and milestones --\x3e\n")])])]),a("p",[e._v("Then you can create a standard Spring Boot application, like this simple HTTP server:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('@SpringBootApplication\n@RestController\npublic class Application {\n\n @RequestMapping("/")\n public String home() {\n return "Hello World!";\n }\n\n public static void main(String[] args) {\n SpringApplication.run(Application.class, args);\n }\n}\n')])])]),a("p",[e._v("When it runs it will pick up the external configuration from the default local Vault server on port "),a("code",[e._v("8200")]),e._v(" if it is running.\nTo modify the startup behavior you can change the location of the Vault server using "),a("code",[e._v("application.properties")]),e._v(", for example")]),e._v(" "),a("p",[e._v("Example 2. application.yml")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n host: localhost\n port: 8200\n scheme: https\n uri: https://localhost:8200\n connection-timeout: 5000\n read-timeout: 15000\n config:\nspring.config.import: vault://\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("host")]),e._v(" sets the hostname of the Vault host.\nThe host name will be used for SSL certificate validation")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("port")]),e._v(" sets the Vault port")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("scheme")]),e._v(" setting the scheme to "),a("code",[e._v("http")]),e._v(" will use plain HTTP.\nSupported schemes are "),a("code",[e._v("http")]),e._v(" and "),a("code",[e._v("https")]),e._v(".")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("uri")]),e._v(" configure the Vault endpoint with an URI. Takes precedence over host/port/scheme configuration")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("connection-timeout")]),e._v(" sets the connection timeout in milliseconds")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("read-timeout")]),e._v(" sets the read timeout in milliseconds")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("spring.config.import")]),e._v(" mounts Vault as "),a("code",[e._v("PropertySource")]),e._v(" using all enabled secret backends (key-value enabled by default)")])])]),e._v(" "),a("p",[e._v("Enabling further integrations requires additional dependencies and configuration.\nDepending on how you have set up Vault you might need additional configuration like"),a("a",{attrs:{href:"https://cloud.spring.io/spring-cloud-vault/reference/html/#vault.config.ssl",target:"_blank",rel:"noopener noreferrer"}},[e._v("SSL"),a("OutboundLink")],1),e._v(" and"),a("a",{attrs:{href:"https://cloud.spring.io/spring-cloud-vault/reference/html/#vault.config.authentication",target:"_blank",rel:"noopener noreferrer"}},[e._v("authentication"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("p",[e._v("If the application imports the "),a("code",[e._v("spring-boot-starter-actuator")]),e._v(" project, the status of the vault server will be available via the "),a("code",[e._v("/health")]),e._v(" endpoint.")]),e._v(" "),a("p",[e._v("The vault health indicator can be enabled or disabled through the property "),a("code",[e._v("management.health.vault.enabled")]),e._v(" (default to "),a("code",[e._v("true")]),e._v(").")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("With Spring Cloud Vault 3.0 and Spring Boot 2.4, the bootstrap context initialization ("),a("code",[e._v("bootstrap.yml")]),e._v(", "),a("code",[e._v("bootstrap.properties")]),e._v(") of property sources was deprecated."),a("br"),e._v("Instead, Spring Cloud Vault favors Spring Boot’s Config Data API which allows importing configuration from Vault. With Spring Boot Config Data approach, you need to set the "),a("code",[e._v("spring.config.import")]),e._v(" property in order to bind to Vault. You can read more about it in the "),a("a",{attrs:{href:"#vault.configdata.locations"}},[e._v("Config Data Locations section")]),e._v("."),a("br"),e._v("You can enable the bootstrap context either by setting the configuration property "),a("code",[e._v("spring.cloud.bootstrap.enabled=true")]),e._v(" or by including the dependency "),a("code",[e._v("org.springframework.cloud:spring-cloud-starter-bootstrap")]),e._v(".")])])]),e._v(" "),a("tbody")]),e._v(" "),a("h3",{attrs:{id:"_3-1-authentication"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-authentication"}},[e._v("#")]),e._v(" 3.1. Authentication")]),e._v(" "),a("p",[e._v("Vault requires an "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/concepts/auth.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("authentication mechanism"),a("OutboundLink")],1),e._v(" to "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/concepts/tokens.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("authorize client requests"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("p",[e._v("Spring Cloud Vault supports multiple "),a("a",{attrs:{href:"https://cloud.spring.io/spring-cloud-vault/reference/html/#vault.config.authentication",target:"_blank",rel:"noopener noreferrer"}},[e._v("authentication mechanisms"),a("OutboundLink")],1),e._v(" to authenticate applications with Vault.")]),e._v(" "),a("p",[e._v("For a quickstart, use the root token printed by the "),a("a",{attrs:{href:"#quickstart.vault.start"}},[e._v("Vault initialization")]),e._v(".")]),e._v(" "),a("p",[e._v("Example 3. application.yml")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n token: 19aefa97-cccc-bbbb-aaaa-225940e63d76\nspring.config.import: vault://\n")])])]),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("Consider carefully your security requirements."),a("br"),e._v("Static token authentication is fine if you want quickly get started with Vault, but a static token is not protected any further."),a("br"),e._v("Any disclosure to unintended parties allows Vault use with the associated token roles.")])])]),e._v(" "),a("tbody")]),e._v(" "),a("h2",{attrs:{id:"_4-configdata-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-configdata-api"}},[e._v("#")]),e._v(" 4. ConfigData API")]),e._v(" "),a("p",[e._v("Spring Boot provides since version 2.4 a ConfigData API that allows the declaration of configuration sources and importing these as property sources.")]),e._v(" "),a("p",[e._v("Spring Cloud Vault uses as of version 3.0 the ConfigData API to mount Vault’s secret backends as property sources.\nIn previous versions, the Bootstrap context was used.\nThe ConfigData API is much more flexible as it allows specifying which configuration systems to import and in which order.")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("You can enable the deprecated bootstrap context either by setting the configuration property "),a("code",[e._v("spring.cloud.bootstrap.enabled=true")]),e._v(" or by including the dependency "),a("code",[e._v("org.springframework.cloud:spring-cloud-starter-bootstrap")]),e._v(".")])])]),e._v(" "),a("tbody")]),e._v(" "),a("h3",{attrs:{id:"_4-1-configdata-locations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-configdata-locations"}},[e._v("#")]),e._v(" 4.1. ConfigData Locations")]),e._v(" "),a("p",[e._v("You can mount Vault configuration through one or more "),a("code",[e._v("PropertySource")]),e._v(" that are materialized from Vault.\nSpring Cloud Vault supports two config locations:")]),e._v(" "),a("ul",[a("li",[a("p",[a("code",[e._v("vault://")]),e._v(" (default location)")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("vault:///")]),e._v(" (contextual location)")])])]),e._v(" "),a("p",[e._v("Using the default location mounts property sources for all enabled "),a("a",{attrs:{href:"#vault.config.backends"}},[e._v("Secret Backends")]),e._v(".\nWithout further configuration, Spring Cloud Vault mounts the key-value backend at "),a("code",[e._v("/secret/${spring.application.name}")]),e._v(".\nEach activated profile adds another context path following the form "),a("code",[e._v("/secret/${spring.application.name}/${profile}")]),e._v(".\nAdding further modules to the classpath, such as "),a("code",[e._v("spring-cloud-config-databases")]),e._v(", provides additional secret backend configuration options which get mounted as property sources if enabled.")]),e._v(" "),a("p",[e._v("If you want to control which context paths are mounted from Vault as "),a("code",[e._v("PropertySource")]),e._v(", you can either use a contextual location ("),a("code",[e._v("vault:///my/context/path")]),e._v(") or configure a "),a("a",{attrs:{href:"#vault.config.backends.configurer"}},[a("code",[e._v("VaultConfigurer")])]),e._v(".")]),e._v(" "),a("p",[e._v("Contextual locations are specified and mounted individually.\nSpring Cloud Vault mounts each location as a unique "),a("code",[e._v("PropertySource")]),e._v(".\nYou can mix the default locations with contextual locations (or other config systems) to control the order of property sources.\nThis approach is useful in particular if you want to disable the default key-value path computation and mount each key-value backend yourself instead.")]),e._v(" "),a("p",[e._v("Example 4. application.yml")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.config.import: vault://first/context/path, vault://other/path, vault://\n")])])]),a("p",[e._v("Property names within a Spring "),a("code",[e._v("Environment")]),e._v(" must be unique to avoid shadowing.\nIf you use the same secret names in different context paths and you want to expose these as individual properties you can distinguish them by adding a "),a("code",[e._v("prefix")]),e._v(" query parameter to the location.")]),e._v(" "),a("p",[e._v("Example 5. application.yml")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.config.import: vault://my/path?prefix=foo., vault://my/other/path?prefix=bar.\nsecret: ${foo.secret}\nother.secret: ${bar.secret}\n")])])]),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("Prefixes are added as-is to all property names returned by Vault. If you want key names to be separated with a dot between the prefix and key name, make sure to add a trailing dot to the prefix.")])])]),e._v(" "),a("tbody")]),e._v(" "),a("h3",{attrs:{id:"_4-2-conditionally-enable-disable-vault-configuration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-conditionally-enable-disable-vault-configuration"}},[e._v("#")]),e._v(" 4.2. Conditionally enable/disable Vault Configuration")]),e._v(" "),a("p",[e._v("In some cases, it can be required to launch an application without Vault. You can express whether a Vault config location should be optional or mandatory (default) through the location string:")]),e._v(" "),a("ul",[a("li",[a("p",[a("code",[e._v("optional:vault://")]),e._v(" (default location)")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("optional:vault:///")]),e._v(" (contextual location)")])])]),e._v(" "),a("p",[e._v("Optional locations are skipped during application startup if Vault support was disabled through "),a("code",[e._v("spring.cloud.vault.enabled=false")]),e._v(".")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("Vault context paths that cannot be found (HTTP Status 404) are skipped regardless of whether the config location is marked optional. "),a("a",{attrs:{href:"#vault.config.fail-fast"}},[e._v("Vault Client Fail Fast")]),e._v(" allows failing on start if a Vault context path cannot be found because of HTTP Status 404.")])])]),e._v(" "),a("tbody")]),e._v(" "),a("h3",{attrs:{id:"_4-3-infrastructure-customization"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-infrastructure-customization"}},[e._v("#")]),e._v(" 4.3. Infrastructure Customization")]),e._v(" "),a("p",[e._v("Spring Cloud Vault requires infrastructure classes to interact with Vault. When not using the ConfigData API (meaning that you haven’t specified "),a("code",[e._v("spring.config.import=vault://")]),e._v(" or a contextual Vault path), Spring Cloud Vault defines its beans through "),a("code",[e._v("VaultAutoConfiguration")]),e._v(" and "),a("code",[e._v("VaultReactiveAutoConfiguration")]),e._v(".\nSpring Boot bootstraps the application before a Spring Context is available. Therefore "),a("code",[e._v("VaultConfigDataLoader")]),e._v(" registers beans itself to propagate these later on into the application context.")]),e._v(" "),a("p",[e._v("You can customize the infrastructure used by Spring Cloud Vault by registering custom instances using the "),a("code",[e._v("Bootstrapper")]),e._v(" API:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('InstanceSupplier builderSupplier = ctx -> RestTemplateBuilder\n .builder()\n .requestFactory(ctx.get(ClientFactoryWrapper.class).getClientHttpRequestFactory())\n .defaultHeader("X-Vault-Namespace", "my-namespace");\n\nSpringApplication application = new SpringApplication(MyApplication.class);\napplication.addBootstrapper(registry -> registry.register(RestTemplateBuilder.class, builderSupplier));\n')])])]),a("p",[e._v("See also "),a("a",{attrs:{href:"#vault.config.backends.configurer"}},[e._v("Customize which secret backends to expose as PropertySource")]),e._v(" and the source of "),a("code",[e._v("VaultConfigDataLoader")]),e._v(" for customization hooks.")]),e._v(" "),a("h2",{attrs:{id:"_5-authentication-methods"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-authentication-methods"}},[e._v("#")]),e._v(" 5. Authentication methods")]),e._v(" "),a("p",[e._v("Different organizations have different requirements for security and authentication.\nVault reflects that need by shipping multiple authentication methods.\nSpring Cloud Vault supports token and AppId authentication.")]),e._v(" "),a("h3",{attrs:{id:"_5-1-token-authentication"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-1-token-authentication"}},[e._v("#")]),e._v(" 5.1. Token authentication")]),e._v(" "),a("p",[e._v("Tokens are the core method for authentication within Vault.\nToken authentication requires a static token to be provided using the configuration.\nAs a fallback, the token may also be retrieved from "),a("code",[e._v("~/.vault-token")]),e._v(" which is the default location used by the Vault CLI to cache tokens.")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("Token authentication is the default authentication method."),a("br"),e._v("If a token is disclosed an unintended party gains access to Vault and can access secrets for the intended client.")])])]),e._v(" "),a("tbody")]),e._v(" "),a("p",[e._v("Example 6. application.yml")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: TOKEN\n token: 00000000-0000-0000-0000-000000000000\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("authentication")]),e._v(" setting this value to "),a("code",[e._v("TOKEN")]),e._v(" selects the Token authentication method")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("token")]),e._v(" sets the static token to use. If missing or empty, then an attempt will be made to retrieve a token from ~/.vault-token.")])])]),e._v(" "),a("p",[e._v("See also:")]),e._v(" "),a("ul",[a("li",[a("p",[a("a",{attrs:{href:"https://www.vaultproject.io/docs/concepts/tokens.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Tokens"),a("OutboundLink")],1)])]),e._v(" "),a("li",[a("p",[a("a",{attrs:{href:"https://www.vaultproject.io/docs/commands/login",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: CLI login"),a("OutboundLink")],1)])]),e._v(" "),a("li",[a("p",[a("a",{attrs:{href:"https://www.vaultproject.io/docs/commands/token-helper",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: CLI default to ~/.vault-token"),a("OutboundLink")],1)])])]),e._v(" "),a("h3",{attrs:{id:"_5-2-vault-agent-authentication"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-2-vault-agent-authentication"}},[e._v("#")]),e._v(" 5.2. Vault Agent authentication")]),e._v(" "),a("p",[e._v("Vault ships a sidecar utility with Vault Agent since version 0.11.0. Vault Agent implements the functionality of Spring Vault’s "),a("code",[e._v("SessionManager")]),e._v("with its Auto-Auth feature.\nApplications can reuse cached session credentials by relying on Vault Agent running on "),a("code",[e._v("localhost")]),e._v(".\nSpring Vault can send requests without the"),a("code",[e._v("X-Vault-Token")]),e._v(" header.\nDisable Spring Vault’s authentication infrastructure to disable client authentication and session management.")]),e._v(" "),a("p",[e._v("Example 7. application.yml")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: NONE\n")])])]),a("ul",[a("li",[a("code",[e._v("authentication")]),e._v(" setting this value to "),a("code",[e._v("NONE")]),e._v(" disables "),a("code",[e._v("ClientAuthentication")]),e._v("and "),a("code",[e._v("SessionManager")]),e._v(".")])]),e._v(" "),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/agent/index.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Agent"),a("OutboundLink")],1)]),e._v(" "),a("h3",{attrs:{id:"_5-3-appid-authentication"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-3-appid-authentication"}},[e._v("#")]),e._v(" 5.3. AppId authentication")]),e._v(" "),a("p",[e._v("Vault supports "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/auth/app-id.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("AppId"),a("OutboundLink")],1),e._v("authentication that consists of two hard to guess tokens.\nThe AppId defaults to "),a("code",[e._v("spring.application.name")]),e._v(" that is statically configured.\nThe second token is the UserId which is a part determined by the application, usually related to the runtime environment.\nIP address, Mac address or a Docker container name are good examples.\nSpring Cloud Vault Config supports IP address, Mac address and static UserId’s (e.g. supplied via System properties).\nThe IP and Mac address are represented as Hex-encoded SHA256 hash.")]),e._v(" "),a("p",[e._v("IP address-based UserId’s use the local host’s IP address.")]),e._v(" "),a("p",[e._v("Example 8. application.yml using SHA256 IP-Address UserId’s")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: APPID\n app-id:\n user-id: IP_ADDRESS\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("authentication")]),e._v(" setting this value to "),a("code",[e._v("APPID")]),e._v(" selects the AppId authentication method")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("app-id-path")]),e._v(" sets the path of the AppId mount to use")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("user-id")]),e._v(" sets the UserId method.\nPossible values are "),a("code",[e._v("IP_ADDRESS")]),e._v(","),a("code",[e._v("MAC_ADDRESS")]),e._v(" or a class name implementing a custom "),a("code",[e._v("AppIdUserIdMechanism")])])])]),e._v(" "),a("p",[e._v("The corresponding command to generate the IP address UserId from a command line is:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("$ echo -n 192.168.99.1 | sha256sum\n")])])]),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("Including the line break of "),a("code",[e._v("echo")]),e._v(" leads to a different hash value so make sure to include the "),a("code",[e._v("-n")]),e._v(" flag.")])])]),e._v(" "),a("tbody")]),e._v(" "),a("p",[e._v("Mac address-based UserId’s obtain their network device from the localhost-bound device.\nThe configuration also allows specifying a "),a("code",[e._v("network-interface")]),e._v(" hint to pick the right device.\nThe value of"),a("code",[e._v("network-interface")]),e._v(" is optional and can be either an interface name or interface index (0-based).")]),e._v(" "),a("p",[e._v("Example 9. application.yml using SHA256 Mac-Address UserId’s")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: APPID\n app-id:\n user-id: MAC_ADDRESS\n network-interface: eth0\n")])])]),a("ul",[a("li",[a("code",[e._v("network-interface")]),e._v(" sets network interface to obtain the physical address")])]),e._v(" "),a("p",[e._v("The corresponding command to generate the IP address UserId from a command line is:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("$ echo -n 0AFEDE1234AC | sha256sum\n")])])]),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("The Mac address is specified uppercase and without colons."),a("br"),e._v("Including the line break of "),a("code",[e._v("echo")]),e._v(" leads to a different hash value so make sure to include the "),a("code",[e._v("-n")]),e._v(" flag.")])])]),e._v(" "),a("tbody")]),e._v(" "),a("h4",{attrs:{id:"_5-3-1-custom-userid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-3-1-custom-userid"}},[e._v("#")]),e._v(" 5.3.1. Custom UserId")]),e._v(" "),a("p",[e._v("The UserId generation is an open mechanism.\nYou can set"),a("code",[e._v("spring.cloud.vault.app-id.user-id")]),e._v(" to any string and the configured value will be used as static UserId.")]),e._v(" "),a("p",[e._v("A more advanced approach lets you set "),a("code",[e._v("spring.cloud.vault.app-id.user-id")]),e._v(" to a classname.\nThis class must be on your classpath and must implement the "),a("code",[e._v("org.springframework.cloud.vault.AppIdUserIdMechanism")]),e._v(" interface and the "),a("code",[e._v("createUserId")]),e._v(" method.\nSpring Cloud Vault will obtain the UserId by calling "),a("code",[e._v("createUserId")]),e._v(" each time it authenticates using AppId to obtain a token.")]),e._v(" "),a("p",[e._v("Example 10. application.yml")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: APPID\n app-id:\n user-id: com.examlple.MyUserIdMechanism\n")])])]),a("p",[e._v("Example 11. MyUserIdMechanism.java")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("public class MyUserIdMechanism implements AppIdUserIdMechanism {\n\n @Override\n public String createUserId() {\n String userId = ...\n return userId;\n }\n}\n")])])]),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/auth/app-id.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Using the App ID auth backend"),a("OutboundLink")],1)]),e._v(" "),a("h3",{attrs:{id:"_5-4-approle-authentication"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-4-approle-authentication"}},[e._v("#")]),e._v(" 5.4. AppRole authentication")]),e._v(" "),a("p",[a("a",{attrs:{href:"https://www.vaultproject.io/docs/auth/app-id.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("AppRole"),a("OutboundLink")],1),e._v(" is intended for machine authentication, like the deprecated (since Vault 0.6.1) "),a("a",{attrs:{href:"#vault.config.authentication.appid"}},[e._v("AppId authentication")]),e._v(".\nAppRole authentication consists of two hard to guess (secret) tokens: RoleId and SecretId.")]),e._v(" "),a("p",[e._v("Spring Vault supports various AppRole scenarios (push/pull mode and wrapped).")]),e._v(" "),a("p",[e._v("RoleId and optionally SecretId must be provided by configuration, Spring Vault will not look up these or create a custom SecretId.")]),e._v(" "),a("p",[e._v("Example 12. application.yml with AppRole authentication properties")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: APPROLE\n app-role:\n role-id: bde2076b-cccb-3cf0-d57e-bca7b1e83a52\n")])])]),a("p",[e._v("The following scenarios are supported along the required configuration details:")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[a("strong",[e._v("Method")])]),e._v(" "),a("th",[a("strong",[e._v("RoleId")])]),e._v(" "),a("th",[a("strong",[e._v("SecretId")])]),e._v(" "),a("th",[a("strong",[e._v("RoleName")])]),e._v(" "),a("th",[a("strong",[e._v("Token")])])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("Provided RoleId/SecretId")]),e._v(" "),a("td",[e._v("Provided")]),e._v(" "),a("td",[e._v("Provided")]),e._v(" "),a("td"),e._v(" "),a("td")]),e._v(" "),a("tr",[a("td",[e._v("Provided RoleId without SecretId")]),e._v(" "),a("td",[e._v("Provided")]),e._v(" "),a("td"),e._v(" "),a("td"),e._v(" "),a("td")]),e._v(" "),a("tr",[a("td",[e._v("Provided RoleId, Pull SecretId")]),e._v(" "),a("td",[e._v("Provided")]),e._v(" "),a("td",[e._v("Provided")]),e._v(" "),a("td",[e._v("Provided")]),e._v(" "),a("td",[e._v("Provided")])]),e._v(" "),a("tr",[a("td",[e._v("Pull RoleId, provided SecretId")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Provided")]),e._v(" "),a("td",[e._v("Provided")]),e._v(" "),a("td",[e._v("Provided")])]),e._v(" "),a("tr",[a("td",[e._v("Full Pull Mode")]),e._v(" "),a("td"),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Provided")]),e._v(" "),a("td",[e._v("Provided")])]),e._v(" "),a("tr",[a("td",[e._v("Wrapped")]),e._v(" "),a("td"),e._v(" "),a("td"),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Provided")])]),e._v(" "),a("tr",[a("td",[e._v("Wrapped RoleId, provided SecretId")]),e._v(" "),a("td",[e._v("Provided")]),e._v(" "),a("td"),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Provided")])]),e._v(" "),a("tr",[a("td",[e._v("Provided RoleId, wrapped SecretId")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Provided")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Provided")])])])]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[a("strong",[e._v("RoleId")])]),e._v(" "),a("th",[a("strong",[e._v("SecretId")])]),e._v(" "),a("th",[a("strong",[e._v("Supported")])])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("Provided")]),e._v(" "),a("td",[e._v("Provided")]),e._v(" "),a("td",[e._v("✅")])]),e._v(" "),a("tr",[a("td",[e._v("Provided")]),e._v(" "),a("td",[e._v("Pull")]),e._v(" "),a("td",[e._v("✅")])]),e._v(" "),a("tr",[a("td",[e._v("Provided")]),e._v(" "),a("td",[e._v("Wrapped")]),e._v(" "),a("td",[e._v("✅")])]),e._v(" "),a("tr",[a("td",[e._v("Provided")]),e._v(" "),a("td",[e._v("Absent")]),e._v(" "),a("td",[e._v("✅")])]),e._v(" "),a("tr",[a("td",[e._v("Pull")]),e._v(" "),a("td",[e._v("Provided")]),e._v(" "),a("td",[e._v("✅")])]),e._v(" "),a("tr",[a("td",[e._v("Pull")]),e._v(" "),a("td",[e._v("Pull")]),e._v(" "),a("td",[e._v("✅")])]),e._v(" "),a("tr",[a("td",[e._v("Pull")]),e._v(" "),a("td",[e._v("Wrapped")]),e._v(" "),a("td",[e._v("❌")])]),e._v(" "),a("tr",[a("td",[e._v("Pull")]),e._v(" "),a("td",[e._v("Absent")]),e._v(" "),a("td",[e._v("❌")])]),e._v(" "),a("tr",[a("td",[e._v("Wrapped")]),e._v(" "),a("td",[e._v("Provided")]),e._v(" "),a("td",[e._v("✅")])]),e._v(" "),a("tr",[a("td",[e._v("Wrapped")]),e._v(" "),a("td",[e._v("Pull")]),e._v(" "),a("td",[e._v("❌")])]),e._v(" "),a("tr",[a("td",[e._v("Wrapped")]),e._v(" "),a("td",[e._v("Wrapped")]),e._v(" "),a("td",[e._v("✅")])]),e._v(" "),a("tr",[a("td",[e._v("Wrapped")]),e._v(" "),a("td",[e._v("Absent")]),e._v(" "),a("td",[e._v("❌")])])])]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("You can use still all combinations of push/pull/wrapped modes by providing a configured "),a("code",[e._v("AppRoleAuthentication")]),e._v(" bean within the context."),a("br"),e._v("Spring Cloud Vault cannot derive all possible AppRole combinations from the configuration properties.")])])]),e._v(" "),a("tbody")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("AppRole authentication is limited to simple pull mode using reactive infrastructure."),a("br"),e._v("Full pull mode is not yet supported."),a("br"),e._v("Using Spring Cloud Vault with the Spring WebFlux stack enables Vault’s reactive auto-configuration which can be disabled by setting "),a("code",[e._v("spring.cloud.vault.reactive.enabled=false")]),e._v(".")])])]),e._v(" "),a("tbody")]),e._v(" "),a("p",[e._v("Example 13. application.yml with all AppRole authentication properties")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: APPROLE\n app-role:\n role-id: bde2076b-cccb-3cf0-d57e-bca7b1e83a52\n secret-id: 1696536f-1976-73b1-b241-0b4213908d39\n role: my-role\n app-role-path: approle\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("role-id")]),e._v(" sets the RoleId.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("secret-id")]),e._v(" sets the SecretId.\nSecretId can be omitted if AppRole is configured without requiring SecretId (See "),a("code",[e._v("bind_secret_id")]),e._v(").")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("role")]),e._v(": sets the AppRole name for pull mode.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("app-role-path")]),e._v(" sets the path of the approle authentication mount to use.")])])]),e._v(" "),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/auth/approle.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Using the AppRole auth backend"),a("OutboundLink")],1)]),e._v(" "),a("h3",{attrs:{id:"_5-5-aws-ec2-authentication"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-5-aws-ec2-authentication"}},[e._v("#")]),e._v(" 5.5. AWS-EC2 authentication")]),e._v(" "),a("p",[e._v("The "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/auth/aws-ec2.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("aws-ec2"),a("OutboundLink")],1),e._v("auth backend provides a secure introduction mechanism for AWS EC2 instances, allowing automated retrieval of a Vault token.\nUnlike most Vault authentication backends, this backend does not require first-deploying, or provisioning security-sensitive credentials (tokens, username/password, client certificates, etc.).\nInstead, it treats AWS as a Trusted Third Party and uses the cryptographically signed dynamic metadata information that uniquely represents each EC2 instance.")]),e._v(" "),a("p",[e._v("Example 14. application.yml using AWS-EC2 Authentication")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: AWS_EC2\n")])])]),a("p",[e._v("AWS-EC2 authentication enables nonce by default to follow the Trust On First Use (TOFU) principle.\nAny unintended party that gains access to the PKCS#7 identity metadata can authenticate against Vault.")]),e._v(" "),a("p",[e._v("During the first login, Spring Cloud Vault generates a nonce that is stored in the auth backend aside the instance Id.\nRe-authentication requires the same nonce to be sent.\nAny other party does not have the nonce and can raise an alert in Vault for further investigation.")]),e._v(" "),a("p",[e._v("The nonce is kept in memory and is lost during application restart.\nYou can configure a static nonce with "),a("code",[e._v("spring.cloud.vault.aws-ec2.nonce")]),e._v(".")]),e._v(" "),a("p",[e._v("AWS-EC2 authentication roles are optional and default to the AMI.\nYou can configure the authentication role by setting the"),a("code",[e._v("spring.cloud.vault.aws-ec2.role")]),e._v(" property.")]),e._v(" "),a("p",[e._v("Example 15. application.yml with configured role")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: AWS_EC2\n aws-ec2:\n role: application-server\n")])])]),a("p",[e._v("Example 16. application.yml with all AWS EC2 authentication properties")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: AWS_EC2\n aws-ec2:\n role: application-server\n aws-ec2-path: aws-ec2\n identity-document: http://...\n nonce: my-static-nonce\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("authentication")]),e._v(" setting this value to "),a("code",[e._v("AWS_EC2")]),e._v(" selects the AWS EC2 authentication method")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("role")]),e._v(" sets the name of the role against which the login is being attempted.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("aws-ec2-path")]),e._v(" sets the path of the AWS EC2 mount to use")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("identity-document")]),e._v(" sets URL of the PKCS#7 AWS EC2 identity document")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("nonce")]),e._v(" used for AWS-EC2 authentication.\nAn empty nonce defaults to nonce generation")])])]),e._v(" "),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/auth/aws.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Using the aws auth backend"),a("OutboundLink")],1)]),e._v(" "),a("h3",{attrs:{id:"_5-6-aws-iam-authentication"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-6-aws-iam-authentication"}},[e._v("#")]),e._v(" 5.6. AWS-IAM authentication")]),e._v(" "),a("p",[e._v("The "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/auth/aws-ec2.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("aws"),a("OutboundLink")],1),e._v(" 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.\nUnlike most Vault authentication backends, this backend does not require first-deploying, or provisioning security-sensitive credentials (tokens, username/password, client certificates, etc.).\nInstead, 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.")]),e._v(" "),a("p",[e._v("The current IAM role the application is running in is automatically calculated.\nIf 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.\nIf 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.")]),e._v(" "),a("p",[e._v("When using the AWS-IAM authentication you must create a role in Vault and assign it to your IAM role.\nAn empty "),a("code",[e._v("role")]),e._v(" defaults to the friendly name the current IAM role.")]),e._v(" "),a("p",[e._v("Example 17. application.yml with required AWS-IAM Authentication properties")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: AWS_IAM\n")])])]),a("p",[e._v("Example 18. application.yml with all AWS-IAM Authentication properties")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: AWS_IAM\n aws-iam:\n role: my-dev-role\n aws-path: aws\n server-name: some.server.name\n endpoint-uri: https://sts.eu-central-1.amazonaws.com\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("role")]),e._v(" sets the name of the role against which the login is being attempted.\nThis should be bound to your IAM role.\nIf one is not supplied then the friendly name of the current IAM user will be used as the vault role.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("aws-path")]),e._v(" sets the path of the AWS mount to use")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("server-name")]),e._v(" sets the value to use for the "),a("code",[e._v("X-Vault-AWS-IAM-Server-ID")]),e._v(" header preventing certain types of replay attacks.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("endpoint-uri")]),e._v(" sets the value to use for the AWS STS API used for the "),a("code",[e._v("iam_request_url")]),e._v(" parameter.")])])]),e._v(" "),a("p",[e._v("AWS-IAM requires the AWS Java SDK dependency ("),a("code",[e._v("com.amazonaws:aws-java-sdk-core")]),e._v(") as the authentication implementation uses AWS SDK types for credentials and request signing.")]),e._v(" "),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/auth/aws.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Using the aws auth backend"),a("OutboundLink")],1)]),e._v(" "),a("h3",{attrs:{id:"_5-7-azure-msi-authentication"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-7-azure-msi-authentication"}},[e._v("#")]),e._v(" 5.7. Azure MSI authentication")]),e._v(" "),a("p",[e._v("The "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/auth/azure.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("azure"),a("OutboundLink")],1),e._v("auth backend provides a secure introduction mechanism for Azure VM instances, allowing automated retrieval of a Vault token.\nUnlike most Vault authentication backends, this backend does not require first-deploying, or provisioning security-sensitive credentials (tokens, username/password, client certificates, etc.).\nInstead, 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.")]),e._v(" "),a("p",[e._v("Example 19. application.yml with required Azure Authentication properties")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: AZURE_MSI\n azure-msi:\n role: my-dev-role\n")])])]),a("p",[e._v("Example 20. application.yml with all Azure Authentication properties")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: AZURE_MSI\n azure-msi:\n role: my-dev-role\n azure-path: azure\n metadata-service: http://169.254.169.254/metadata/instance…\n identity-token-service: http://169.254.169.254/metadata/identity…\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("role")]),e._v(" sets the name of the role against which the login is being attempted.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("azure-path")]),e._v(" sets the path of the Azure mount to use")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("metadata-service")]),e._v(" sets the URI at which to access the instance metadata service")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("identity-token-service")]),e._v(" sets the URI at which to access the identity token service")])])]),e._v(" "),a("p",[e._v("Azure MSI authentication obtains environmental details about the virtual machine (subscription Id, resource group, VM name) from the instance metadata service.\nThe Vault server has Resource Id defaults to "),a("code",[e._v("[vault.hashicorp.com](https://vault.hashicorp.com)")]),e._v(".\nTo change this, set "),a("code",[e._v("spring.cloud.vault.azure-msi.identity-token-service")]),e._v(" accordingly.")]),e._v(" "),a("p",[e._v("See also:")]),e._v(" "),a("ul",[a("li",[a("p",[a("a",{attrs:{href:"https://www.vaultproject.io/docs/auth/azure.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Using the azure auth backend"),a("OutboundLink")],1)])]),e._v(" "),a("li",[a("p",[a("a",{attrs:{href:"https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service",target:"_blank",rel:"noopener noreferrer"}},[e._v("Azure Documentation: Azure Instance Metadata Service"),a("OutboundLink")],1)])])]),e._v(" "),a("h3",{attrs:{id:"_5-8-tls-certificate-authentication"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-8-tls-certificate-authentication"}},[e._v("#")]),e._v(" 5.8. TLS certificate authentication")]),e._v(" "),a("p",[e._v("The "),a("code",[e._v("cert")]),e._v(" auth backend allows authentication using SSL/TLS client certificates that are either signed by a CA or self-signed.")]),e._v(" "),a("p",[e._v("To enable "),a("code",[e._v("cert")]),e._v(" authentication you need to:")]),e._v(" "),a("ol",[a("li",[a("p",[e._v("Use SSL, see "),a("a",{attrs:{href:"#vault.config.ssl"}},[e._v("Vault Client SSL configuration")])])]),e._v(" "),a("li",[a("p",[e._v("Configure a Java "),a("code",[e._v("Keystore")]),e._v(" that contains the client certificate and the private key")])]),e._v(" "),a("li",[a("p",[e._v("Set the "),a("code",[e._v("spring.cloud.vault.authentication")]),e._v(" to "),a("code",[e._v("CERT")])])])]),e._v(" "),a("p",[e._v("Example 21. application.yml")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: CERT\n ssl:\n key-store: classpath:keystore.jks\n key-store-password: changeit\n key-store-type: JKS\n cert-auth-path: cert\n")])])]),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/auth/cert.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Using the Cert auth backend"),a("OutboundLink")],1)]),e._v(" "),a("h3",{attrs:{id:"_5-9-cubbyhole-authentication"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-9-cubbyhole-authentication"}},[e._v("#")]),e._v(" 5.9. Cubbyhole authentication")]),e._v(" "),a("p",[e._v("Cubbyhole authentication uses Vault primitives to provide a secured authentication workflow.\nCubbyhole authentication uses tokens as primary login method.\nAn ephemeral token is used to obtain a second, login VaultToken from Vault’s Cubbyhole secret backend.\nThe login token is usually longer-lived and used to interact with Vault.\nThe login token will be retrieved from a wrapped response stored at "),a("code",[e._v("/cubbyhole/response")]),e._v(".")]),e._v(" "),a("p",[a("strong",[e._v("Creating a wrapped token")])]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("Response Wrapping for token creation requires Vault 0.6.0 or higher.")])])]),e._v(" "),a("tbody")]),e._v(" "),a("p",[e._v("Example 22. Creating and storing tokens")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('$ vault token-create -wrap-ttl="10m"\nKey Value\n--- -----\nwrapping_token: 397ccb93-ff6c-b17b-9389-380b01ca2645\nwrapping_token_ttl: 0h10m0s\nwrapping_token_creation_time: 2016-09-18 20:29:48.652957077 +0200 CEST\nwrapped_accessor: 46b6aebb-187f-932a-26d7-4f3d86a68319\n')])])]),a("p",[e._v("Example 23. application.yml")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: CUBBYHOLE\n token: 397ccb93-ff6c-b17b-9389-380b01ca2645\n")])])]),a("p",[e._v("See also:")]),e._v(" "),a("ul",[a("li",[a("p",[a("a",{attrs:{href:"https://www.vaultproject.io/docs/concepts/tokens.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Tokens"),a("OutboundLink")],1)])]),e._v(" "),a("li",[a("p",[a("a",{attrs:{href:"https://www.vaultproject.io/docs/secrets/cubbyhole/index.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Cubbyhole Secret Backend"),a("OutboundLink")],1)])]),e._v(" "),a("li",[a("p",[a("a",{attrs:{href:"https://www.vaultproject.io/docs/concepts/response-wrapping.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Response Wrapping"),a("OutboundLink")],1)])])]),e._v(" "),a("h3",{attrs:{id:"_5-10-gcp-gce-authentication"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-10-gcp-gce-authentication"}},[e._v("#")]),e._v(" 5.10. GCP-GCE authentication")]),e._v(" "),a("p",[e._v("The "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/auth/gcp.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("gcp"),a("OutboundLink")],1),e._v("auth backend allows Vault login by using existing GCP (Google Cloud Platform) IAM and GCE credentials.")]),e._v(" "),a("p",[e._v("GCP GCE (Google Compute Engine) authentication creates a signature in the form of a JSON Web Token (JWT) for a service account.\nA JWT for a Compute Engine instance is obtained from the GCE metadata service using "),a("a",{attrs:{href:"https://cloud.google.com/compute/docs/instances/verifying-instance-identity",target:"_blank",rel:"noopener noreferrer"}},[e._v("Instance identification"),a("OutboundLink")],1),e._v(".\nThis API creates a JSON Web Token that can be used to confirm the instance identity.")]),e._v(" "),a("p",[e._v("Unlike most Vault authentication backends, this backend does not require first-deploying, or provisioning security-sensitive credentials (tokens, username/password, client certificates, etc.).\nInstead, it treats GCP as a Trusted Third Party and uses the cryptographically signed dynamic metadata information that uniquely represents each GCP service account.")]),e._v(" "),a("p",[e._v("Example 24. application.yml with required GCP-GCE Authentication properties")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: GCP_GCE\n gcp-gce:\n role: my-dev-role\n")])])]),a("p",[e._v("Example 25. application.yml with all GCP-GCE Authentication properties")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: GCP_GCE\n gcp-gce:\n gcp-path: gcp\n role: my-dev-role\n service-account: [email protected]\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("role")]),e._v(" sets the name of the role against which the login is being attempted.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("gcp-path")]),e._v(" sets the path of the GCP mount to use")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("service-account")]),e._v(" allows overriding the service account Id to a specific value.\nDefaults to the "),a("code",[e._v("default")]),e._v(" service account.")])])]),e._v(" "),a("p",[e._v("See also:")]),e._v(" "),a("ul",[a("li",[a("p",[a("a",{attrs:{href:"https://www.vaultproject.io/docs/auth/gcp.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Using the GCP auth backend"),a("OutboundLink")],1)])]),e._v(" "),a("li",[a("p",[a("a",{attrs:{href:"https://cloud.google.com/compute/docs/instances/verifying-instance-identity",target:"_blank",rel:"noopener noreferrer"}},[e._v("GCP Documentation: Verifying the Identity of Instances"),a("OutboundLink")],1)])])]),e._v(" "),a("h3",{attrs:{id:"_5-11-gcp-iam-authentication"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-11-gcp-iam-authentication"}},[e._v("#")]),e._v(" 5.11. GCP-IAM authentication")]),e._v(" "),a("p",[e._v("The "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/auth/gcp.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("gcp"),a("OutboundLink")],1),e._v("auth backend allows Vault login by using existing GCP (Google Cloud Platform) IAM and GCE credentials.")]),e._v(" "),a("p",[e._v("GCP IAM authentication creates a signature in the form of a JSON Web Token (JWT) for a service account.\nA JWT for a service account is obtained by calling GCP IAM’s "),a("a",{attrs:{href:"https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/signJwt",target:"_blank",rel:"noopener noreferrer"}},[a("code",[e._v("projects.serviceAccounts.signJwt")]),a("OutboundLink")],1),e._v(" API. The caller authenticates against GCP IAM and proves thereby its identity.\nThis Vault backend treats GCP as a Trusted Third Party.")]),e._v(" "),a("p",[e._v("IAM credentials can be obtained from either the runtime environment , specifically the "),a("a",{attrs:{href:"https://cloud.google.com/docs/authentication/production",target:"_blank",rel:"noopener noreferrer"}},[a("code",[e._v("GOOGLE_APPLICATION_CREDENTIALS")]),a("OutboundLink")],1),e._v("environment variable, the Google Compute metadata service, or supplied externally as e.g. JSON or base64 encoded.\nJSON is the preferred form as it carries the project id and service account identifier required for calling "),a("code",[e._v("projects.serviceAccounts.signJwt")]),e._v(".")]),e._v(" "),a("p",[e._v("Example 26. application.yml with required GCP-IAM Authentication properties")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: GCP_IAM\n gcp-iam:\n role: my-dev-role\n")])])]),a("p",[e._v("Example 27. application.yml with all GCP-IAM Authentication properties")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: GCP_IAM\n gcp-iam:\n credentials:\n location: classpath:credentials.json\n encoded-key: e+KApn0=\n gcp-path: gcp\n jwt-validity: 15m\n project-id: my-project-id\n role: my-dev-role\n service-account-id: [email protected]\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("role")]),e._v(" sets the name of the role against which the login is being attempted.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("credentials.location")]),e._v(" path to the credentials resource that contains Google credentials in JSON format.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("credentials.encoded-key")]),e._v(" the base64 encoded contents of an OAuth2 account private key in the JSON format.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("gcp-path")]),e._v(" sets the path of the GCP mount to use")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("jwt-validity")]),e._v(" configures the JWT token validity.\nDefaults to 15 minutes.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("project-id")]),e._v(" allows overriding the project Id to a specific value.\nDefaults to the project Id from the obtained credential.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("service-account")]),e._v(" allows overriding the service account Id to a specific value.\nDefaults to the service account from the obtained credential.")])])]),e._v(" "),a("p",[e._v("GCP IAM authentication requires the Google Cloud Java SDK dependency ("),a("code",[e._v("com.google.apis:google-api-services-iam")]),e._v(" and "),a("code",[e._v("com.google.auth:google-auth-library-oauth2-http")]),e._v(") as the authentication implementation uses Google APIs for credentials and JWT signing.")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("Google credentials require an OAuth 2 token maintaining the token lifecycle."),a("br"),e._v("All API is synchronous therefore, "),a("code",[e._v("GcpIamAuthentication")]),e._v(" does not support "),a("code",[e._v("AuthenticationSteps")]),e._v(" which is required for reactive usage.")])])]),e._v(" "),a("tbody")]),e._v(" "),a("p",[e._v("See also:")]),e._v(" "),a("ul",[a("li",[a("p",[a("a",{attrs:{href:"https://www.vaultproject.io/docs/auth/gcp.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Using the GCP auth backend"),a("OutboundLink")],1)])]),e._v(" "),a("li",[a("p",[a("a",{attrs:{href:"https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/signJwt",target:"_blank",rel:"noopener noreferrer"}},[e._v("GCP Documentation: projects.serviceAccounts.signJwt"),a("OutboundLink")],1)])])]),e._v(" "),a("h3",{attrs:{id:"_5-12-kubernetes-authentication"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-12-kubernetes-authentication"}},[e._v("#")]),e._v(" 5.12. Kubernetes authentication")]),e._v(" "),a("p",[e._v("Kubernetes authentication mechanism (since Vault 0.8.3) allows to authenticate with Vault using a Kubernetes Service Account Token.\nThe authentication is role based and the role is bound to a service account name and a namespace.")]),e._v(" "),a("p",[e._v("A file containing a JWT token for a pod’s service account is automatically mounted at "),a("code",[e._v("/var/run/secrets/kubernetes.io/serviceaccount/token")]),e._v(".")]),e._v(" "),a("p",[e._v("Example 28. application.yml with all Kubernetes authentication properties")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: KUBERNETES\n kubernetes:\n role: my-dev-role\n kubernetes-path: kubernetes\n service-account-token-file: /var/run/secrets/kubernetes.io/serviceaccount/token\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("role")]),e._v(" sets the Role.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("kubernetes-path")]),e._v(" sets the path of the Kubernetes mount to use.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("service-account-token-file")]),e._v(" sets the location of the file containing the Kubernetes Service Account Token.\nDefaults to "),a("code",[e._v("/var/run/secrets/kubernetes.io/serviceaccount/token")]),e._v(".")])])]),e._v(" "),a("p",[e._v("See also:")]),e._v(" "),a("ul",[a("li",[a("p",[a("a",{attrs:{href:"https://www.vaultproject.io/docs/auth/kubernetes.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Kubernetes"),a("OutboundLink")],1)])]),e._v(" "),a("li",[a("p",[a("a",{attrs:{href:"https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Kubernetes Documentation: Configure Service Accounts for Pods"),a("OutboundLink")],1)])])]),e._v(" "),a("h3",{attrs:{id:"_5-13-pivotal-cloudfoundry-authentication"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-13-pivotal-cloudfoundry-authentication"}},[e._v("#")]),e._v(" 5.13. Pivotal CloudFoundry authentication")]),e._v(" "),a("p",[e._v("The "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/auth/pcf.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("pcf"),a("OutboundLink")],1),e._v("auth backend provides a secure introduction mechanism for applications running within Pivotal’s CloudFoundry instances allowing automated retrieval of a Vault token.\nUnlike most Vault authentication backends, this backend does not require first-deploying, or provisioning security-sensitive credentials (tokens, username/password, client certificates, etc.) as identity provisioning is handled by PCF itself.\nInstead, it treats PCF as a Trusted Third Party and uses the managed instance identity.")]),e._v(" "),a("p",[e._v("Example 29. application.yml with required PCF Authentication properties")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: PCF\n pcf:\n role: my-dev-role\n")])])]),a("p",[e._v("Example 30. application.yml with all PCF Authentication properties")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n authentication: PCF\n pcf:\n role: my-dev-role\n pcf-path: path\n instance-certificate: /etc/cf-instance-credentials/instance.crt\n instance-key: /etc/cf-instance-credentials/instance.key\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("role")]),e._v(" sets the name of the role against which the login is being attempted.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("pcf-path")]),e._v(" sets the path of the PCF mount to use.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("instance-certificate")]),e._v(" sets the path to the PCF instance identity certificate.\nDefaults to "),a("code",[e._v("${CF_INSTANCE_CERT}")]),e._v(" env variable.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("instance-key")]),e._v(" sets the path to the PCF instance identity key.\nDefaults to "),a("code",[e._v("${CF_INSTANCE_KEY}")]),e._v(" env variable.")])])]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("PCF authentication requires BouncyCastle (bcpkix-jdk15on) to be on the classpath for RSA PSS signing.")])])]),e._v(" "),a("tbody")]),e._v(" "),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/auth/pcf.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Using the pcf auth backend"),a("OutboundLink")],1)]),e._v(" "),a("h2",{attrs:{id:"_6-acl-requirements"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_6-acl-requirements"}},[e._v("#")]),e._v(" 6. ACL Requirements")]),e._v(" "),a("p",[e._v("This section explains which paths are accessed by Spring Vault so you can derive your policy declarations from the required capabilities.")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Capability")]),e._v(" "),a("th",[e._v("Associated HTTP verbs")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("create")]),e._v(" "),a("td",[a("code",[e._v("POST")]),e._v("/"),a("code",[e._v("PUT")])])]),e._v(" "),a("tr",[a("td",[e._v("read")]),e._v(" "),a("td",[a("code",[e._v("GET")])])]),e._v(" "),a("tr",[a("td",[e._v("update")]),e._v(" "),a("td",[a("code",[e._v("POST")]),e._v("/"),a("code",[e._v("PUT")])])]),e._v(" "),a("tr",[a("td",[e._v("delete")]),e._v(" "),a("td",[a("code",[e._v("DELETE")])])]),e._v(" "),a("tr",[a("td",[e._v("list")]),e._v(" "),a("td",[a("code",[e._v("LIST")]),e._v(" ("),a("code",[e._v("GET")]),e._v(")")])])])]),e._v(" "),a("p",[e._v("See also "),a("a",{attrs:{href:"https://www.vaultproject.io/guides/identity/policies",target:"_blank",rel:"noopener noreferrer"}},[e._v("www.vaultproject.io/guides/identity/policies"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"_6-1-authentication"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_6-1-authentication"}},[e._v("#")]),e._v(" 6.1. Authentication")]),e._v(" "),a("p",[e._v("Login: "),a("code",[e._v("POST auth/$authMethod/login")])]),e._v(" "),a("h3",{attrs:{id:"_6-2-keyvalue-mount-discovery"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_6-2-keyvalue-mount-discovery"}},[e._v("#")]),e._v(" 6.2. KeyValue Mount Discovery")]),e._v(" "),a("p",[a("code",[e._v("GET sys/internal/ui/mounts/$mountPath")])]),e._v(" "),a("h3",{attrs:{id:"_6-3-secretleasecontainer"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_6-3-secretleasecontainer"}},[e._v("#")]),e._v(" 6.3. SecretLeaseContainer")]),e._v(" "),a("p",[a("code",[e._v("SecretLeaseContainer")]),e._v(" uses different paths depending on the configured lease endpoint.")]),e._v(" "),a("p",[a("code",[e._v("LeaseEndpoints.Legacy")])]),e._v(" "),a("ul",[a("li",[a("p",[e._v("Revocation: "),a("code",[e._v("PUT sys/revoke")])])]),e._v(" "),a("li",[a("p",[e._v("Renewal: "),a("code",[e._v("PUT sys/renew")])])])]),e._v(" "),a("p",[a("code",[e._v("LeaseEndpoints.Leases")]),e._v(" ("),a("code",[e._v("SysLeases")]),e._v(")")]),e._v(" "),a("ul",[a("li",[a("p",[e._v("Revocation: "),a("code",[e._v("PUT sys/leases/revoke")])])]),e._v(" "),a("li",[a("p",[e._v("Renewal: "),a("code",[e._v("PUT sys/leases/renew")])])])]),e._v(" "),a("h3",{attrs:{id:"_6-4-session-management"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_6-4-session-management"}},[e._v("#")]),e._v(" 6.4. Session Management")]),e._v(" "),a("ul",[a("li",[a("p",[e._v("Token lookup: "),a("code",[e._v("GET auth/token/lookup-self")])])]),e._v(" "),a("li",[a("p",[e._v("Renewal: "),a("code",[e._v("POST auth/token/renew-self")])])]),e._v(" "),a("li",[a("p",[e._v("Revoke: "),a("code",[e._v("POST auth/token/revoke-self")])])])]),e._v(" "),a("h2",{attrs:{id:"_7-secret-backends"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_7-secret-backends"}},[e._v("#")]),e._v(" 7. Secret Backends")]),e._v(" "),a("h3",{attrs:{id:"_7-1-key-value-backend"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_7-1-key-value-backend"}},[e._v("#")]),e._v(" 7.1. Key-Value Backend")]),e._v(" "),a("p",[e._v("Spring Cloud Vault supports both Key-Value secret backends, the versioned (v2) and unversioned (v1).\nThe key-value backend allows storage of arbitrary values as key-value store.\nA single context can store one or many key-value tuples.\nContexts can be organized hierarchically.\nSpring Cloud Vault determines itself whether a secret is using versioning and maps the path to its appropriate URL.\nSpring Cloud Vault allows using the Application name, and a default context name ("),a("code",[e._v("application")]),e._v(") in combination with active profiles.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("/secret/{application}/{profile}\n/secret/{application}\n/secret/{default-context}/{profile}\n/secret/{default-context}\n")])])]),a("p",[e._v("The application name is determined by the properties:")]),e._v(" "),a("ul",[a("li",[a("p",[a("code",[e._v("spring.cloud.vault.kv.application-name")])])]),e._v(" "),a("li",[a("p",[a("code",[e._v("spring.cloud.vault.application-name")])])]),e._v(" "),a("li",[a("p",[a("code",[e._v("spring.application.name")])])])]),e._v(" "),a("p",[e._v("The profiles are determined by the properties:")]),e._v(" "),a("ul",[a("li",[a("p",[a("code",[e._v("spring.cloud.vault.kv.profiles")])])]),e._v(" "),a("li",[a("p",[a("code",[e._v("spring.profiles.active")])])])]),e._v(" "),a("p",[e._v("Secrets can be obtained from other contexts within the key-value backend by adding their paths to the application name, separated by commas.\nFor example, given the application name "),a("code",[e._v("usefulapp,mysql1,projectx/aws")]),e._v(", each of these folders will be used:")]),e._v(" "),a("ul",[a("li",[a("p",[a("code",[e._v("/secret/usefulapp")])])]),e._v(" "),a("li",[a("p",[a("code",[e._v("/secret/mysql1")])])]),e._v(" "),a("li",[a("p",[a("code",[e._v("/secret/projectx/aws")])])])]),e._v(" "),a("p",[e._v("Spring Cloud Vault adds all active profiles to the list of possible context paths.\nNo active profiles will skip accessing contexts with a profile name.")]),e._v(" "),a("p",[e._v("Properties are exposed like they are stored (i.e. without additional prefixes).")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("Spring Cloud Vault adds the "),a("code",[e._v("data/")]),e._v(" context between the mount path and the actual context path depending on whether the mount uses the versioned key-value backend.")])])]),e._v(" "),a("tbody")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n kv:\n enabled: true\n backend: secret\n profile-separator: '/'\n default-context: application\n application-name: my-app\n profiles: local, cloud\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("enabled")]),e._v(" setting this value to "),a("code",[e._v("false")]),e._v(" disables the secret backend config usage")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("backend")]),e._v(" sets the path of the secret mount to use")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("default-context")]),e._v(" sets the context name used by all applications")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("application-name")]),e._v(" overrides the application name for use in the key-value backend")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("profiles")]),e._v(" overrides the active profiles for use in the key-value backend")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("profile-separator")]),e._v(" separates the profile name from the context in property sources with profiles")])])]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("The key-value secret backend can be operated in versioned (v2) and non-versioned (v1) modes.")])])]),e._v(" "),a("tbody")]),e._v(" "),a("p",[e._v("See also:")]),e._v(" "),a("ul",[a("li",[a("p",[a("a",{attrs:{href:"https://www.vaultproject.io/docs/secrets/kv/kv-v1.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Using the KV Secrets Engine - Version 1 (generic secret backend)"),a("OutboundLink")],1)])]),e._v(" "),a("li",[a("p",[a("a",{attrs:{href:"https://www.vaultproject.io/docs/secrets/kv/kv-v2.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Using the KV Secrets Engine - Version 2 (versioned key-value backend)"),a("OutboundLink")],1)])])]),e._v(" "),a("h3",{attrs:{id:"_7-2-consul"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_7-2-consul"}},[e._v("#")]),e._v(" 7.2. Consul")]),e._v(" "),a("p",[e._v("Spring Cloud Vault can obtain credentials for HashiCorp Consul.\nThe Consul integration requires the "),a("code",[e._v("spring-cloud-vault-config-consul")]),e._v("dependency.")]),e._v(" "),a("p",[e._v("Example 31. pom.xml")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("\n \n org.springframework.cloud\n spring-cloud-vault-config-consul\n 3.1.0\n \n\n")])])]),a("p",[e._v("The integration can be enabled by setting"),a("code",[e._v("spring.cloud.vault.consul.enabled=true")]),e._v(" (default "),a("code",[e._v("false")]),e._v(") and providing the role name with "),a("code",[e._v("spring.cloud.vault.consul.role=…")]),e._v(".")]),e._v(" "),a("p",[e._v("The obtained token is stored in "),a("code",[e._v("spring.cloud.consul.token")]),e._v("so using Spring Cloud Consul can pick up the generated credentials without further configuration.\nYou can configure the property name by setting "),a("code",[e._v("spring.cloud.vault.consul.token-property")]),e._v(".")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n consul:\n enabled: true\n role: readonly\n backend: consul\n token-property: spring.cloud.consul.token\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("enabled")]),e._v(" setting this value to "),a("code",[e._v("true")]),e._v(" enables the Consul backend config usage")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("role")]),e._v(" sets the role name of the Consul role definition")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("backend")]),e._v(" sets the path of the Consul mount to use")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("token-property")]),e._v(" sets the property name in which the Consul ACL token is stored")])])]),e._v(" "),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/secrets/consul/index.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Setting up Consul with Vault"),a("OutboundLink")],1)]),e._v(" "),a("h3",{attrs:{id:"_7-3-rabbitmq"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_7-3-rabbitmq"}},[e._v("#")]),e._v(" 7.3. RabbitMQ")]),e._v(" "),a("p",[e._v("Spring Cloud Vault can obtain credentials for RabbitMQ.")]),e._v(" "),a("p",[e._v("The RabbitMQ integration requires the "),a("code",[e._v("spring-cloud-vault-config-rabbitmq")]),e._v("dependency.")]),e._v(" "),a("p",[e._v("Example 32. pom.xml")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("\n \n org.springframework.cloud\n spring-cloud-vault-config-rabbitmq\n 3.1.0\n \n\n")])])]),a("p",[e._v("The integration can be enabled by setting"),a("code",[e._v("spring.cloud.vault.rabbitmq.enabled=true")]),e._v(" (default "),a("code",[e._v("false")]),e._v(") and providing the role name with "),a("code",[e._v("spring.cloud.vault.rabbitmq.role=…")]),e._v(".")]),e._v(" "),a("p",[e._v("Username and password are stored in "),a("code",[e._v("spring.rabbitmq.username")]),e._v("and "),a("code",[e._v("spring.rabbitmq.password")]),e._v(" so using Spring Boot will pick up the generated credentials without further configuration.\nYou can configure the property names by setting "),a("code",[e._v("spring.cloud.vault.rabbitmq.username-property")]),e._v(" and"),a("code",[e._v("spring.cloud.vault.rabbitmq.password-property")]),e._v(".")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n rabbitmq:\n enabled: true\n role: readonly\n backend: rabbitmq\n username-property: spring.rabbitmq.username\n password-property: spring.rabbitmq.password\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("enabled")]),e._v(" setting this value to "),a("code",[e._v("true")]),e._v(" enables the RabbitMQ backend config usage")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("role")]),e._v(" sets the role name of the RabbitMQ role definition")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("backend")]),e._v(" sets the path of the RabbitMQ mount to use")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("username-property")]),e._v(" sets the property name in which the RabbitMQ username is stored")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("password-property")]),e._v(" sets the property name in which the RabbitMQ password is stored")])])]),e._v(" "),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/secrets/rabbitmq/index.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Setting up RabbitMQ with Vault"),a("OutboundLink")],1)]),e._v(" "),a("h3",{attrs:{id:"_7-4-aws"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_7-4-aws"}},[e._v("#")]),e._v(" 7.4. AWS")]),e._v(" "),a("p",[e._v("Spring Cloud Vault can obtain credentials for AWS.")]),e._v(" "),a("p",[e._v("The AWS integration requires the "),a("code",[e._v("spring-cloud-vault-config-aws")]),e._v("dependency.")]),e._v(" "),a("p",[e._v("Example 33. pom.xml")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("\n \n org.springframework.cloud\n spring-cloud-vault-config-aws\n 3.1.0\n \n\n")])])]),a("p",[e._v("The integration can be enabled by setting"),a("code",[e._v("spring.cloud.vault.aws=true")]),e._v(" (default "),a("code",[e._v("false")]),e._v(") and providing the role name with "),a("code",[e._v("spring.cloud.vault.aws.role=…")]),e._v(".")]),e._v(" "),a("p",[e._v("Supported AWS credential Types:")]),e._v(" "),a("ul",[a("li",[a("p",[e._v("iam_user (Defaults)")])]),e._v(" "),a("li",[a("p",[e._v("assumed_role (STS)")])]),e._v(" "),a("li",[a("p",[e._v("federation_token (STS)")])])]),e._v(" "),a("p",[e._v("The access key and secret key are stored in "),a("code",[e._v("cloud.aws.credentials.accessKey")]),e._v("and "),a("code",[e._v("cloud.aws.credentials.secretKey")]),e._v(". So using Spring Cloud AWS will pick up the generated credentials without further configuration.")]),e._v(" "),a("p",[e._v("You can configure the property names by setting "),a("code",[e._v("spring.cloud.vault.aws.access-key-property")]),e._v(" and"),a("code",[e._v("spring.cloud.vault.aws.secret-key-property")]),e._v(".")]),e._v(" "),a("p",[e._v("For STS security token, you can configure the property name by setting "),a("code",[e._v("spring.cloud.vault.aws.session-token-key-property")]),e._v(". The security token is stored under "),a("code",[e._v("cloud.aws.credentials.sessionToken")]),e._v(" (defaults).")]),e._v(" "),a("p",[e._v("Example: iam_user")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n aws:\n enabled: true\n role: readonly\n backend: aws\n access-key-property: cloud.aws.credentials.accessKey\n secret-key-property: cloud.aws.credentials.secretKey\n")])])]),a("p",[e._v("Example: assumed_role (STS)")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n aws:\n enabled: true\n role: sts-vault-role\n backend: aws\n credential-type: assumed_role\n access-key-property: cloud.aws.credentials.accessKey\n secret-key-property: cloud.aws.credentials.secretKey\n session-token-key-property: cloud.aws.credentials.sessionToken\n ttl: 3600s\n role-arn: arn:aws:iam::${AWS_ACCOUNT}:role/sts-app-role\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("enabled")]),e._v(" setting this value to "),a("code",[e._v("true")]),e._v(" enables the AWS backend config usage")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("role")]),e._v(" sets the role name of the AWS role definition")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("backend")]),e._v(" sets the path of the AWS mount to use")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("access-key-property")]),e._v(" sets the property name in which the AWS access key is stored")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("secret-key-property")]),e._v(" sets the property name in which the AWS secret key is stored")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("session-token-key-property")]),e._v(" sets the property name in which the AWS STS security token is stored.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("credential-type")]),e._v(" sets the aws credential type to use for this backend. Defaults to "),a("code",[e._v("iam_user")])])]),e._v(" "),a("li",[a("p",[a("code",[e._v("ttl")]),e._v(" sets the ttl for the STS token when using "),a("code",[e._v("assumed_role")]),e._v(" or "),a("code",[e._v("federation_token")]),e._v(". Defaults to the ttl specified by the vault role. Min/Max values are also limited to what AWS would support for STS.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("role-arn")]),e._v(" sets the IAM role to assume if more than one are configured for the vault role when using "),a("code",[e._v("assumed_role")]),e._v(".")])])]),e._v(" "),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/secrets/aws/index.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Setting up AWS with Vault"),a("OutboundLink")],1)]),e._v(" "),a("h2",{attrs:{id:"_8-database-backends"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_8-database-backends"}},[e._v("#")]),e._v(" 8. Database backends")]),e._v(" "),a("p",[e._v("Vault supports several database secret backends to generate database credentials dynamically based on configured roles.\nThis 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.")]),e._v(" "),a("p",[e._v("Spring Cloud Vault integrates with these backends:")]),e._v(" "),a("ul",[a("li",[a("p",[a("a",{attrs:{href:"#vault.config.backends.database"}},[e._v("Database")])])]),e._v(" "),a("li",[a("p",[a("a",{attrs:{href:"#vault.config.backends.cassandra"}},[e._v("Apache Cassandra")])])]),e._v(" "),a("li",[a("p",[a("a",{attrs:{href:"#vault.config.backends.couchbase"}},[e._v("Couchbase Database")])])]),e._v(" "),a("li",[a("p",[a("a",{attrs:{href:"#vault.config.backends.elasticsearch"}},[e._v("Elasticsearch")])])]),e._v(" "),a("li",[a("p",[a("a",{attrs:{href:"#vault.config.backends.mongodb"}},[e._v("MongoDB")])])]),e._v(" "),a("li",[a("p",[a("a",{attrs:{href:"#vault.config.backends.mysql"}},[e._v("MySQL")])])]),e._v(" "),a("li",[a("p",[a("a",{attrs:{href:"#vault.config.backends.postgresql"}},[e._v("PostgreSQL")])])])]),e._v(" "),a("p",[e._v("Using a database secret backend requires to enable the backend in the configuration and the "),a("code",[e._v("spring-cloud-vault-config-databases")]),e._v("dependency.")]),e._v(" "),a("p",[e._v("Vault ships since 0.7.1 with a dedicated "),a("code",[e._v("database")]),e._v(" secret backend that allows database integration via plugins.\nYou can use that specific backend by using the generic database backend.\nMake sure to specify the appropriate backend path, e.g. "),a("code",[e._v("spring.cloud.vault.mysql.role.backend=database")]),e._v(".")]),e._v(" "),a("p",[e._v("Example 34. pom.xml")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("\n \n org.springframework.cloud\n spring-cloud-vault-config-databases\n 3.1.0\n \n\n")])])]),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("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.")])])]),e._v(" "),a("tbody")]),e._v(" "),a("h3",{attrs:{id:"_8-1-database"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_8-1-database"}},[e._v("#")]),e._v(" 8.1. Database")]),e._v(" "),a("p",[e._v("Spring Cloud Vault can obtain credentials for any database listed at"),a("a",{attrs:{href:"https://www.vaultproject.io/api/secret/databases/index.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("www.vaultproject.io/api/secret/databases/index.html"),a("OutboundLink")],1),e._v(".\nThe integration can be enabled by setting"),a("code",[e._v("spring.cloud.vault.database.enabled=true")]),e._v(" (default "),a("code",[e._v("false")]),e._v(") and providing the role name with "),a("code",[e._v("spring.cloud.vault.database.role=…")]),e._v(".")]),e._v(" "),a("p",[e._v("While the database backend is a generic one, "),a("code",[e._v("spring.cloud.vault.database")]),e._v("specifically targets JDBC databases.\nUsername and password are available from "),a("code",[e._v("spring.datasource.username")]),e._v(" and "),a("code",[e._v("spring.datasource.password")]),e._v(" properties\nso using Spring Boot will pick up the generated credentials for your "),a("code",[e._v("DataSource")]),e._v(" without further configuration.\nYou can configure the property names by setting"),a("code",[e._v("spring.cloud.vault.database.username-property")]),e._v(" and"),a("code",[e._v("spring.cloud.vault.database.password-property")]),e._v(".")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n database:\n enabled: true\n role: readonly\n backend: database\n username-property: spring.datasource.username\n password-property: spring.datasource.password\n")])])]),a("h3",{attrs:{id:"_8-2-multiple-databases"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_8-2-multiple-databases"}},[e._v("#")]),e._v(" 8.2. Multiple Databases")]),e._v(" "),a("p",[e._v("Sometimes, credentials for a single database isn’t sufficient because an application might connect to two or more databases of the same kind.\nBeginning with version 3.0.5, Spring Vault supports the configuration of multiple database secret backends under the "),a("code",[e._v("spring.cloud.vault.databases.*")]),e._v(" namespace.")]),e._v(" "),a("p",[e._v("The configuration accepts multiple database backends to materialize credentials into the specified properties. Make sure to configure "),a("code",[e._v("username-property")]),e._v(" and "),a("code",[e._v("password-property")]),e._v(" appropriately.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n databases:\n primary:\n enabled: true\n role: readwrite\n backend: database\n username-property: spring.primary-datasource.username\n password-property: spring.primary-datasource.password\n other-database:\n enabled: true\n role: readonly\n backend: database\n username-property: spring.secondary-datasource.username\n password-property: spring.secondary-datasource.password\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("")]),e._v(" descriptive name of the database configuration.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v(".enabled")]),e._v(" setting this value to "),a("code",[e._v("true")]),e._v(" enables the Database backend config usage")])]),e._v(" "),a("li",[a("p",[a("code",[e._v(".role")]),e._v(" sets the role name of the Database role definition")])]),e._v(" "),a("li",[a("p",[a("code",[e._v(".backend")]),e._v(" sets the path of the Database mount to use")])]),e._v(" "),a("li",[a("p",[a("code",[e._v(".username-property")]),e._v(" sets the property name in which the Database username is stored. Make sure to use unique property names to avoid property shadowing.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v(".password-property")]),e._v(" sets the property name in which the Database password is stored Make sure to use unique property names to avoid property shadowing.")])])]),e._v(" "),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/secrets/databases/index.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Database Secrets backend"),a("OutboundLink")],1)]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("Spring Cloud Vault does not support getting new credentials and configuring your "),a("code",[e._v("DataSource")]),e._v(" with them when the maximum lease time has been reached."),a("br"),e._v("That is, if "),a("code",[e._v("max_ttl")]),e._v(" of the Database role in Vault is set to "),a("code",[e._v("24h")]),e._v(" that means that 24 hours after your application has started it can no longer authenticate with the database.")])])]),e._v(" "),a("tbody")]),e._v(" "),a("h3",{attrs:{id:"_8-3-apache-cassandra"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_8-3-apache-cassandra"}},[e._v("#")]),e._v(" 8.3. Apache Cassandra")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("The "),a("code",[e._v("cassandra")]),e._v(" backend has been deprecated in Vault 0.7.1 and it is recommended to use the "),a("code",[e._v("database")]),e._v(" backend and mount it as "),a("code",[e._v("cassandra")]),e._v(".")])])]),e._v(" "),a("tbody")]),e._v(" "),a("p",[e._v("Spring Cloud Vault can obtain credentials for Apache Cassandra.\nThe integration can be enabled by setting"),a("code",[e._v("spring.cloud.vault.cassandra.enabled=true")]),e._v(" (default "),a("code",[e._v("false")]),e._v(") and providing the role name with "),a("code",[e._v("spring.cloud.vault.cassandra.role=…")]),e._v(".")]),e._v(" "),a("p",[e._v("Username and password are available from "),a("code",[e._v("spring.data.cassandra.username")]),e._v("and "),a("code",[e._v("spring.data.cassandra.password")]),e._v(" properties so using Spring Boot will pick up the generated credentials without further configuration.\nYou can configure the property names by setting"),a("code",[e._v("spring.cloud.vault.cassandra.username-property")]),e._v(" and"),a("code",[e._v("spring.cloud.vault.cassandra.password-property")]),e._v(".")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n cassandra:\n enabled: true\n role: readonly\n backend: cassandra\n username-property: spring.data.cassandra.username\n password-property: spring.data.cassandra.password\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("enabled")]),e._v(" setting this value to "),a("code",[e._v("true")]),e._v(" enables the Cassandra backend config usage")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("role")]),e._v(" sets the role name of the Cassandra role definition")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("backend")]),e._v(" sets the path of the Cassandra mount to use")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("username-property")]),e._v(" sets the property name in which the Cassandra username is stored")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("password-property")]),e._v(" sets the property name in which the Cassandra password is stored")])])]),e._v(" "),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/secrets/cassandra/index.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Setting up Apache Cassandra with Vault"),a("OutboundLink")],1)]),e._v(" "),a("h3",{attrs:{id:"_8-4-couchbase-database"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_8-4-couchbase-database"}},[e._v("#")]),e._v(" 8.4. Couchbase Database")]),e._v(" "),a("p",[e._v("Spring Cloud Vault can obtain credentials for Couchbase.\nThe integration can be enabled by setting"),a("code",[e._v("spring.cloud.vault.couchbase.enabled=true")]),e._v(" (default "),a("code",[e._v("false")]),e._v(") and providing the role name with "),a("code",[e._v("spring.cloud.vault.couchbase.role=…")]),e._v(".")]),e._v(" "),a("p",[e._v("Username and password are available from "),a("code",[e._v("spring.couchbase.username")]),e._v("and "),a("code",[e._v("spring.couchbase.password")]),e._v(" properties so using Spring Boot will pick up the generated credentials without further configuration.\nYou can configure the property names by setting"),a("code",[e._v("spring.cloud.vault.couchbase.username-property")]),e._v(" and"),a("code",[e._v("spring.cloud.vault.couchbase.password-property")]),e._v(".")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n couchbase:\n enabled: true\n role: readonly\n backend: database\n username-property: spring.couchbase.username\n password-property: spring.couchbase.password\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("enabled")]),e._v(" setting this value to "),a("code",[e._v("true")]),e._v(" enables the Couchbase backend config usage")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("role")]),e._v(" sets the role name of the Couchbase role definition")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("backend")]),e._v(" sets the path of the Couchbase mount to use")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("username-property")]),e._v(" sets the property name in which the Couchbase username is stored")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("password-property")]),e._v(" sets the property name in which the Couchbase password is stored")])])]),e._v(" "),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://github.com/hashicorp/vault-plugin-database-couchbase",target:"_blank",rel:"noopener noreferrer"}},[e._v("Couchbase Database Plugin Documentation"),a("OutboundLink")],1)]),e._v(" "),a("h3",{attrs:{id:"_8-5-elasticsearch"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_8-5-elasticsearch"}},[e._v("#")]),e._v(" 8.5. Elasticsearch")]),e._v(" "),a("p",[e._v("Spring Cloud Vault can obtain since version 3.0 credentials for Elasticsearch.\nThe integration can be enabled by setting"),a("code",[e._v("spring.cloud.vault.elasticsearch.enabled=true")]),e._v(" (default "),a("code",[e._v("false")]),e._v(") and providing the role name with "),a("code",[e._v("spring.cloud.vault.elasticsearch.role=…")]),e._v(".")]),e._v(" "),a("p",[e._v("Username and password are available from "),a("code",[e._v("spring.elasticsearch.rest.username")]),e._v("and "),a("code",[e._v("spring.elasticsearch.rest.password")]),e._v(" properties so using Spring Boot will pick up the generated credentials without further configuration.\nYou can configure the property names by setting"),a("code",[e._v("spring.cloud.vault.elasticsearch.username-property")]),e._v(" and"),a("code",[e._v("spring.cloud.vault.elasticsearch.password-property")]),e._v(".")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n elasticsearch:\n enabled: true\n role: readonly\n backend: mongodb\n username-property: spring.elasticsearch.rest.username\n password-property: spring.elasticsearch.rest.password\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("enabled")]),e._v(" setting this value to "),a("code",[e._v("true")]),e._v(" enables the Elasticsearch database backend config usage")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("role")]),e._v(" sets the role name of the Elasticsearch role definition")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("backend")]),e._v(" sets the path of the Elasticsearch mount to use")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("username-property")]),e._v(" sets the property name in which the Elasticsearch username is stored")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("password-property")]),e._v(" sets the property name in which the Elasticsearch password is stored")])])]),e._v(" "),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/secrets/databases/elasticdb",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Setting up Elasticsearch with Vault"),a("OutboundLink")],1)]),e._v(" "),a("h3",{attrs:{id:"_8-6-mongodb"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_8-6-mongodb"}},[e._v("#")]),e._v(" 8.6. MongoDB")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("The "),a("code",[e._v("mongodb")]),e._v(" backend has been deprecated in Vault 0.7.1 and it is recommended to use the "),a("code",[e._v("database")]),e._v(" backend and mount it as "),a("code",[e._v("mongodb")]),e._v(".")])])]),e._v(" "),a("tbody")]),e._v(" "),a("p",[e._v("Spring Cloud Vault can obtain credentials for MongoDB.\nThe integration can be enabled by setting"),a("code",[e._v("spring.cloud.vault.mongodb.enabled=true")]),e._v(" (default "),a("code",[e._v("false")]),e._v(") and providing the role name with "),a("code",[e._v("spring.cloud.vault.mongodb.role=…")]),e._v(".")]),e._v(" "),a("p",[e._v("Username and password are stored in "),a("code",[e._v("spring.data.mongodb.username")]),e._v("and "),a("code",[e._v("spring.data.mongodb.password")]),e._v(" so using Spring Boot will pick up the generated credentials without further configuration.\nYou can configure the property names by setting"),a("code",[e._v("spring.cloud.vault.mongodb.username-property")]),e._v(" and"),a("code",[e._v("spring.cloud.vault.mongodb.password-property")]),e._v(".")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n mongodb:\n enabled: true\n role: readonly\n backend: mongodb\n username-property: spring.data.mongodb.username\n password-property: spring.data.mongodb.password\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("enabled")]),e._v(" setting this value to "),a("code",[e._v("true")]),e._v(" enables the MongodB backend config usage")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("role")]),e._v(" sets the role name of the MongoDB role definition")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("backend")]),e._v(" sets the path of the MongoDB mount to use")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("username-property")]),e._v(" sets the property name in which the MongoDB username is stored")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("password-property")]),e._v(" sets the property name in which the MongoDB password is stored")])])]),e._v(" "),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/secrets/mongodb/index.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Setting up MongoDB with Vault"),a("OutboundLink")],1)]),e._v(" "),a("h3",{attrs:{id:"_8-7-mysql"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_8-7-mysql"}},[e._v("#")]),e._v(" 8.7. MySQL")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("The "),a("code",[e._v("mysql")]),e._v(" backend has been deprecated in Vault 0.7.1 and it is recommended to use the "),a("code",[e._v("database")]),e._v(" backend and mount it as "),a("code",[e._v("mysql")]),e._v("."),a("br"),e._v("Configuration for "),a("code",[e._v("spring.cloud.vault.mysql")]),e._v(" will be removed in a future version.")])])]),e._v(" "),a("tbody")]),e._v(" "),a("p",[e._v("Spring Cloud Vault can obtain credentials for MySQL.\nThe integration can be enabled by setting"),a("code",[e._v("spring.cloud.vault.mysql.enabled=true")]),e._v(" (default "),a("code",[e._v("false")]),e._v(") and providing the role name with "),a("code",[e._v("spring.cloud.vault.mysql.role=…")]),e._v(".")]),e._v(" "),a("p",[e._v("Username and password are available from "),a("code",[e._v("spring.datasource.username")]),e._v("and "),a("code",[e._v("spring.datasource.password")]),e._v(" properties so using Spring Boot will pick up the generated credentials without further configuration.\nYou can configure the property names by setting"),a("code",[e._v("spring.cloud.vault.mysql.username-property")]),e._v(" and"),a("code",[e._v("spring.cloud.vault.mysql.password-property")]),e._v(".")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n mysql:\n enabled: true\n role: readonly\n backend: mysql\n username-property: spring.datasource.username\n password-property: spring.datasource.password\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("enabled")]),e._v(" setting this value to "),a("code",[e._v("true")]),e._v(" enables the MySQL backend config usage")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("role")]),e._v(" sets the role name of the MySQL role definition")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("backend")]),e._v(" sets the path of the MySQL mount to use")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("username-property")]),e._v(" sets the property name in which the MySQL username is stored")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("password-property")]),e._v(" sets the property name in which the MySQL password is stored")])])]),e._v(" "),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/secrets/mysql/index.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Setting up MySQL with Vault"),a("OutboundLink")],1)]),e._v(" "),a("h3",{attrs:{id:"_8-8-postgresql"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_8-8-postgresql"}},[e._v("#")]),e._v(" 8.8. PostgreSQL")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("The "),a("code",[e._v("postgresql")]),e._v(" backend has been deprecated in Vault 0.7.1 and it is recommended to use the "),a("code",[e._v("database")]),e._v(" backend and mount it as "),a("code",[e._v("postgresql")]),e._v("."),a("br"),e._v("Configuration for "),a("code",[e._v("spring.cloud.vault.postgresql")]),e._v(" will be removed in a future version.")])])]),e._v(" "),a("tbody")]),e._v(" "),a("p",[e._v("Spring Cloud Vault can obtain credentials for PostgreSQL.\nThe integration can be enabled by setting"),a("code",[e._v("spring.cloud.vault.postgresql.enabled=true")]),e._v(" (default "),a("code",[e._v("false")]),e._v(") and providing the role name with "),a("code",[e._v("spring.cloud.vault.postgresql.role=…")]),e._v(".")]),e._v(" "),a("p",[e._v("Username and password are available from "),a("code",[e._v("spring.datasource.username")]),e._v("and "),a("code",[e._v("spring.datasource.password")]),e._v(" properties so using Spring Boot will pick up the generated credentials without further configuration.\nYou can configure the property names by setting"),a("code",[e._v("spring.cloud.vault.postgresql.username-property")]),e._v(" and"),a("code",[e._v("spring.cloud.vault.postgresql.password-property")]),e._v(".")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n postgresql:\n enabled: true\n role: readonly\n backend: postgresql\n username-property: spring.datasource.username\n password-property: spring.datasource.password\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("enabled")]),e._v(" setting this value to "),a("code",[e._v("true")]),e._v(" enables the PostgreSQL backend config usage")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("role")]),e._v(" sets the role name of the PostgreSQL role definition")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("backend")]),e._v(" sets the path of the PostgreSQL mount to use")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("username-property")]),e._v(" sets the property name in which the PostgreSQL username is stored")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("password-property")]),e._v(" sets the property name in which the PostgreSQL password is stored")])])]),e._v(" "),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/secrets/postgresql/index.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Setting up PostgreSQL with Vault"),a("OutboundLink")],1)]),e._v(" "),a("h2",{attrs:{id:"_9-customize-which-secret-backends-to-expose-as-propertysource"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_9-customize-which-secret-backends-to-expose-as-propertysource"}},[e._v("#")]),e._v(" 9. Customize which secret backends to expose as PropertySource")]),e._v(" "),a("p",[e._v("Spring Cloud Vault uses property-based configuration to create "),a("code",[e._v("PropertySource")]),e._v("s for key-value and discovered secret backends.")]),e._v(" "),a("p",[e._v("Discovered backends provide "),a("code",[e._v("VaultSecretBackendDescriptor")]),e._v(" beans to describe the configuration state to use secret backend as "),a("code",[e._v("PropertySource")]),e._v(".\nA "),a("code",[e._v("SecretBackendMetadataFactory")]),e._v(" is required to create a "),a("code",[e._v("SecretBackendMetadata")]),e._v(" object which contains path, name and property transformation configuration.")]),e._v(" "),a("p",[a("code",[e._v("SecretBackendMetadata")]),e._v(" is used to back a particular "),a("code",[e._v("PropertySource")]),e._v(".")]),e._v(" "),a("p",[e._v("You can register a "),a("code",[e._v("VaultConfigurer")]),e._v(" for customization.\nDefault key-value and discovered backend registration is disabled if you provide a "),a("code",[e._v("VaultConfigurer")]),e._v(".\nYou can however enable default registration with"),a("code",[e._v("SecretBackendConfigurer.registerDefaultKeyValueSecretBackends()")]),e._v(" and "),a("code",[e._v("SecretBackendConfigurer.registerDefaultDiscoveredSecretBackends()")]),e._v(".")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('public class CustomizationBean implements VaultConfigurer {\n\n @Override\n public void addSecretBackends(SecretBackendConfigurer configurer) {\n\n configurer.add("secret/my-application");\n\n configurer.registerDefaultKeyValueSecretBackends(false);\n configurer.registerDefaultDiscoveredSecretBackends(true);\n }\n}\n')])])]),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("SpringApplication application = new SpringApplication(MyApplication.class);\napplication.addBootstrapper(VaultBootstrapper.fromConfigurer(new CustomizationBean()));\n")])])]),a("h2",{attrs:{id:"_10-custom-secret-backend-implementations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_10-custom-secret-backend-implementations"}},[e._v("#")]),e._v(" 10. Custom Secret Backend Implementations")]),e._v(" "),a("p",[e._v("Spring Cloud Vault ships with secret backend support for the most common backend integrations.\nYou can integrate with any kind of backend by providing an implementation that describes how to obtain data from the backend you want to use and how to surface data provided by that backend by providing a "),a("code",[e._v("PropertyTransformer")]),e._v(".")]),e._v(" "),a("p",[e._v("Adding a custom implementation for a backend requires implementation of two interfaces:")]),e._v(" "),a("ul",[a("li",[a("p",[a("code",[e._v("org.springframework.cloud.vault.config.VaultSecretBackendDescriptor")])])]),e._v(" "),a("li",[a("p",[a("code",[e._v("org.springframework.cloud.vault.config.SecretBackendMetadataFactory")])])])]),e._v(" "),a("p",[a("code",[e._v("VaultSecretBackendDescriptor")]),e._v(" is typically an object that holds configuration data, such as "),a("code",[e._v("VaultDatabaseProperties")]),e._v(". Spring Cloud Vault requires that your type is annotated with "),a("code",[e._v("@ConfigurationProperties")]),e._v(" to materialize the class from the configuration.")]),e._v(" "),a("p",[a("code",[e._v("SecretBackendMetadataFactory")]),e._v(" accepts "),a("code",[e._v("VaultSecretBackendDescriptor")]),e._v(" to create the actual "),a("code",[e._v("SecretBackendMetadata")]),e._v(" object which holds the context path within your Vault server, any path variables required to resolve parametrized context paths and "),a("code",[e._v("PropertyTransformer")]),e._v(".")]),e._v(" "),a("p",[e._v("Both, "),a("code",[e._v("VaultSecretBackendDescriptor")]),e._v(" and "),a("code",[e._v("SecretBackendMetadataFactory")]),e._v(" types must be registered in "),a("code",[e._v("spring.factories")]),e._v(" which is an extension mechanism provided by Spring, similar to Java’s ServiceLoader.")]),e._v(" "),a("h2",{attrs:{id:"_11-service-registry-configuration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_11-service-registry-configuration"}},[e._v("#")]),e._v(" 11. Service Registry Configuration")]),e._v(" "),a("p",[e._v("You can use a "),a("code",[e._v("DiscoveryClient")]),e._v(" (such as from Spring Cloud Consul) to locate a Vault server by setting spring.cloud.vault.discovery.enabled=true (default "),a("code",[e._v("false")]),e._v(").\nThe net result of that is that your apps need a application.yml (or an environment variable) with the appropriate discovery configuration.\nThe benefit is that the Vault can change its co-ordinates, as long as the discovery service is a fixed point.\nThe default service id is "),a("code",[e._v("vault")]),e._v(" but you can change that on the client with"),a("code",[e._v("spring.cloud.vault.discovery.serviceId")]),e._v(".")]),e._v(" "),a("p",[e._v("The discovery client implementations all support some kind of metadata map (e.g. for Eureka we have eureka.instance.metadataMap).\nSome additional properties of the service may need to be configured in its service registration metadata so that clients can connect correctly.\nService registries that do not provide details about transport layer security need to provide a "),a("code",[e._v("scheme")]),e._v(" metadata entry to be set either to "),a("code",[e._v("https")]),e._v(" or "),a("code",[e._v("http")]),e._v(".\nIf no scheme is configured and the service is not exposed as secure service, then configuration defaults to "),a("code",[e._v("spring.cloud.vault.scheme")]),e._v(" which is "),a("code",[e._v("https")]),e._v(" when it’s not set.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault.discovery:\n enabled: true\n service-id: my-vault-service\n")])])]),a("h2",{attrs:{id:"_12-vault-client-fail-fast"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_12-vault-client-fail-fast"}},[e._v("#")]),e._v(" 12. Vault Client Fail Fast")]),e._v(" "),a("p",[e._v("In some cases, it may be desirable to fail startup of a service if it cannot connect to the Vault Server.\nIf this is the desired behavior, set the bootstrap configuration property"),a("code",[e._v("spring.cloud.vault.fail-fast=true")]),e._v(" and the client will halt with an Exception.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n fail-fast: true\n")])])]),a("h2",{attrs:{id:"_13-vault-enterprise-namespace-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_13-vault-enterprise-namespace-support"}},[e._v("#")]),e._v(" 13. Vault Enterprise Namespace Support")]),e._v(" "),a("p",[e._v("Vault Enterprise allows using namespaces to isolate multiple Vaults on a single Vault server.\nConfiguring a namespace by setting"),a("code",[e._v("spring.cloud.vault.namespace=…")]),e._v(" enables the namespace header"),a("code",[e._v("X-Vault-Namespace")]),e._v(" on every outgoing HTTP request when using the Vault"),a("code",[e._v("RestTemplate")]),e._v(" or "),a("code",[e._v("WebClient")]),e._v(".")]),e._v(" "),a("p",[e._v("Please note that this feature is not supported by Vault Community edition and has no effect on Vault operations.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n namespace: my-namespace\n")])])]),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/enterprise/namespaces/index.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Enterprise: Namespaces"),a("OutboundLink")],1)]),e._v(" "),a("h2",{attrs:{id:"_14-vault-client-ssl-configuration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_14-vault-client-ssl-configuration"}},[e._v("#")]),e._v(" 14. Vault Client SSL configuration")]),e._v(" "),a("p",[e._v("SSL can be configured declaratively by setting various properties.\nYou can set either "),a("code",[e._v("javax.net.ssl.trustStore")]),e._v(" to configure JVM-wide SSL settings or "),a("code",[e._v("spring.cloud.vault.ssl.trust-store")]),e._v("to set SSL settings only for Spring Cloud Vault Config.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n ssl:\n trust-store: classpath:keystore.jks\n trust-store-password: changeit\n trust-store-type: JKS\n enabled-protocols: TLSv1.2,TLSv1.3\n enabled-cipher-suites: TLS_AES_128_GCM_SHA256\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("trust-store")]),e._v(" sets the resource for the trust-store.\nSSL-secured Vault communication will validate the Vault SSL certificate with the specified trust-store.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("trust-store-password")]),e._v(" sets the trust-store password")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("trust-store-type")]),e._v(" sets the trust-store type. Supported values are all supported "),a("code",[e._v("KeyStore")]),e._v(" types including "),a("code",[e._v("PEM")]),e._v(".")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("enabled-protocols")]),e._v(" sets the list of enabled SSL/TLS protocols (since 3.0.2).")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("enabled-cipher-suites")]),e._v(" sets the list of enabled SSL/TLS cipher suites (since 3.0.2).")])])]),e._v(" "),a("p",[e._v("Please note that configuring "),a("code",[e._v("spring.cloud.vault.ssl.*")]),e._v(" can be only applied when either Apache Http Components or the OkHttp client is on your class-path.")]),e._v(" "),a("h2",{attrs:{id:"_15-lease-lifecycle-management-renewal-and-revocation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_15-lease-lifecycle-management-renewal-and-revocation"}},[e._v("#")]),e._v(" 15. Lease lifecycle management (renewal and revocation)")]),e._v(" "),a("p",[e._v("With every secret, Vault creates a lease:\nmetadata containing information such as a time duration, renewability, and more.")]),e._v(" "),a("p",[e._v("Vault promises that the data will be valid for the given duration, or Time To Live (TTL).\nOnce the lease is expired, Vault can revoke the data, and the consumer of the secret can no longer be certain that it is valid.")]),e._v(" "),a("p",[e._v("Spring Cloud Vault maintains a lease lifecycle beyond the creation of login tokens and secrets.\nThat said, login tokens and secrets associated with a lease are scheduled for renewal just before the lease expires until terminal expiry.\nApplication shutdown revokes obtained login tokens and renewable leases.")]),e._v(" "),a("p",[e._v("Secret service and database backends (such as MongoDB or MySQL) usually generate a renewable lease so generated credentials will be disabled on application shutdown.")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("Static tokens are not renewed or revoked.")])])]),e._v(" "),a("tbody")]),e._v(" "),a("p",[e._v("Lease renewal and revocation is enabled by default and can be disabled by setting "),a("code",[e._v("spring.cloud.vault.config.lifecycle.enabled")]),e._v("to "),a("code",[e._v("false")]),e._v(".\nThis 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.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n config.lifecycle:\n enabled: true\n min-renewal: 10s\n expiry-threshold: 1m\n lease-endpoints: Legacy\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("enabled")]),e._v(" controls whether leases associated with secrets are considered to be renewed and expired secrets are rotated.\nEnabled by default.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("min-renewal")]),e._v(" sets the duration that is at least required before renewing a lease.\nThis setting prevents renewals from happening too often.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("expiry-threshold")]),e._v(" sets the expiry threshold.\nA lease is renewed the configured period of time before it expires.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("lease-endpoints")]),e._v(" sets the endpoints for renew and revoke.\nLegacy for vault versions before 0.8 and SysLeases for later.")])])]),e._v(" "),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/docs/concepts/lease.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Lease, Renew, and Revoke"),a("OutboundLink")],1)]),e._v(" "),a("h2",{attrs:{id:"_16-session-token-lifecycle-management-renewal-re-login-and-revocation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_16-session-token-lifecycle-management-renewal-re-login-and-revocation"}},[e._v("#")]),e._v(" 16. Session token lifecycle management (renewal, re-login and revocation)")]),e._v(" "),a("p",[e._v("A Vault session token (also referred to as "),a("code",[e._v("LoginToken")]),e._v(") is quite similar to a lease as it has a TTL, max TTL, and may expire.\nOnce a login token expires, it cannot be used anymore to interact with Vault.\nTherefore, Spring Vault ships with a "),a("code",[e._v("SessionManager")]),e._v(" API for imperative and reactive use.")]),e._v(" "),a("p",[e._v("Spring Cloud Vault maintains the session token lifecycle by default.\nSession tokens are obtained lazily so the actual login is deferred until the first session-bound use of Vault.\nOnce Spring Cloud Vault obtains a session token, it retains it until expiry.\nThe next time a session-bound activity is used, Spring Cloud Vault re-logins into Vault and obtains a new session token.\nOn application shut down, Spring Cloud Vault revokes the token if it was still active to terminate the session.")]),e._v(" "),a("p",[e._v("Session lifecycle is enabled by default and can be disabled by setting "),a("code",[e._v("spring.cloud.vault.session.lifecycle.enabled")]),e._v("to "),a("code",[e._v("false")]),e._v(".\nDisabling is not recommended as session tokens can expire and Spring Cloud Vault cannot longer access Vault.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("spring.cloud.vault:\n session.lifecycle:\n enabled: true\n refresh-before-expiry: 10s\n expiry-threshold: 20s\n")])])]),a("ul",[a("li",[a("p",[a("code",[e._v("enabled")]),e._v(" controls whether session lifecycle management is enabled to renew session tokens.\nEnabled by default.")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("refresh-before-expiry")]),e._v(" controls the point in time when the session token gets renewed.\nThe refresh time is calculated by subtracting "),a("code",[e._v("refresh-before-expiry")]),e._v(" from the token expiry time.\nDefaults to "),a("code",[e._v("5 seconds")]),e._v(".")])]),e._v(" "),a("li",[a("p",[a("code",[e._v("expiry-threshold")]),e._v(" sets the expiry threshold.\nThe threshold represents a minimum TTL duration to consider a session token as valid.\nTokens with a shorter TTL are considered expired and are not used anymore.\nShould be greater than "),a("code",[e._v("refresh-before-expiry")]),e._v(" to prevent token expiry.\nDefaults to "),a("code",[e._v("7 seconds")]),e._v(".")])])]),e._v(" "),a("p",[e._v("See also: "),a("a",{attrs:{href:"https://www.vaultproject.io/api-docs/auth/token#renew-a-token-self",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vault Documentation: Token Renewal"),a("OutboundLink")],1)]),e._v(" "),a("h2",{attrs:{id:"appendix-a-common-application-properties"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#appendix-a-common-application-properties"}},[e._v("#")]),e._v(" Appendix A: Common application properties")]),e._v(" "),a("p",[e._v("Various properties can be specified inside your "),a("code",[e._v("application.properties")]),e._v(" file, inside your "),a("code",[e._v("application.yml")]),e._v(" file, or as command line switches.\nThis appendix provides a list of common Spring Cloud Vault properties and references to the underlying classes that consume them.")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th"),e._v(" "),a("th",[e._v("Property contributions can come from additional jar files on your classpath, so you should not consider this an exhaustive list."),a("br"),e._v("Also, you can define your own properties.")])])]),e._v(" "),a("tbody")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Name")]),e._v(" "),a("th",[e._v("Default")]),e._v(" "),a("th",[e._v("Description")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("spring.cloud.vault.app-id.app-id-path")]),e._v(" "),a("td",[a("code",[e._v("app-id")])]),e._v(" "),a("td",[e._v("Mount path of the AppId authentication backend.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.app-id.network-interface")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v('Network interface hint for the "MAC_ADDRESS" UserId mechanism.')])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.app-id.user-id")]),e._v(" "),a("td",[a("code",[e._v("MAC_ADDRESS")])]),e._v(" "),a("td",[e._v('UserId mechanism. Can be either "MAC_ADDRESS", "IP_ADDRESS", a string or a class name.')])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.app-role.app-role-path")]),e._v(" "),a("td",[a("code",[e._v("approle")])]),e._v(" "),a("td",[e._v("Mount path of the AppRole authentication backend.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.app-role.role")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Name of the role, optional, used for pull-mode.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.app-role.role-id")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("The RoleId.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.app-role.secret-id")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("The SecretId.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.application-name")]),e._v(" "),a("td",[a("code",[e._v("application")])]),e._v(" "),a("td",[e._v("Application name for AppId authentication.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.authentication")]),e._v(" "),a("td"),e._v(" "),a("td")]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.aws-ec2.aws-ec2-path")]),e._v(" "),a("td",[a("code",[e._v("aws-ec2")])]),e._v(" "),a("td",[e._v("Mount path of the AWS-EC2 authentication backend.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.aws-ec2.identity-document")]),e._v(" "),a("td",[a("code",[e._v("[169.254.169.254/latest/dynamic/instance-identity/pkcs7](http://169.254.169.254/latest/dynamic/instance-identity/pkcs7)")])]),e._v(" "),a("td",[e._v("URL of the AWS-EC2 PKCS7 identity document.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.aws-ec2.nonce")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Nonce used for AWS-EC2 authentication. An empty nonce defaults to nonce generation.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.aws-ec2.role")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Name of the role, optional.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.aws-iam.aws-path")]),e._v(" "),a("td",[a("code",[e._v("aws")])]),e._v(" "),a("td",[e._v("Mount path of the AWS authentication backend.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.aws-iam.endpoint-uri")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("STS server URI. @since 2.2")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.aws-iam.role")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Name of the role, optional. Defaults to the friendly IAM name if not set.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.aws-iam.server-name")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Name of the server used to set {@code X-Vault-AWS-IAM-Server-ID} header in the headers of login requests.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.aws.access-key-property")]),e._v(" "),a("td",[a("code",[e._v("cloud.aws.credentials.accessKey")])]),e._v(" "),a("td",[e._v("Target property for the obtained access key.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.aws.backend")]),e._v(" "),a("td",[a("code",[e._v("aws")])]),e._v(" "),a("td",[e._v("aws backend path.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.aws.credential-type")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("aws credential type")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.aws.enabled")]),e._v(" "),a("td",[a("code",[e._v("false")])]),e._v(" "),a("td",[e._v("Enable aws backend usage.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.aws.role")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Role name for credentials.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.aws.role-arn")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Role arn for assumed_role in case we have multiple roles associated with the vault role. @since 3.0.2")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.aws.secret-key-property")]),e._v(" "),a("td",[a("code",[e._v("cloud.aws.credentials.secretKey")])]),e._v(" "),a("td",[e._v("Target property for the obtained secret key.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.aws.session-token-key-property")]),e._v(" "),a("td",[a("code",[e._v("cloud.aws.credentials.sessionToken")])]),e._v(" "),a("td",[e._v("Target property for the obtained secret key.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.aws.ttl")]),e._v(" "),a("td",[a("code",[e._v("0")])]),e._v(" "),a("td",[e._v("TTL for sts tokens. Defaults to whatever the vault Role may have for Max. Also limited to what AWS supports to be the max for STS. @since 3.0.2")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.azure-msi.azure-path")]),e._v(" "),a("td",[a("code",[e._v("azure")])]),e._v(" "),a("td",[e._v("Mount path of the Azure MSI authentication backend.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.azure-msi.identity-token-service")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Identity token service URI. @since 3.0")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.azure-msi.metadata-service")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Instance metadata service URI. @since 3.0")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.azure-msi.role")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Name of the role.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.cassandra.backend")]),e._v(" "),a("td",[a("code",[e._v("cassandra")])]),e._v(" "),a("td",[e._v("Cassandra backend path.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.cassandra.enabled")]),e._v(" "),a("td",[a("code",[e._v("false")])]),e._v(" "),a("td",[e._v("Enable cassandra backend usage.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.cassandra.password-property")]),e._v(" "),a("td",[a("code",[e._v("spring.data.cassandra.password")])]),e._v(" "),a("td",[e._v("Target property for the obtained password.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.cassandra.role")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Role name for credentials.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.cassandra.static-role")]),e._v(" "),a("td",[a("code",[e._v("false")])]),e._v(" "),a("td",[e._v("Enable static role usage. @since 2.2")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.cassandra.username-property")]),e._v(" "),a("td",[a("code",[e._v("spring.data.cassandra.username")])]),e._v(" "),a("td",[e._v("Target property for the obtained username.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.config.lifecycle.enabled")]),e._v(" "),a("td",[a("code",[e._v("true")])]),e._v(" "),a("td",[e._v("Enable lifecycle management.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.config.lifecycle.expiry-threshold")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("The expiry threshold. {@link Lease} is renewed the given {@link Duration} before it expires. @since 2.2")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.config.lifecycle.lease-endpoints")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Set the {@link LeaseEndpoints} to delegate renewal/revocation calls to. {@link LeaseEndpoints} encapsulates differences between Vault versions that affect the location of renewal/revocation endpoints. Can be {@link LeaseEndpoints#SysLeases} for version 0.8 or above of Vault or {@link LeaseEndpoints#Legacy} for older versions (the default). @since 2.2")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.config.lifecycle.min-renewal")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("The time period that is at least required before renewing a lease. @since 2.2")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.config.order")]),e._v(" "),a("td",[a("code",[e._v("0")])]),e._v(" "),a("td",[e._v("Used to set a {@link org.springframework.core.env.PropertySource} priority. This is useful to use Vault as an override on other property sources. @see org.springframework.core.PriorityOrdered")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.connection-timeout")]),e._v(" "),a("td",[a("code",[e._v("5000")])]),e._v(" "),a("td",[e._v("Connection timeout.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.consul.backend")]),e._v(" "),a("td",[a("code",[e._v("consul")])]),e._v(" "),a("td",[e._v("Consul backend path.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.consul.enabled")]),e._v(" "),a("td",[a("code",[e._v("false")])]),e._v(" "),a("td",[e._v("Enable consul backend usage.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.consul.role")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Role name for credentials.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.consul.token-property")]),e._v(" "),a("td",[a("code",[e._v("spring.cloud.consul.token")])]),e._v(" "),a("td",[e._v("Target property for the obtained token.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.couchbase.backend")]),e._v(" "),a("td",[a("code",[e._v("database")])]),e._v(" "),a("td",[e._v("Couchbase backend path.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.couchbase.enabled")]),e._v(" "),a("td",[a("code",[e._v("false")])]),e._v(" "),a("td",[e._v("Enable couchbase backend usage.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.couchbase.password-property")]),e._v(" "),a("td",[a("code",[e._v("spring.couchbase.password")])]),e._v(" "),a("td",[e._v("Target property for the obtained password.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.couchbase.role")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Role name for credentials.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.couchbase.static-role")]),e._v(" "),a("td",[a("code",[e._v("false")])]),e._v(" "),a("td",[e._v("Enable static role usage.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.couchbase.username-property")]),e._v(" "),a("td",[a("code",[e._v("spring.couchbase.username")])]),e._v(" "),a("td",[e._v("Target property for the obtained username.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.database.backend")]),e._v(" "),a("td",[a("code",[e._v("database")])]),e._v(" "),a("td",[e._v("Database backend path.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.database.enabled")]),e._v(" "),a("td",[a("code",[e._v("false")])]),e._v(" "),a("td",[e._v("Enable database backend usage.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.database.password-property")]),e._v(" "),a("td",[a("code",[e._v("spring.datasource.password")])]),e._v(" "),a("td",[e._v("Target property for the obtained password.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.database.role")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Role name for credentials.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.database.static-role")]),e._v(" "),a("td",[a("code",[e._v("false")])]),e._v(" "),a("td",[e._v("Enable static role usage.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.database.username-property")]),e._v(" "),a("td",[a("code",[e._v("spring.datasource.username")])]),e._v(" "),a("td",[e._v("Target property for the obtained username.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.databases")]),e._v(" "),a("td"),e._v(" "),a("td")]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.discovery.enabled")]),e._v(" "),a("td",[a("code",[e._v("false")])]),e._v(" "),a("td",[e._v("Flag to indicate that Vault server discovery is enabled (vault server URL will be looked up via discovery).")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.discovery.service-id")]),e._v(" "),a("td",[a("code",[e._v("vault")])]),e._v(" "),a("td",[e._v("Service id to locate Vault.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.elasticsearch.backend")]),e._v(" "),a("td",[a("code",[e._v("database")])]),e._v(" "),a("td",[e._v("Database backend path.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.elasticsearch.enabled")]),e._v(" "),a("td",[a("code",[e._v("false")])]),e._v(" "),a("td",[e._v("Enable elasticsearch backend usage.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.elasticsearch.password-property")]),e._v(" "),a("td",[a("code",[e._v("spring.elasticsearch.rest.password")])]),e._v(" "),a("td",[e._v("Target property for the obtained password.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.elasticsearch.role")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Role name for credentials.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.elasticsearch.static-role")]),e._v(" "),a("td",[a("code",[e._v("false")])]),e._v(" "),a("td",[e._v("Enable static role usage.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.elasticsearch.username-property")]),e._v(" "),a("td",[a("code",[e._v("spring.elasticsearch.rest.username")])]),e._v(" "),a("td",[e._v("Target property for the obtained username.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.enabled")]),e._v(" "),a("td",[a("code",[e._v("true")])]),e._v(" "),a("td",[e._v("Enable Vault config server.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.fail-fast")]),e._v(" "),a("td",[a("code",[e._v("false")])]),e._v(" "),a("td",[e._v("Fail fast if data cannot be obtained from Vault.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.gcp-gce.gcp-path")]),e._v(" "),a("td",[a("code",[e._v("gcp")])]),e._v(" "),a("td",[e._v("Mount path of the Kubernetes authentication backend.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.gcp-gce.role")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Name of the role against which the login is being attempted.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.gcp-gce.service-account")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Optional service account id. Using the default id if left unconfigured.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.gcp-iam.credentials.encoded-key")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("The base64 encoded contents of an OAuth2 account private key in JSON format.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.gcp-iam.credentials.location")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Location of the OAuth2 credentials private key.

Since this is a Resource, the private key can be in a multitude of locations, such as a local file system, classpath, URL, etc.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.gcp-iam.gcp-path")]),e._v(" "),a("td",[a("code",[e._v("gcp")])]),e._v(" "),a("td",[e._v("Mount path of the Kubernetes authentication backend.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.gcp-iam.jwt-validity")]),e._v(" "),a("td",[a("code",[e._v("15m")])]),e._v(" "),a("td",[e._v("Validity of the JWT token.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.gcp-iam.project-id")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Overrides the GCP project Id.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.gcp-iam.role")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Name of the role against which the login is being attempted.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.gcp-iam.service-account-id")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Overrides the GCP service account Id.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.host")]),e._v(" "),a("td",[a("code",[e._v("localhost")])]),e._v(" "),a("td",[e._v("Vault server host.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.kubernetes.kubernetes-path")]),e._v(" "),a("td",[a("code",[e._v("kubernetes")])]),e._v(" "),a("td",[e._v("Mount path of the Kubernetes authentication backend.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.kubernetes.role")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Name of the role against which the login is being attempted.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.kubernetes.service-account-token-file")]),e._v(" "),a("td",[a("code",[e._v("/var/run/secrets/kubernetes.io/serviceaccount/token")])]),e._v(" "),a("td",[e._v("Path to the service account token file.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.kv.application-name")]),e._v(" "),a("td",[a("code",[e._v("application")])]),e._v(" "),a("td",[e._v("Application name to be used for the context.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.kv.backend")]),e._v(" "),a("td",[a("code",[e._v("secret")])]),e._v(" "),a("td",[e._v("Name of the default backend.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.kv.backend-version")]),e._v(" "),a("td",[a("code",[e._v("2")])]),e._v(" "),a("td",[e._v("Key-Value backend version. Currently supported versions are:

  • Version 1 (unversioned key-value backend).
  • Version 2 (versioned key-value backend).
")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.kv.default-context")]),e._v(" "),a("td",[a("code",[e._v("application")])]),e._v(" "),a("td",[e._v("Name of the default context.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.kv.enabled")]),e._v(" "),a("td",[a("code",[e._v("true")])]),e._v(" "),a("td",[e._v("Enable the kev-value backend.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.kv.profile-separator")]),e._v(" "),a("td",[a("code",[e._v("/")])]),e._v(" "),a("td",[e._v("Profile-separator to combine application name and profile.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.kv.profiles")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("List of active profiles. @since 3.0")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.mongodb.backend")]),e._v(" "),a("td",[a("code",[e._v("mongodb")])]),e._v(" "),a("td",[e._v("MongoDB backend path.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.mongodb.enabled")]),e._v(" "),a("td",[a("code",[e._v("false")])]),e._v(" "),a("td",[e._v("Enable mongodb backend usage.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.mongodb.password-property")]),e._v(" "),a("td",[a("code",[e._v("spring.data.mongodb.password")])]),e._v(" "),a("td",[e._v("Target property for the obtained password.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.mongodb.role")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Role name for credentials.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.mongodb.static-role")]),e._v(" "),a("td",[a("code",[e._v("false")])]),e._v(" "),a("td",[e._v("Enable static role usage. @since 2.2")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.mongodb.username-property")]),e._v(" "),a("td",[a("code",[e._v("spring.data.mongodb.username")])]),e._v(" "),a("td",[e._v("Target property for the obtained username.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.mysql.backend")]),e._v(" "),a("td",[a("code",[e._v("mysql")])]),e._v(" "),a("td",[e._v("mysql backend path.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.mysql.enabled")]),e._v(" "),a("td",[a("code",[e._v("false")])]),e._v(" "),a("td",[e._v("Enable mysql backend usage.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.mysql.password-property")]),e._v(" "),a("td",[a("code",[e._v("spring.datasource.password")])]),e._v(" "),a("td",[e._v("Target property for the obtained username.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.mysql.role")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Role name for credentials.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.mysql.username-property")]),e._v(" "),a("td",[a("code",[e._v("spring.datasource.username")])]),e._v(" "),a("td",[e._v("Target property for the obtained username.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.namespace")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Vault namespace (requires Vault Enterprise).")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.pcf.instance-certificate")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Path to the instance certificate (PEM). Defaults to {@code CF_INSTANCE_CERT} env variable.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.pcf.instance-key")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Path to the instance key (PEM). Defaults to {@code CF_INSTANCE_KEY} env variable.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.pcf.pcf-path")]),e._v(" "),a("td",[a("code",[e._v("pcf")])]),e._v(" "),a("td",[e._v("Mount path of the Kubernetes authentication backend.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.pcf.role")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Name of the role against which the login is being attempted.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.port")]),e._v(" "),a("td",[a("code",[e._v("8200")])]),e._v(" "),a("td",[e._v("Vault server port.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.postgresql.backend")]),e._v(" "),a("td",[a("code",[e._v("postgresql")])]),e._v(" "),a("td",[e._v("postgresql backend path.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.postgresql.enabled")]),e._v(" "),a("td",[a("code",[e._v("false")])]),e._v(" "),a("td",[e._v("Enable postgresql backend usage.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.postgresql.password-property")]),e._v(" "),a("td",[a("code",[e._v("spring.datasource.password")])]),e._v(" "),a("td",[e._v("Target property for the obtained username.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.postgresql.role")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Role name for credentials.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.postgresql.username-property")]),e._v(" "),a("td",[a("code",[e._v("spring.datasource.username")])]),e._v(" "),a("td",[e._v("Target property for the obtained username.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.rabbitmq.backend")]),e._v(" "),a("td",[a("code",[e._v("rabbitmq")])]),e._v(" "),a("td",[e._v("rabbitmq backend path.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.rabbitmq.enabled")]),e._v(" "),a("td",[a("code",[e._v("false")])]),e._v(" "),a("td",[e._v("Enable rabbitmq backend usage.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.rabbitmq.password-property")]),e._v(" "),a("td",[a("code",[e._v("spring.rabbitmq.password")])]),e._v(" "),a("td",[e._v("Target property for the obtained password.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.rabbitmq.role")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Role name for credentials.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.rabbitmq.username-property")]),e._v(" "),a("td",[a("code",[e._v("spring.rabbitmq.username")])]),e._v(" "),a("td",[e._v("Target property for the obtained username.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.reactive.enabled")]),e._v(" "),a("td",[a("code",[e._v("true")])]),e._v(" "),a("td",[e._v("Flag to indicate that reactive discovery is enabled")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.read-timeout")]),e._v(" "),a("td",[a("code",[e._v("15000")])]),e._v(" "),a("td",[e._v("Read timeout.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.scheme")]),e._v(" "),a("td",[a("code",[e._v("https")])]),e._v(" "),a("td",[e._v('Protocol scheme. Can be either "http" or "https".')])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.session.lifecycle.enabled")]),e._v(" "),a("td",[a("code",[e._v("true")])]),e._v(" "),a("td",[e._v("Enable session lifecycle management.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.session.lifecycle.expiry-threshold")]),e._v(" "),a("td",[a("code",[e._v("7s")])]),e._v(" "),a("td",[e._v("The expiry threshold for a {@link LoginToken}. The threshold represents a minimum TTL duration to consider a login token as valid. Tokens with a shorter TTL are considered expired and are not used anymore. Should be greater than {@code refreshBeforeExpiry} to prevent token expiry.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.session.lifecycle.refresh-before-expiry")]),e._v(" "),a("td",[a("code",[e._v("5s")])]),e._v(" "),a("td",[e._v("The time period that is at least required before renewing the {@link LoginToken}.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.ssl.cert-auth-path")]),e._v(" "),a("td",[a("code",[e._v("cert")])]),e._v(" "),a("td",[e._v("Mount path of the TLS cert authentication backend.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.ssl.enabled-cipher-suites")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("List of enabled SSL/TLS cipher suites. @since 3.0.2")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.ssl.enabled-protocols")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("List of enabled SSL/TLS protocol. @since 3.0.2")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.ssl.key-store")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Trust store that holds certificates and private keys.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.ssl.key-store-password")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Password used to access the key store.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.ssl.key-store-type")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Type of the key store. @since 3.0")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.ssl.trust-store")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Trust store that holds SSL certificates.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.ssl.trust-store-password")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Password used to access the trust store.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.ssl.trust-store-type")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Type of the trust store. @since 3.0")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.token")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Static vault token. Required if {@link #authentication} is {@code TOKEN}.")])]),e._v(" "),a("tr",[a("td",[e._v("spring.cloud.vault.uri")]),e._v(" "),a("td"),e._v(" "),a("td",[e._v("Vault URI. Can be set with scheme, host and port.")])])])])])}),[],!1,null,null,null);t.default=o.exports}}]);