Skip to content

Commit 184c12b

Browse files
author
GitHub Actions
committed
Updates the setting up RBAC permission
1 parent e0834a6 commit 184c12b

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

assemblies/assembly-configuring-authorization-in-rhdh.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ To define authorizations in {product-short}:
2929
include::modules/authorization/proc-enabling-the-rbac-plugin.adoc[leveloffset=+1]
3030

3131

32+
include::modules/authorization/proc-enabling-guest-access-for-rbac-frontend-plugin.adoc[leveloffset=+2]
33+
34+
3235
include::modules/authorization/proc-determining-permission-policy-and-role-configuration-source.adoc[leveloffset=+1]
3336

3437

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
[id="enabling-guest-access-for-the-rbac-frontend-plugin_{context}"]
2+
= Enabling guest access for the RBAC frontend plugin
3+
4+
Use guest access for the Role-Based Access Control (RBAC) frontend plugin to test and develop, except in production. To enable the guest access for the RBAC frontend, configure the backend plugin and set up the guest authentication provider.
5+
6+
.Prerequisites
7+
* You have installed the `@janus-idp/backstage-plugin-rbac` plugin in {product-short}. For more information, see link:{plugins-configure-book-url}[{plugins-configure-book-title}].
8+
9+
== Configuring the RBAC backend plugin
10+
11+
Update the `app-config.yaml` to enable the permission framework, include the user `user:default/guest` in the admin users section, and ensure that the plugins with permissions appear in the UI as shown:
12+
13+
[source,yaml,subs=+quotes]
14+
----
15+
permission
16+
enabled: true
17+
rbac:
18+
admin:
19+
users:
20+
- name: user:default/guest
21+
pluginsWithPermission:
22+
- catalog
23+
- permission
24+
- scaffolder
25+
----
26+
27+
[NOTE]
28+
====
29+
The `pluginsWithPermission` section includes only three plugins. Update the section as needed to include any additional plugins that also incorporate permissions.
30+
====
31+
32+
== Setting up the guest authentication provider
33+
34+
To enable guest authentication and to use it alongside the RBAC frontend plugin, update the `app-config.yaml`. Add the user entity reference to resolve and enable the `dangerouslyAllowOutsideDevelopment` option, as shown in the following example:
35+
36+
[source,yaml,subs="+attributes,+quotes"]
37+
----
38+
auth:
39+
environment: development
40+
providers:
41+
guest:
42+
userEntityRef: user:default/guest
43+
dangerouslyAllowOutsideDevelopment: true
44+
----
45+
46+
You can use `user:default/guest` as the user entity reference to match the added user under the `permission.rbac.admin.users` section of the `app-config.yaml`.

0 commit comments

Comments
 (0)