Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View azharullah's full-sized avatar
💥

Azharullah Shariff azharullah

💥
View GitHub Profile
@azharullah
azharullah / vault_list_secrets.py
Created February 18, 2020 13:36
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
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')