Merge pull request #6350 from nazco/clarify-api-permission-docs

clarify the permision system of the api in the docs
This commit is contained in:
Michael Friedrich 2018-06-05 16:34:12 +02:00 committed by GitHub
commit eb3956f6ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -196,13 +196,15 @@ actions on the URL endpoints.
Permissions for API users must be specified in the `permissions` attribute Permissions for API users must be specified in the `permissions` attribute
as array. The array items can be a list of permission strings with wildcard as array. The array items can be a list of permission strings with wildcard
matches. matches. Please notice, that the permission system that is used by the API differs from the permission system used by the Icinga Web 2 frontend or other parts of Icinga 2.
The permission system mainly relies on the url scheme of the API endpoints (See listing below).
Example for an API user with all permissions: Example for an API user with all permissions:
permissions = [ "*" ] permissions = [ "*" ]
Note that you can use wildcards. Here's another example that only allows the user Note that you can use wildcards to include all possible hierarchically lower items. Here's another example that only allows the user
to perform read-only object queries for hosts and services: to perform read-only object queries for hosts and services:
permissions = [ "objects/query/Host", "objects/query/Service" ] permissions = [ "objects/query/Host", "objects/query/Service" ]