generated from redhat-developer/new-project-template
-
Notifications
You must be signed in to change notification settings - Fork 57
RHIDP-3975 Managing authorization using the REST API #685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 79a9875
Merge branch 'main' into RHIDP-3975
themr0c 33d4292
RHIDP-3975 Managing authorization using the REST API
themr0c cdaceb9
RHIDP-3975 Managing authorization using the REST API
themr0c 1b26b09
RHIDP-3975 Managing authorization using the REST API
themr0c 9f1f5ff
RHIDP-3975 Managing authorization using the REST API
themr0c e030c90
Merge branch 'main' into RHIDP-3975
themr0c fab8ea4
Update modules/authorization/proc-sending-request-to-the-rbac-rest-ap…
themr0c 3697e7b
Apply suggestions from code review
themr0c 8ac7ddd
Update modules/authorization/proc-sending-request-to-the-rbac-rest-ap…
themr0c c7560e9
Update modules/authorization/proc-sending-request-to-the-rbac-rest-ap…
themr0c e598801
Update modules/authorization/proc-sending-request-to-the-rbac-rest-ap…
themr0c a2acc7d
Merge branch 'main' into RHIDP-3975
themr0c 1d7c383
Update modules/authorization/proc-sending-request-to-the-rbac-rest-ap…
themr0c 59719b8
Apply suggestions from code review
themr0c cf2e0ea
Update modules/authorization/proc-sending-request-to-the-rbac-rest-ap…
themr0c 3688c81
Update modules/authorization/proc-sending-request-to-the-rbac-rest-ap…
themr0c ed078d0
Delete modules/authorization/con-permission-policy-and-role-source.adoc
themr0c fe73daf
Update assemblies/assembly-configuring-authorization-in-rhdh.adoc
themr0c 732052f
Merge branch 'main' into RHIDP-3975
themr0c 89648fd
Merge branch 'main' into RHIDP-3975
themr0c File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
assemblies/assembly-managing-authorizations-by-using-the-rest-api.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
29
modules/authorization/con-permission-policy-and-role-source.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. | ||
themr0c marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ==== | ||
|
|
||
| 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. | ||
|
|
||
This file was deleted.
Oops, something went wrong.
53 changes: 0 additions & 53 deletions
53
modules/authorization/proc-rbac-send-request-rbac-rest-api.adoc
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
...orization/proc-sending-request-to-the-rbac-rest-api-by-using-a-rest-client.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. | ||
| -- | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.