You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/rbac-backend/docs/conditions.md
+11-10Lines changed: 11 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -293,29 +293,30 @@ The RBAC-backend plugin allows for the use of aliases in the conditional policy
293
293
294
294
This condition should allow members of the `role:default/developer` to delete only their own catalogs and no others:
295
295
296
-
````json
296
+
```json
297
297
{
298
298
"result": "CONDITIONAL",
299
299
"roleEntityRef": "role:default/developer",
300
300
"pluginId": "catalog",
301
301
"resourceType": "catalog-entity",
302
302
"permissionMapping": ["delete"],
303
303
"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
+
}
310
310
}
311
+
```
311
312
312
313
## Examples of Conditional Policies
313
314
314
315
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
315
316
316
317
### Keycloak plugin
317
318
318
-
```JSON
319
+
```json
319
320
{
320
321
"result": "CONDITIONAL",
321
322
"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
330
331
}
331
332
}
332
333
}
333
-
````
334
+
```
334
335
335
336
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.
336
337
337
338
Notice the use of the annotation `keycloak.org/realm` requires the value of `<YOUR_REALM>`
0 commit comments