Skip to content

Commit 2915b9d

Browse files
authored
RHDHBUGS-2190: Fixing authorization step in Lightspeed (#1477)
* Fixing authorization step in Lightspeed * Minor changeS * Incorporated Karthik's comment * Final Karthik's comment * Incorporated Judy's comments * Minor update
1 parent b62f168 commit 2915b9d

File tree

1 file changed

+34
-5
lines changed

1 file changed

+34
-5
lines changed

modules/developer-lightspeed/proc-installing-and-configuring-lightspeed.adoc

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,9 @@ upstream:
501501
...
502502
----
503503
504-
. Define permissions and roles for your users who are not administrators by completing the following steps:
505-
.. Configure the required RBAC permission by defining an `rbac-policies.csv` file as shown in the following example:
504+
. Manage your authorization based on your installation method:
505+
.. For an Operator-installed {product-very-short} instance, define permissions and roles for your users who are not administrators by completing the following steps:
506+
... Configure the required RBAC permission by defining an `rbac-policies.csv` file as shown in the following example:
506507
+
507508
[source,yaml]
508509
----
@@ -512,8 +513,8 @@ p, role:default/_<your_team>_, lightspeed.chat.delete, delete, allow
512513

513514
g, user:default/_<your_user>_, role:default/_<your_team>_
514515
----
515-
.. Upload your `rbac-policies.csv` and `rbac-conditional-policies.yaml` files to an `rbac-policies` config map in your {ocp-short} project containing {product-very-short}.
516-
.. Update your {product-custom-resource-type} custom resource to mount in the {product-very-short} filesystem your files from the `rbac-policies` ConfigMap:
516+
... Upload your `rbac-policies.csv` file to an `rbac-policies` config map in your {ocp-short} project containing {product-very-short}.
517+
... Update your {product-custom-resource-type} custom resource to mount in the {product-very-short} filesystem your files from the `rbac-policies` ConfigMap:
517518
+
518519
[source,yaml]
519520
----
@@ -526,7 +527,35 @@ spec:
526527
configMaps:
527528
- name: rbac-policies
528529
----
529-
For detailed information, see {authorization-book-link}managing-authorizations-by-using-external-files[Managing authorizations by using external files].
530+
For detailed information, see {authorization-book-link}#con-rbac-conditional-policies-rhdh_title-authorization[Managing authorizations by using external files].
531+
532+
.. For a Helm-installed {product-very-short} instance, define permissions and roles for your users who are not administrators by completing the following steps:
533+
534+
... Configure the required RBAC permission by defining an `rbac-policies.csv` file as shown in the following example:
535+
+
536+
[source,yaml]
537+
----
538+
p, role:default/_<your_team>_, lightspeed.chat.read, read, allow
539+
p, role:default/_<your_team>_, lightspeed.chat.create, create, allow
540+
p, role:default/_<your_team>_, lightspeed.chat.delete, delete, allow
541+
g, user:default/_<your_user>_, role:default/_<your_team>_
542+
----
543+
... 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. The permissions can be specified in a separate CSV file referenced in your `{my-app-config-config-map}` config map, or permissions can be created using the REST API or Web UI.
544+
To declare users such as _<your_policy_administrator_name>_ as policy administrators, edit your custom {product-very-short} ConfigMap, such as `{my-app-config-file}`, and add following code to the `{my-app-config-file}` content:
545+
+
546+
[source,yaml]
547+
----
548+
permission:
549+
enabled: true
550+
rbac:
551+
policies-csv-file: /opt/app-root/src/rbac-policies.csv
552+
policyFileReload: true
553+
admin:
554+
users:
555+
- name: user:default/<your_policy_administrator_name>
556+
----
557+
558+
See {authorization-book-link}#defining-authorizations-in-external-files-by-using-helm[Defining authorizations in external files by using Helm].
530559
531560
.Verification
532561

0 commit comments

Comments
 (0)