Updated AccessRule
Not Applied: Old BPN Retains Access, New BPN Denied
#489
Labels
bug
Something isn't working
Current Behavior
When having Granular Access Control enabled, after creating an
AccessRule
using the POST/access-controls/rules
endpoint for a certain BPN likeand successfully (Response: 200 OK) updating this
AccessRule
using the PUT/access-controls/rules/{{Id}}
endpoint toBPNLXXXXXXXXXXX1
is still able to retrieveShell
information (using theEdc-Bpn
header). On the other handBPNLXXXXXXXXXXX2
is still not able to fetch this information.Expected Behavior
Updated
AccessRule
is applied as returned by the response of the PUT/access-controls/rules/{{Id}}
endpointSteps To Reproduce
Shell
using POST/shell-descriptors
AccessRule
that enablesBPNLXXXXXXXXXXX1
to access theShell
informationBPNLXXXXXXXXXXX1
can retrieve the information using the GET/shell-descriptors
endpoint andEdc-Bpn
header set toBPNLXXXXXXXXXXX1
AccessRule
by just changing thebpn
AccessRule
toBPNLXXXXXXXXXXX2
/shell-descriptors
endpoint andEdc-Bpn
header set toBPNLXXXXXXXXXXX1
: Still able to accessBPNLXXXXXXXXXXX2
: Still unable to accessPossible Solution
We are happy to help with a PR for this!
The
targetTenant
field in theAccessRule
entity seems not to be updated when using the PUT/access-controls/rules/{{Id}}
endpoint.This could be caused by a non updatable column:
sldt-digital-twin-registry/access-control-service-sql-impl/src/main/java/org/eclipse/tractusx/semantics/accesscontrol/sql/model/AccessRule.java
Line 69 in 4c927cf
The text was updated successfully, but these errors were encountered: