Skip to content

Commit

Permalink
Populate vault with arbitrarily many secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
slarwise committed Aug 9, 2024
1 parent 577a9e6 commit 0c7dfc8
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion scripts/populate
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/bin/sh
#!/bin/bash

export VAULT_ADDR=http://127.0.0.1:8200
export VAULT_TOKEN=dev-only-token

n_arbitrary_secrets=45

echo '{
"roles": ["reader", "writer"],
"token": "abc123",
Expand All @@ -26,3 +28,17 @@ echo '{
"client-secret": "style"
}' |
vault kv put -mount secret /yolo/swag -
echo '{
"tenant-id": "oopa",
"client-id": "gangnamn",
"client-secret": "style"
}' |
vault kv put -mount secret /if/you/can/read/the/full/path/of/this/key/you/are/the/person/in/the/red/flag/monitor/meme -
for i in $(seq 1 "$n_arbitrary_secrets"); do
echo '{
"tenant-id": "oopa",
"client-id": "gangnamn",
"client-secret": "style"
}' |
vault kv put -mount secret /secret"$i" -
done

0 comments on commit 0c7dfc8

Please sign in to comment.