Vault policy to show the path and key and deny the value

Hi All,

I am trying to write a policy for kv secret engine to show the path and key and deny the value

For example :

secret Path :
kv/path1/path2/key=value

Policy :
path “*” {
capabilities = [“list”]
}

expected in the UI is, I would like to see the everything except the value.

i.e, kv/path1/path2/key

but i can see only the path but can’'t able to see the key. could you please help me with the policy of how to get the key with the value

Hi @elan,

I don’t believe it’s possible to create a policy to view partial secret content.

When viewing a secret in the UI, your browser fetches the entire secret content (all keys and associated values) and the just masks the values by default.

Well, it looks I had exactly the same question two days later:

1 Like