Skip to content

Instantly share code, notes, and snippets.

@ml4
ml4 / hc-vault-recursive-namespace-list.sh
Created July 15, 2022 17:42
Recursive list of Vault Enterprise namespaces
#!/bin/bash
function list_namespace {
entry_point=$(echo ${1} | sed 's/\/$//')
echo "${entry_point}"
## first, check if root ns, and if so collect children slightly differently due to path specification
#
if [[ "${entry_point}" == "root" ]]
then