Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Azharullah Shariff azharullah

🎯
Focusing
View GitHub Profile
@azharullah
azharullah / vault_list_secrets.py
Created Feb 18, 2020
A python snippet that lists all the KV v2 secret paths in Hashicorp Vault and gets all the secrets in those paths and dumps all of this into a json file
View vault_list_secrets.py
import os
import hvac
import json
SECRETS_DUMP_FILE = './vault_secrets_dump.json'
def get_hvac_client():
vault_token = os.environ.get('VAULT_TOKEN')
vault_endpoint = os.environ.get('VAULT_ENDPOINT')
You can’t perform that action at this time.