Strictly speaking, policies don’t have members.
I know what you mean, though, and Vault doesn’t have a built in answer for this - it requires the Vault admin to write a program that makes a multitude of different API calls to Vault. Essentially you have to crawl the Vault API yourself, looking for all of the various places policies can be configured.
Key places to look are:
-
identity/entity/id/*
in thepolicies
field -
identity/group/id/*
in thepolicies
field - Read the full list of your auth methods from
sys/auth
and then for each of them, check the docs for where policies can be configured within them - here are some examples:-
auth/approle/role/*
in thetoken_policies
field -
auth/jwt/role/*
in thetoken_policies
field -
auth/kubernetes/role/*
in thetoken_policies
field -
auth/token/role/*
in theallowed_policies
field -
auth/ldap/groups/*
in thepolicies
field -
auth/ldap/config
in thetoken_policies
field
-
- If you’re using Vault Enterprise, remember to also list namespaces and repeat everything for each namespace
If you have tokens being created directly using auth/token/create
rather than logins or token roles, you’d need to care about whatever does that too.