Skip to content

Commit b4e75ad

Browse files
feat(rbac): clean up
Signed-off-by: Oleksandr Andriienko <[email protected]>
1 parent a243dfe commit b4e75ad

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

plugins/rbac-backend/docs/conditions.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -293,29 +293,30 @@ The RBAC-backend plugin allows for the use of aliases in the conditional policy
293293

294294
This condition should allow members of the `role:default/developer` to delete only their own catalogs and no others:
295295

296-
````json
296+
```json
297297
{
298298
"result": "CONDITIONAL",
299299
"roleEntityRef": "role:default/developer",
300300
"pluginId": "catalog",
301301
"resourceType": "catalog-entity",
302302
"permissionMapping": ["delete"],
303303
"conditions": {
304-
"rule": "IS_ENTITY_OWNER",
305-
"resourceType": "catalog-entity",
306-
"params": {
307-
"claims": ["$currentUser"]
308-
}
309-
}
304+
"rule": "IS_ENTITY_OWNER",
305+
"resourceType": "catalog-entity",
306+
"params": {
307+
"claims": ["$currentUser"]
308+
}
309+
}
310310
}
311+
```
311312

312313
## Examples of Conditional Policies
313314

314315
Below are a few examples that can be used on some of the Janus IDP plugins. These can help in determining how based to define conditional policies
315316

316317
### Keycloak plugin
317318

318-
```JSON
319+
```json
319320
{
320321
"result": "CONDITIONAL",
321322
"roleEntityRef": "role:default/developer",
@@ -330,15 +331,15 @@ Below are a few examples that can be used on some of the Janus IDP plugins. Thes
330331
}
331332
}
332333
}
333-
````
334+
```
334335

335336
This example will prevent users in the role `role:default/developer` from updating or deleting users that ingested into the catalog from the Keycloak plugin.
336337

337338
Notice the use of the annotation `keycloak.org/realm` requires the value of `<YOUR_REALM>`
338339

339340
### Quay Actions
340341

341-
```JSON
342+
```json
342343
{
343344
"result": "CONDITIONAL",
344345
"roleEntityRef": "role:default/developer",

0 commit comments

Comments
 (0)