Skip to content

Commit a415059

Browse files
RHIDP-3975 Managing authorization using the REST API (redhat-developer#685)
* RHIDP-3975 Managing authorization using the REST API Signed-off-by: Fabrice Flore-Thébault <[email protected]> * RHIDP-3975 Managing authorization using the REST API Signed-off-by: Fabrice Flore-Thébault <[email protected]> * RHIDP-3975 Managing authorization using the REST API Signed-off-by: Fabrice Flore-Thébault <[email protected]> * RHIDP-3975 Managing authorization using the REST API Signed-off-by: Fabrice Flore-Thébault <[email protected]> * RHIDP-3975 Managing authorization using the REST API Signed-off-by: Fabrice Flore-Thébault <[email protected]> * Update modules/authorization/proc-sending-request-to-the-rbac-rest-api-by-using-curl.adoc Co-authored-by: Oleksandr Andriienko <[email protected]> * Apply suggestions from code review * Update modules/authorization/proc-sending-request-to-the-rbac-rest-api-by-using-curl.adoc * Update modules/authorization/proc-sending-request-to-the-rbac-rest-api-by-using-curl.adoc * Update modules/authorization/proc-sending-request-to-the-rbac-rest-api-by-using-curl.adoc * Update modules/authorization/proc-sending-request-to-the-rbac-rest-api-by-using-curl.adoc * Apply suggestions from code review * Update modules/authorization/proc-sending-request-to-the-rbac-rest-api-by-using-curl.adoc * Update modules/authorization/proc-sending-request-to-the-rbac-rest-api-by-using-curl.adoc * Delete modules/authorization/con-permission-policy-and-role-source.adoc Will provide the file in another PR * Update assemblies/assembly-configuring-authorization-in-rhdh.adoc --------- Signed-off-by: Fabrice Flore-Thébault <[email protected]> Co-authored-by: Oleksandr Andriienko <[email protected]>
1 parent 0b7c758 commit a415059

7 files changed

+237
-181
lines changed

Diff for: assemblies/assembly-configuring-authorization-in-rhdh.adoc

+3-9
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ include::modules/authorization/proc-enabling-the-rbac-plugin.adoc[leveloffset=+1
3333
include::assembly-managing-authorizations-by-using-the-rhdh-web-ui.adoc[leveloffset=+1]
3434

3535

36+
include::assembly-managing-authorizations-by-using-the-rest-api.adoc[leveloffset=+1]
37+
38+
3639
include::modules/authorization/ref-rbac-permission-policies.adoc[leveloffset=+1]
3740

3841

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

5760

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

6163

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

64-
65-
include::modules/authorization/con-rbac-rest-api.adoc[leveloffset=+1]
66-
67-
68-
include::modules/authorization/proc-rbac-send-request-rbac-rest-api.adoc[leveloffset=+2]
69-
70-
71-
include::modules/authorization/ref-rbac-rest-api-endpoints.adoc[leveloffset=+2]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[id='managing-authorizations-by-using-the-rest-api']
2+
= Managing authorizations by using the REST API
3+
4+
To automate the maintenance of {product} permission policies and roles, you can use {product-short} role-based access control (RBAC) REST API.
5+
6+
You can perform the following actions with the REST API:
7+
8+
* Retrieve information about:
9+
** All permission policies
10+
** Specific permission policies
11+
** Specific roles
12+
** Static plugins permission policies
13+
* Create, update, or delete:
14+
** Permission policy
15+
** Role
16+
17+
18+
include::modules/authorization/proc-sending-request-to-the-rbac-rest-api-by-using-curl.adoc[leveloffset=+1]
19+
20+
21+
include::modules/authorization/proc-sending-request-to-the-rbac-rest-api-by-using-a-rest-client.adoc[leveloffset=+1]
22+
23+
24+
include::modules/authorization/ref-rbac-rest-api-endpoints.adoc[leveloffset=+1]
25+

Diff for: modules/authorization/con-rbac-rest-api.adoc

-119
This file was deleted.

Diff for: modules/authorization/proc-rbac-send-request-rbac-rest-api.adoc

-53
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[id='proc-rbac-sending-requests-to-the-rbac-rest-api-by-using-a-rest-client_{context}']
2+
= Sending requests to the RBAC REST API by using a REST client
3+
4+
You can send RBAC REST API requests using any REST client.
5+
6+
.Prerequisites
7+
* xref:enabling-and-giving-access-to-rbac[You have access to the RBAC feature].
8+
9+
.Procedure
10+
include::snip-finding-bearer-token.adoc[]
11+
12+
. In your REST client, run a command with the following parameters and review the response:
13+
+
14+
--
15+
Authorization::
16+
Enter your saved authorization token.
17+
18+
HTTP method::
19+
Enter the HTTP method for your xref:ref-rbac-rest-api-endpoints_{context}[API endpoint].
20+
21+
* `GET`: To retrieve specified information from a specified resource endpoint.
22+
* `POST`: To create or update a resource.
23+
* `PUT`: To update a resource.
24+
* `DELETE`: To delete a resource.
25+
26+
URL::
27+
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
28+
`pass:c,a,q[{my-product-url}/api/permission/policies]`.
29+
30+
Body::
31+
Enter the JSON body with data that your xref:ref-rbac-rest-api-endpoints_{context}[API endpoint] might need with the HTTP `POST` request.
32+
--
33+

0 commit comments

Comments
 (0)