IAM access settings
Overview
Access descriptor for the REST API (common, authenticated, and possibly role-based). Additionally defines the set of common roles available for assignment to users and role applications in any domains.
The set of common access rules supplements the individual access rules of specific domains (by domain type - master or worker) entered in the solution/iam.json asset.
The full list of REST API access rules also includes permissions set at runtime for custom roles of a specific domain.
[
{
"access": "public" | "authenticated" | "role",
"role": "ROLE_NAME",
"endpoints": [
{
"url": str (for example "/rest/v1/iam/users"),
"methods: array<str> (for example, ["GET", "POST", "LOOKUP"])
},
...
]
},
...
]
For each list element the access level is specified (the "access" field), values:
-
public– endpoint and methods available without authorization. -
authenticated– endpoint and methods available to any authorized user. -
role– endpoint and methods available to users with a specific role. The role is additionally specified (the"role"field); the role is set arbitrarily. The specified roles will be available for assignment to users and role applications.
Each element contains a list of allowed endpoints (the "endpoints" field); each endpoint in the list is specified as an object with fields:
-
"url"– relative path to the endpoint; may contain wildcards:– arbitrary content of a path segment, for example/abc//def;– arbitrary path ending, for example/abc/. -
"methods"– set of methods allowed for this endpoint. Both HTTP verbs ("GET"), custom methods ("LOOKUP"), and wildcard ("*") may be specified. All methods are listed in uppercase.
All methods and endpoints specified here set a filter on the full set of REST API methods and endpoints implemented in the system. Nonexistent methods and endpoints are ignored.
Example
-
Opens public access to resources and to session view and creation (authorization) operations.
-
Opens access for all authorized users to session management and viewing user roles.
-
Creates the
adminrole for all domains, opening all methods of all endpoints to it.
[
{
"access": "public",
"endpoints": [
{ "url": "/rest/v1/public/version", "methods": ["GET","OPTIONS"] },
{ "url": "/rest/v1/public/resources", "methods": ["GET","OPTIONS"] },
{ "url": "/rest/v1/public/resources/*", "methods": ["GET","OPTIONS"] },
{ "url": "/rest/v1/iam/sessions", "methods": ["POST","OPTIONS"] },
{ "url": "/rest/v1/iam/sessions/current", "methods": ["GET","OPTIONS"] }
]
},
{
"access": "authenticated",
"endpoints": [
{ "url": "/rest/v1/iam/sessions/current", "methods": ["GET","POST","DELETE","OPTIONS"] },
{ "url": "/rest/v1/iam/sessions/others", "methods": ["DELETE","OPTIONS"] }
{ "url": "/rest/v1/iam/users/current", "methods": ["GET","OPTIONS"] },
{ "url": "/rest/v1/iam/roles", "methods": ["GET","OPTIONS"] }
]
},
{
"access": "role",
"role": "admin",
"endpoints": [
{ "url": "/rest/**", "methods": ["*"] }
]
}
]