From 0c7dfc85da03754ec5f9856d79ebc9d72e376e43 Mon Sep 17 00:00:00 2001 From: Arvid Bjurklint Date: Fri, 9 Aug 2024 18:21:44 +0200 Subject: [PATCH] Populate vault with arbitrarily many secrets --- scripts/populate | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/populate b/scripts/populate index 0b6c11a..b331b88 100755 --- a/scripts/populate +++ b/scripts/populate @@ -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", @@ -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