Sample Policy File

Sample Policy File

The following is a sample policy file.

{
    "admin": "is_admin:True or role:admin or role:masterofuniverse",

    "admin_or_owner":  "rule:admin or project_id:%(project_id)s",

    "default": "!",
    "admin_api": "rule:admin",

    "blazar:leases:get": "rule:admin_or_owner",
    "blazar:leases:create": "rule:admin_or_owner",
    "blazar:leases:delete": "rule:admin_or_owner",
    "blazar:leases:update": "rule:admin_or_owner",

    "blazar:plugins:get": "@",

    "blazar:oshosts:get": "rule:admin_or_owner",
    "blazar:oshosts:create": "rule:admin_api",
    "blazar:oshosts:delete": "rule:admin_api",
    "blazar:oshosts:update": "rule:admin_api"
}
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.