This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 73
Keycloak Relationship Authorization requires config to be applied on M:1 (opposite) side #2099
Labels
Comments
Automatically generated comment to notify maintainers |
craicoverflow
changed the title
Keycloak Relationship Authorization does not appear to work as described in docoumentation
Keycloak Relationship Authorization does not appear to work as described in documentation
Sep 22, 2020
@craicoverflow update docs |
Temporary fix added in #2101 |
@craicoverflow thanks. Looks like the fix just landed in master. What I see here:
/cc @wtrocki |
I would love to get back to it once 1.0 dust will settle. |
craicoverflow
changed the title
Keycloak Relationship Authorization does not appear to work as described in documentation
Keycloak Relationship Authorization requires config to be applied on M:1 (opposite) side
Sep 22, 2020
Has this issue been fixed as mentioned by @craicoverflow in #2101? If not then what more needs to be done? |
Hi @RinkiyaKeDad - this is not fixed yet. The description already covers what is required to do this, and to be honest it is not an easy fix at all, as yet we are unsure how it can be fixed. You can give it a go, but there are probably better issues to take for now. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
@graphback/keycloak-authz
According to the Keycloak-Authz Relationship Authorization documentation I can apply authorization restrictions on one-to-many fields, like the example below:
Take a look at my auth config below.
Note.comments
is a one-to-many field.Datamodel:
However I am able to retrieve the
comments
relation data without any user privileges.Upon inspection of the
KeycloakCrudService
, it is comparing therelationField
parameter tocomments
, but this parameter isnoteId
(as it is inCRUDService
), so the auth check is never executed.graphback/packages/graphback-keycloak-authz/src/KeycloakCrudService.ts
Lines 160 to 162 in 315bce8
To get it to work I would need to do:
Is this a bug or a docs issue?
The text was updated successfully, but these errors were encountered: