|
| 1 | +[id='enabling-and-giving-access-to-rbac'] |
| 2 | += Enabling and giving access to the Role-Based Access Control (RBAC) feature |
| 3 | + |
| 4 | +The Role-Based Access Control (RBAC) feature is disabled by default. |
| 5 | +Enable the RBAC plugin and declare policy administrators to start using RBAC features. |
| 6 | + |
| 7 | +The permission policies for users and groups in the {product-short} are managed by permission policy administrators. Only permission policy administrators can access the Role-Based Access Control REST API. |
| 8 | + |
| 9 | +.Prerequisites |
| 10 | +* You have link:{linkadminguide}#assembly-add-custom-app-file-openshift_admin-rhdh[added a custom {product-short} application configuration], and have sufficient permissions to modify it. |
| 11 | +* You have link:{authentication-book-title}[enabled an authentication provider]. |
| 12 | + |
| 13 | +.Procedure |
| 14 | +. The RBAC plugin is installed but disabled by default. |
| 15 | +To enable the `./dynamic-plugins/dist/janus-idp-backstage-plugin-rbac` plugin, edit your `dynamic-plugins.yaml` with the following content. |
| 16 | ++ |
| 17 | +.`dynamic-plugins.yaml` fragment |
| 18 | +[source,yaml] |
| 19 | +---- |
| 20 | +plugins: |
| 21 | + - package: ./dynamic-plugins/dist/janus-idp-backstage-plugin-rbac |
| 22 | + disabled: false |
| 23 | +---- |
| 24 | ++ |
| 25 | +See link:{installing-and-viewing-dynamic-plugins-url}[{installing-and-viewing-dynamic-plugins-title}]. |
| 26 | + |
| 27 | +. Declare policy administrators to enable a select number of authenticated users to configure RBAC policies through the REST API or Web UI, instead of modifying the CSV file directly. |
| 28 | +The permissions can be specified in a separate CSV file referenced in the `app-config-rhdh` ConfigMap, or permissions can be created using the REST API or Web UI. |
| 29 | ++ |
| 30 | +To declare users such as _<your_policy_administrator_name>_ as policy administrators, edit your custom {product-short} ConfigMap, such as `app-config-rhdh`, and add following code to the `app-config-rhdh.yaml` content: |
| 31 | ++ |
| 32 | +.`app-config.yaml` fragment |
| 33 | +[source,yaml,subs=+quotes] |
| 34 | +---- |
| 35 | +permission: |
| 36 | + enabled: true |
| 37 | + rbac: |
| 38 | + admin: |
| 39 | + users: |
| 40 | + - name: user:default/__<your_policy_administrator_name>__ |
| 41 | +---- |
| 42 | + |
| 43 | +.Verification |
| 44 | +. Sign out from the existing {product} session and log in again using the declared policy administrator account. |
| 45 | +. With RBAC enabled, most features are disabled by default. |
| 46 | +.. Navigate to the *Catalog* page in {product-very-short}. |
| 47 | +The *Create* button is not visible. |
| 48 | +You cannot create new components. |
| 49 | +.. Navigate to the API page. |
| 50 | +The *Register* button is not visible. |
| 51 | + |
| 52 | +.Next steps |
| 53 | +* Explicitly enable permissions to resources in {product-short}. |
0 commit comments