Skip to content

Latest commit

 

History

History
80 lines (67 loc) · 1.23 KB

README.md

File metadata and controls

80 lines (67 loc) · 1.23 KB

MIT License

Simple Hashicorp Vault policy path generator

Usage

cat ./policy.yml | ./vaultPG.py

Source

#  vim: set et fenc=utf-8 ff=unix sts=2 sw=2 ts=2
# policy
#   c = create
#   r = read
#   u = update
#   d = delete
#   l = list
#   s = sudo
#   x = deny
#   UPPERCASE = recurse mode
path:
  - path: "secret/data/dc1/shared*"
    capabilities: Lcrud
  - path: "secret/data/dc1/read"
    capabilities: Lr

Policy

{
  "path": {
    "secret": {
      "capabilities": [
        "list"
      ]
    },
    "secret/data": {
      "capabilities": [
        "list"
      ]
    },
    "secret/data/dc1": {
      "capabilities": [
        "list"
      ]
    },
    "secret/data/dc1/read": {
      "capabilities": [
        "read",
        "list"
      ]
    },
    "secret/data/dc1/shared*": {
      "capabilities": [
        "delete",
        "create",
        "read",
        "update",
        "list"
      ]
    }
  }
}

License

MIT License

Author