Skip to content

Instantly share code, notes, and snippets.

@kawsark
Last active March 4, 2024 11:01
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 14 You must be signed in to fork a gist
  • Save kawsark/4cdb66093d6206d9e036ecd1294e6509 to your computer and use it in GitHub Desktop.
Save kawsark/4cdb66093d6206d9e036ecd1294e6509 to your computer and use it in GitHub Desktop.
An example Vault admin policy with capability to manage leses
# Allow managing leases
path "sys/leases/*"
{
capabilities = ["create", "read", "update", "delete", "list", "sudo"]
}
# Manage auth methods broadly across Vault
path "auth/*"
{
capabilities = ["create", "read", "update", "delete", "list", "sudo"]
}
# Create, update, and delete auth methods
path "sys/auth/*"
{
capabilities = ["create", "update", "delete", "sudo"]
}
# List auth methods
path "sys/auth"
{
capabilities = ["read"]
}
# List existing policies
path "sys/policies/acl"
{
capabilities = ["read","list"]
}
# Create and manage ACL policies
path "sys/policies/acl/*"
{
capabilities = ["create", "read", "update", "delete", "list", "sudo"]
}
# List, create, update, and delete key/value secrets
path "secret/*"
{
capabilities = ["create", "read", "update", "delete", "list", "sudo"]
}
# Manage secret engines
path "sys/mounts/*"
{
capabilities = ["create", "read", "update", "delete", "list", "sudo"]
}
# List existing secret engines.
path "sys/mounts"
{
capabilities = ["read"]
}
# Read health checks
path "sys/health"
{
capabilities = ["read", "sudo"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment