add token rotation helper

This commit is contained in:
2025-11-06 08:39:12 +00:00
parent 724b00c02b
commit 0e436b6be5

8
bin/rotate-token.sh Normal file
View File

@@ -0,0 +1,8 @@
#!/bin/sh
# Ask the relay to mint a fresh operator token and print it. Paste the result
# into your own .env; do not commit it. Rotating invalidates the previous one.
set -eu
. "$(dirname "$0")/../.env"
curl -ks -X POST \
-H "Authorization: Bearer ${RELAY_TOKEN}" \
"${RELAY_ENDPOINT}/operator/token:rotate" | sed -n 's/.*"token":"\([^"]*\)".*/\1/p'