IAM access settings

Location path

Path in the build directory

/era_env/priv/sys_metadata/<SOLUTION>/iam.json (where SOLUTION: master or era)

Overview

Access descriptor for the REST API (authenticated and role-based). Additionally defines the composition of roles available for assignment to users and role applications.

The composition of roles and endpoints and methods available to them is supplemented by roles and methods entered in the product/iam_all.json product asset.

For the master domain: /era_env/priv/sys_metadata/master/iam.json. For a working domain: /era_env/priv/sys_metadata/era/iam.json.

Format:
[
  {
    "access": "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:

  • 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

Predefines the users_reader role for domains of the considered type and opens access for it to get the user collection, user account content, and user role composition.

Example:
[
  {
    "access": "role",
    "role": "users_reader",
    "endpoints": [
      { "url": "/rest/v1/iam/users", "methods: ["GET"] },
      { "url": "/rest/v1/iam/users/*", "methods": ["GET"] },
      { "url": "/rest/v1/iam/roles", "methods": ["GET"] }
    ]
  }
]