Skip to content

Commit

Permalink
Add scripts and data to populate a local vault server
Browse files Browse the repository at this point in the history
  • Loading branch information
slarwise committed Aug 7, 2024
1 parent cc83d23 commit 333252c
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dev.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export VAULT_ADDR=http://127.0.0.1:8200
export VAULT_TOKEN=dev-only-token
export VAULT_MOUNT=secret
6 changes: 6 additions & 0 deletions scripts/populate
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export VAULT_ADDR=http://127.0.0.1:8200
export VAULT_TOKEN=dev-only-token
vault kv put -mount secret /user @testdata/a.json
vault kv put -mount secret /creds @testdata/b.json
vault kv put -mount secret /azure/the @testdata/c.json
vault kv put -mount secret /yolo/swag @testdata/d.json
3 changes: 3 additions & 0 deletions scripts/start-vault
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

vault server -dev -dev-root-token-id dev-only-token -address http://127.0.0.1:8200
5 changes: 5 additions & 0 deletions testdata/a.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"roles": ["reader", "writer"],
"token": "abc123",
"url": "https://example.com"
}
4 changes: 4 additions & 0 deletions testdata/b.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"client_id": "free",
"client_secret": "palestine"
}
4 changes: 4 additions & 0 deletions testdata/c.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"user": "vim",
"password": "actually-emacs"
}
5 changes: 5 additions & 0 deletions testdata/d.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"tenant-id": "oopa",
"client-id": "gangnamn",
"client-secret": "style"
}

0 comments on commit 333252c

Please sign in to comment.