1.3.2 Assigning custom ACLs to roles and removing custom ACLs assigned to roles
Obtain a list of ACL names. An example of API execution is shown below.
The names in the list is the name in the ACL YAML file. Check to see if the name of the custom ACL you created is in it.
<Example> /api/v1/acls
# curl -XGET "Ops I URL/api/v1/acls" ¥
-H "X-OpsI-Token: Ops I token"
(2) Obtaining detailed ACL information
Obtain detailed ACL information by specifying the name of the custom ACL retrieved. An example of API execution is shown below.
<Example> /api/v1/acls/{name}
# curl -XGET "Ops I URL/api/v1/acls/Custom ACL" ¥
-H "X-OpsI-Token: Ops I token"
Assigns custom ACLs to roles. An example of API execution is shown below.
The name of the role to be specified should be noted from the System Administration screen.
<Example> /api/v1/acls/roles/{roleName}
# curl -XPOST "Ops I URL/api/v1/acls/roles/Role name" ¥
-H "X-OpsI-Token: Ops I token" ¥
-H "Content-Type: application/json" -d @sample.json
(4) Obtaining ACLs assigned to roles
Confirm that the ACL is as intended. An example of API execution is shown below.
Information on statement included in ACLs is also obtained, so be sure to check these as well.
<Example> /api/v1/acls/roles/{roleName}
# curl -XGET "Ops I URL/api/v1/acls/roles/Role name" ¥
-H "X-OpsI-Token: Ops I token"
(5) Removing ACLs assigned to roles
Removes custom ACLs assigned to a role. An example of API execution is shown below.
The name of the role to be specified should be noted from the System Administration screen.
<Example> /api/v1/acls/roles/{roleName}
# curl -XDELETE "Ops I URL/api/v1/acls/roles/Role name" ¥
-H "X-OpsI-Token: Ops I token" ¥
-H "Content-Type: application/json" -d @sample.json