A security team wants to ensure that all Vault policies for applications follow the principle of least privilege. They have a policy 'app-kv' that grants read access to secrets under 'secret/data/app/*'. An auditor finds that a developer can also read secrets under 'secret/data/team/*'. The policy currently uses a path-based glob. Which change should the team make to restrict access to only the app path?
Trap 1: Change the path to 'secret/data/app/+' and use 'list' capability.
Using '+' matches a single segment; this would still allow reading 'secret/data/app/team' if it exists.
Trap 2: Change the path to 'secret/data/app/*' and add 'deny' capability…
Adding deny to other paths is not a Vault policy best practice; policies are additive.
Trap 3: Keep the path as 'secret/data/app/*' but add a policy with path…
Vault does not support deny capabilities; policies are additive and first-match wins.
- A
Change the path to 'secret/data/app/+' and use 'list' capability.
Why wrong: Using '+' matches a single segment; this would still allow reading 'secret/data/app/team' if it exists.
- B
Change the path to 'secret/data/app/*' and add 'deny' capability for other paths.
Why wrong: Adding deny to other paths is not a Vault policy best practice; policies are additive.
- C
Keep the path as 'secret/data/app/*' but add a policy with path 'secret/data/team/*' and 'deny' capability.
Why wrong: Vault does not support deny capabilities; policies are additive and first-match wins.
- D
Change the path to 'secret/data/app/' (without glob) and ensure the policy only grants 'read' capability.
Using a concrete path with trailing slash (or no glob) restricts to that specific path prefix only.