Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
335c022
RHIDP-3975 Managing authorization using the REST API
themr0c Nov 7, 2024
79a9875
Merge branch 'main' into RHIDP-3975
themr0c Nov 7, 2024
33d4292
RHIDP-3975 Managing authorization using the REST API
themr0c Nov 7, 2024
cdaceb9
RHIDP-3975 Managing authorization using the REST API
themr0c Nov 7, 2024
1b26b09
RHIDP-3975 Managing authorization using the REST API
themr0c Nov 7, 2024
9f1f5ff
RHIDP-3975 Managing authorization using the REST API
themr0c Nov 7, 2024
e030c90
Merge branch 'main' into RHIDP-3975
themr0c Nov 8, 2024
fab8ea4
Update modules/authorization/proc-sending-request-to-the-rbac-rest-ap…
themr0c Nov 12, 2024
3697e7b
Apply suggestions from code review
themr0c Nov 12, 2024
8ac7ddd
Update modules/authorization/proc-sending-request-to-the-rbac-rest-ap…
themr0c Nov 13, 2024
c7560e9
Update modules/authorization/proc-sending-request-to-the-rbac-rest-ap…
themr0c Nov 13, 2024
e598801
Update modules/authorization/proc-sending-request-to-the-rbac-rest-ap…
themr0c Nov 13, 2024
a2acc7d
Merge branch 'main' into RHIDP-3975
themr0c Nov 13, 2024
1d7c383
Update modules/authorization/proc-sending-request-to-the-rbac-rest-ap…
themr0c Nov 13, 2024
59719b8
Apply suggestions from code review
themr0c Nov 13, 2024
cf2e0ea
Update modules/authorization/proc-sending-request-to-the-rbac-rest-ap…
themr0c Nov 13, 2024
3688c81
Update modules/authorization/proc-sending-request-to-the-rbac-rest-ap…
themr0c Nov 13, 2024
ed078d0
Delete modules/authorization/con-permission-policy-and-role-source.adoc
themr0c Nov 13, 2024
fe73daf
Update assemblies/assembly-configuring-authorization-in-rhdh.adoc
themr0c Nov 13, 2024
732052f
Merge branch 'main' into RHIDP-3975
themr0c Nov 13, 2024
89648fd
Merge branch 'main' into RHIDP-3975
themr0c Nov 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions assemblies/assembly-configuring-authorization-in-rhdh.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,15 @@ To apply RBAC in {product-short}:
include::modules/authorization/proc-enabling-the-rbac-plugin.adoc[leveloffset=+1]


include::modules/authorization/con-permission-policy-and-role-source.adoc[leveloffset=+1]


include::assembly-managing-authorizations-by-using-the-rhdh-web-ui.adoc[leveloffset=+1]


include::assembly-managing-authorizations-by-using-the-rest-api.adoc[leveloffset=+1]


include::modules/authorization/ref-rbac-permission-policies.adoc[leveloffset=+1]


Expand All @@ -55,17 +61,8 @@ include::modules/authorization/ref-rbac-conditional-policy-definition.adoc[level
include::modules/authorization/proc-rbac-config-conditional-policy-file.adoc[leveloffset=+2]



include::modules/authorization/con-user-stats-rhdh.adoc[leveloffset=+1]


include::modules/authorization/proc-download-user-stats-rhdh.adoc[leveloffset=+2]


include::modules/authorization/con-rbac-rest-api.adoc[leveloffset=+1]


include::modules/authorization/proc-rbac-send-request-rbac-rest-api.adoc[leveloffset=+2]


include::modules/authorization/ref-rbac-rest-api-endpoints.adoc[leveloffset=+2]
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[id='managing-authorizations-by-using-the-rest-api']
= Managing authorizations by using the REST API

To automate the maintenance of {product} permission policies and roles, you can use {product-short} role-based access control (RBAC) REST API.

You can perform the following actions with the REST API:

* Retrieve information about:
** All permission policies
** Specific permission policies
** Specific roles
** Static plugins permission policies
* Create, update, or delete:
** Permission policy
** Role


include::modules/authorization/proc-sending-request-to-the-rbac-rest-api-by-using-curl.adoc[leveloffset=+1]


include::modules/authorization/proc-sending-request-to-the-rbac-rest-api-by-using-a-rest-client.adoc[leveloffset=+1]


include::modules/authorization/ref-rbac-rest-api-endpoints.adoc[leveloffset=+1]

29 changes: 29 additions & 0 deletions modules/authorization/con-permission-policy-and-role-source.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[id='con-permission-policy-and-role-source']
= Understanding permission policy and role configuration source

You can manipulate permission policies and roles based on the following designated source information:

* CSV file
* Configuration file
* REST API
* Legacy

Each permission policy and role is associated with a source to maintain data consistency.
Therefore, when a policy has been created in a CSV file, you cannot change it by using the REST API.


Managing roles and permission policies originating from CSV files and REST API involves straightforward modification based on their initial source information.

The Configuration file pertains to the default `role:default/rbac_admin` role provided by the RBAC plugin.
The default role has limited permissions to create, read, update, and delete permission policies or roles, and to read catalog entities.

[NOTE]
====
In case the default permissions are insufficient for your administrative requirements, you can create a custom admin role with required permission policies.
====

The legacy source applies to policies and roles defined before RBAC backend plugin version `2.1.3`, and is the least restrictive among the source location options.
You must update the permissions and roles in legacy source to use either REST API or the CSV file sources.

You can use the `GET` requests to query roles and policies and determine the source information, if required.

119 changes: 0 additions & 119 deletions modules/authorization/con-rbac-rest-api.adoc

This file was deleted.

53 changes: 0 additions & 53 deletions modules/authorization/proc-rbac-send-request-rbac-rest-api.adoc

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[id='proc-rbac-sending-requests-to-the-rbac-rest-api-by-using-a-rest-client_{context}']
= Sending requests to the RBAC REST API by using a REST client

You can send RBAC REST API requests using any REST client.

.Prerequisites
* xref:enabling-and-giving-access-to-rbac[You have access to the RBAC feature].

.Procedure
include::snip-finding-bearer-token.adoc[]

. In your REST client, run a command with the following parameters and review the response:
+
--
Authorization::
Enter your saved authorization token.

HTTP method::
Enter the HTTP method for your xref:ref-rbac-rest-api-endpoints_{context}[API endpoint].

* `GET`: To retrieve specified information from a specified resource endpoint.
* `POST`: To create or update a resource.
* `PUT`: To update a resource.
* `DELETE`: To delete a resource.

URL::
Enter your {product-short} URL and xref:ref-rbac-rest-api-endpoints_{context}[API endpoint]: pass:c,a,q[{my-product-url}/__<endpoint>__], such as
`pass:c,a,q[{my-product-url}/api/permission/policies]`.

Body::
Enter the JSON body with data that your xref:ref-rbac-rest-api-endpoints_{context}[API endpoint] might need with the HTTP `POST` request.
--

Loading