Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mp911de/spring-cloud-vault-config-samples
Examples for Spring Vault and Spring Cloud Vault Config
https://github.com/mp911de/spring-cloud-vault-config-samples
samples spring spring-cloud-vault spring-vault vault
Last synced: 7 days ago
JSON representation
Examples for Spring Vault and Spring Cloud Vault Config
- Host: GitHub
- URL: https://github.com/mp911de/spring-cloud-vault-config-samples
- Owner: mp911de
- Created: 2016-04-27T14:15:05.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2023-02-15T14:25:59.000Z (over 1 year ago)
- Last Synced: 2024-10-23T08:55:03.439Z (16 days ago)
- Topics: samples, spring, spring-cloud-vault, spring-vault, vault
- Language: Java
- Homepage: https://github.com/spring-cloud/spring-cloud-vault-config
- Size: 428 KB
- Stars: 95
- Watchers: 6
- Forks: 66
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Spring Vault Examples
============================This repository contains examples using [Spring Vault](https://github.com/spring-projects/spring-vault) and [Spring Cloud Vault](https://github.com/spring-cloud-incubator/spring-cloud-vault-config).
## Setup
Open a console in the examples root directory and execute
the following commands to setup Vault:```bash
$ src/test/bash/create_certificates.sh # Create SSL certificates
$ src/test/bash/install_vault.sh # Download and unzip vault
$ src/test/bash/local_run_vault.sh &
```Vault is now running in dev-mode listening on
https://localhost:8200 and http://localhost:8201.Vault requires some configuration before you can run the examples.
```bash
$ source src/test/bash/env.sh
$ src/test/bash/setup_examples.sh
```The root token is set to `00000000-0000-0000-0000-000000000000`
and Vault is running in dev mode.You can use Vault now from the console or run the examples. Check
out the example-specific readme's for further instructions/requirements.Vault runs with SSL enabled so make sure the application runs
in the current directory so it can find `work/keystore.jks`.## Using Vault from the Command Line
You can use a shortcut to setup the token and Vault CLI environment by sourcing
`vault/env.sh````bash
$ source src/test/bash/env.sh # Set Vault address, Token and CA path
```## Write Data to Vault
Writes the key-value pair `mykey=value` to the path `secret/my-spring-boot-app`.
```
$ ./vault write secret/my-spring-boot-app mykey=value
```