Last active
January 6, 2021 08:42
-
-
Save NonLogicalDev/25440f51b8e2d14ffe29fbfc7f178a23 to your computer and use it in GitHub Desktop.
List all token accessors with creation dates and met information.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| vault list -format json /auth/token/accessors \ | |
| | jq -r '.[]' | xargs -I % vault token lookup -format=json -accessor % \ | |
| | jq -cr '.data|[(.creation_time | todate),.accessor,.display_name,(.meta|tojson)]|join("%%")' \ | |
| | column -t -xs %% | sort -h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment