-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8675fd6
commit cbe553b
Showing
25 changed files
with
163 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Azure Devops | ||
|
||
Azure Devops Example for reading Secrets from Vault using `vkv`: | ||
|
||
```yaml | ||
resources: | ||
containers: | ||
- container: ghcr.io/falcosuessgott/vkv:latest | ||
image: vkv | ||
env: | ||
VAULT_ADDR: https://vault.server.de | ||
|
||
VKV_MODE: server | ||
VKV_SERVER_PATH: secrets | ||
VKV_LOGIN_COMMAND: | | ||
vault login -token-only -method=userpass username=admin password="${VAULT_PASSWORD}" | ||
ports: | ||
- 8080:8080 | ||
|
||
pool: | ||
vmImage: 'ubuntu-latest' | ||
|
||
services: | ||
vkv: vkv | ||
|
||
steps: | ||
- script: | | ||
eval $(curl http://vkv:8080) | ||
echo $secret | ||
displayName: Read secrets as env vars using vkv | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Github Action | ||
|
||
Github Action Example for reading Secrets from Vault using `vkv`: | ||
|
||
```yaml | ||
name: Vault Secrets using vkv | ||
on: push | ||
|
||
jobs: | ||
job_name: | ||
runs-on: ubuntu-latest | ||
services: | ||
vkv: | ||
image: ghcr.io/falcosuessgott/vkv:latest | ||
env: | ||
VAULT_ADDR: https://vault.server.de | ||
VKV_MODE: server | ||
VKV_SERVER_PATH: secrets | ||
VKV_LOGIN_COMMAND: | | ||
vault login -token-only -method=userpass username=admin password="${VAULT_PASSWORD}" | ||
ports: | ||
- 8080:8080 | ||
steps: | ||
- name: read secrets from vkv server | ||
run: eval $(curl http://vkv:8080/export) | ||
- name: output secrets now available as env vars | ||
run: echo $secret | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# server | ||
`vkv server` is a subcommand that starts simple http server that accepts `GET` request `/export` on port `8080` (change using `--port`). | ||
|
||
This is helps using `vkv` as a service container for usage during CI: | ||
|
||
|
||
## Server side | ||
```bash | ||
export VAULT_ADDR="..." | ||
export VAULT_TOKEN="..." | ||
vkv server --path secret | ||
``` | ||
|
||
## Client side | ||
```bash | ||
$> curl localhost:88080/export | ||
secret/ | ||
├── v1: admin [key=value] | ||
│ └── sub=******** | ||
├── v1: demo | ||
│ └── foo=*** | ||
└── sub/ | ||
├── v1: demo | ||
│ ├── demo=*********** | ||
│ ├── password=****** | ||
│ └── user=***** | ||
└── sub2 | ||
└── v2: demo [admin=false key=value] | ||
├── admin=*** | ||
├── foo=*** | ||
├── password=******** | ||
└── user=**** | ||
``` | ||
|
||
## Output Format | ||
you can speciy the output format by adding a `format`-URL Query Parameter: | ||
|
||
```bash | ||
$> curl localhost:88080/export?format=yaml | ||
secret/: | ||
admin: | ||
sub: '********' | ||
demo: | ||
foo: '***' | ||
sub/: | ||
demo: | ||
demo: '***********' | ||
password: '******' | ||
user: '*****' | ||
sub2/: | ||
demo: | ||
admin: '***' | ||
foo: '***' | ||
password: '********' | ||
user: '****' | ||
``` |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters