Add unwrap and wrap scripts for handling wrapped secrets in Vault

This commit is contained in:
2026-01-18 12:01:29 +01:00
parent 691bcf2bb4
commit 74a364c8e1
2 changed files with 20 additions and 0 deletions

10
bin/unwrap.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Usage: ./unwrap.sh <VAULT_TOKEN>
# This script unwraps a wrapped secret in HashiCorp Vault using the provided token.
curl -s -X PUT \
-H "X-Vault-Token: $1" \
-H "X-Vault-Request: true" \
-d 'null' \
https://vault.koszewscy.waw.pl/v1/sys/wrapping/unwrap | jq '.data'