You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
= Delegating role-based access controls (RBAC) access in {product}
3
3
4
-
An enterprise customer requires the ability to delegate role-based access control (RBAC) responsibilities to individual team leads. In this scenario, you, as the administrator, can provide access to the RBAC plugin specifically to designated users, such as team leads. Each team lead is then able to manage permissions exclusively for users within their respective team or department, without visibility into or control over permissions outside their assigned scope.
4
+
An enterprise customer requires the ability to delegate role-based access control (RBAC) responsibilities to other individual in the organization. In this scenario, you, as the administrator, can provide access to the RBAC plugin specifically to designated users, such as team leads. Each team lead is then able to manage permissions exclusively for users within their respective team or department, without visibility into or control over permissions outside their assigned scope. This approach allows team leads to manage access and permissions for their own teams independently, while administrators maintain global oversight.
5
5
6
-
The expected results of delegating RBAC access are as follows:
6
+
In {product-very-short}, you can delegate RBAC access using the multitenancy feature of RBAC plugin, specifically the `IS_OWNER` conditional rule.
7
+
8
+
By delegating the RBAC access, you can expect the following outcomes:
7
9
8
10
* Team leads can manage RBAC settings for their teams independently.
9
11
* Visibility of other users' or teams' permissions is restricted.
@@ -12,24 +14,166 @@ The expected results of delegating RBAC access are as follows:
12
14
.Prerequisites
13
15
* Your {product-very-short} instance is up and running with RBAC plugin installed and configured.
14
16
* You have administrative access to {product-very-short}.
17
+
* You have API access using `curl` or another tool.
15
18
16
19
.Procedure
17
20
. In your {product-very-short} instance, navigate to the *Administration -> RBAC* page.
18
-
. Create a new role designated for team leads.
21
+
. Create a new role designated for team leads using the Web UI or API:
19
22
+
20
-
For more information about creating a role, see xref:proc-rbac-ui-create-role_title-authorization[Creating a role in the {product} Web UI].
23
+
--
24
+
.Example of creating a new role for the team lead using the RBAC backend API
25
+
[source,bash]
26
+
----
27
+
curl -X POST 'http://localhost:7007/api/permission/roles' \
28
+
--header "Authorization: Bearer $ADMIN_TOKEN" \
29
+
--header "Content-Type: application/json" \
30
+
--data '{
31
+
"memberReferences": ["user:default/team_lead"],
32
+
"name": "role:default/team_lead",
33
+
"metadata": {
34
+
"description": "This is an example team lead role"
35
+
}
36
+
}'
37
+
----
21
38
22
-
. Add the appropriate users or groups to the newly created role.
23
-
. Define the necessary permissions for the role based on the tasks the team leads are expected to manage. For example, you can allow team leads to access the RBAC UI and save permission changes for added users or groups.
24
-
. Apply access conditions to scope the role’s visibility and control to specific users or groups. For example, you can limit each team lead’s access to only their team.
25
-
. Save the changes.
39
+
For more information about creating a role using the Web UI, see xref:proc-rbac-ui-create-role_title-authorization[Creating a role in the {product} Web UI].
40
+
--
26
41
27
-
.Verification
28
-
Log in as a team lead and verify the following:
42
+
. Allow team leads to read catalog entities and create permissions in the RBAC plugin using the Web UI or the following API request:
43
+
+
44
+
--
45
+
.Example of granting the team lead role permission to create RBAC policies and read catalog entities
46
+
[source,bash]
47
+
----
48
+
curl -X POST 'http://localhost:7007/api/permission/policies' \
49
+
--header "Authorization: Bearer $ADMIN_TOKEN" \
50
+
--header "Content-Type: application/json" \
51
+
--data '[
52
+
{
53
+
"entityReference": "role:default/team_lead",
54
+
"permission": "policy-entity",
55
+
"policy": "create",
56
+
"effect": "allow"
57
+
},
58
+
{
59
+
"entityReference": "role:default/team_lead",
60
+
"permission": "catalog-entity",
61
+
"policy": "read",
62
+
"effect": "allow"
63
+
}
64
+
]'
65
+
----
66
+
--
67
+
68
+
. To ensure team leads can only manage what they own, use the `IS_OWNER` conditional rule as follows:
69
+
+
70
+
--
71
+
.Example `curl` of applying a conditional access policy using the `IS_OWNER` rule for the team lead role
72
+
[source,bash]
73
+
----
74
+
curl -X POST 'http://localhost:7007/api/permission/roles/conditions' \
75
+
--header "Authorization: Bearer $ADMIN_TOKEN" \
76
+
--header "Content-Type: application/json" \
77
+
--data '{
78
+
"result": "CONDITIONAL",
79
+
"pluginId": "permission",
80
+
"resourceType": "policy-entity",
81
+
"conditions": {
82
+
"rule": "IS_OWNER",
83
+
"resourceType": "policy-entity",
84
+
"params": {
85
+
"owners": [
86
+
"user:default/team_lead"
87
+
]
88
+
}
89
+
},
90
+
"roleEntityRef": "role:default/team_lead",
91
+
"permissionMapping": [
92
+
"read",
93
+
"update",
94
+
"delete"
95
+
]
96
+
}'
97
+
----
98
+
The previous example of conditional policy limits visibility and control to only owned roles and policies.
99
+
--
29
100
30
-
* The RBAC UI is accessible.
31
-
* Only the assigned users or group is visible.
32
-
* Permissions outside the scoped team are not viewable or editable.
101
+
. Log in to {product-very-short} as team lead and verify the following:
102
+
+
103
+
--
104
+
.. Use the following request and verify that you do not see any roles:
105
+
+
106
+
.Example `curl` to retrieve roles visible to the team lead
107
+
[source,bash]
108
+
----
109
+
curl -X GET 'http://localhost:7007/api/permission/roles' \
110
+
--header "Authorization: Bearer $TEAM_LEAD_TOKEN"
111
+
112
+
----
113
+
114
+
.. Use the following request to create a new role for their team:
115
+
+
116
+
.Example `curl` of team lead creating a new role for their team with ownership assigned
117
+
[source,bash]
118
+
----
119
+
curl -X POST 'http://localhost:7007/api/permission/roles' \
0 commit comments