Code Examples
Examples of post-rotation scripts in KeeperPAM
Echo Inputs
Bash
#!/bin/bash
# Read the Base64 encoded JSON input and decode it
decoded_json=$(cat | base64 --decode)
# Extract the "records" field, which is Base64 encoded, and decode it separately
records_base64=$(echo "$decoded_json" | jq -r '.records')
# Decode the Base64 "records" field and pretty-print the JSON
decoded_records=$(echo "$records_base64" | base64 --decode | jq '.')
# Print the entire decoded JSON, replacing "records" with the decoded version
echo "$decoded_json" | jq --argjson records "$decoded_records" '.records = $records'PowerShell
Using Keeper Secrets Manager SDKs
Last updated
Was this helpful?

