Skip to content

Latest commit

 

History

History
56 lines (46 loc) · 1.79 KB

File metadata and controls

56 lines (46 loc) · 1.79 KB

embedded-vault

Maven dependency

pom.xml
<dependency>
    <groupId>com.playtika.testcontainers</groupId>
    <artifactId>embedded-vault</artifactId>
    <scope>test</scope>
</dependency>

Consumes (via bootstrap.properties)

  • embedded.vault.enabled (true|false, default is true)

  • embedded.vault.reuseContainer (true|false, default is false)

  • embedded.vault.dockerImage (default is 'vault:1.13.2')

  • embedded.vault.host (default is 'localhost')

  • embedded.vault.port (int, default is 8200)

  • embedded.vault.token (default is '00000000-0000-0000-0000-000000000000')

  • embedded.vault.path (default is 'secret/application')

  • embedded.vault.secrets (Map, default is empty)

  • embedded.vault.cas-enabled (true|false, default is false, enables Check and Set operations for mount)

  • embedded.vault.cas-enabled-for-sub-paths (enables cas for specified, example: sub-paths sub-path1, sub-path2)

  • embedded.toxiproxy.proxies.vault.enabled Enables both creation of the container with ToxiProxy TCP proxy and a proxy to the embedded-vault container.

Produces

  • embedded.vault.host

  • embedded.vault.port (mapped HTTP port)

  • embedded.vault.token

  • embedded.vault.toxiproxy.host

  • embedded.vault.toxiproxy.port

  • embedded.vault.networkAlias

  • embedded.vault.internalPort

  • Bean ToxiproxyContainer.ContainerProxy vaultContainerProxy

Example

To auto-configure spring-cloud-vault-config use these properties in your test application.yaml:

/src/test/resources/application.yaml
spring.cloud.vault:
  scheme: http
  host: ${embedded.vault.host}
  port: ${embedded.vault.port}
  token: ${embedded.vault.token}
  kv:
    enabled: true