add token rotation helper
This commit is contained in:
8
bin/rotate-token.sh
Normal file
8
bin/rotate-token.sh
Normal 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'
|
||||
Reference in New Issue
Block a user