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
@kolotaev Wanted to propose a couple of features which can enhance the usability and power of the project.
Have a user-friendly JSON schema for marshaling the policy objects. Currently, the jsonpickle package is being used to load and covert policies from JSON. However, this serializer inserts the py/objects fields to keep track of the classes for de-serialization. As an example, the policy
vakt.Policy(
str(uuid.uuid4()),
actions=[Eq('fork'), Eq('clone')],
resources=[StartsWith('repos/Google', ci=True)],
subjects=[{'name': Any(), 'stars': And(Greater(50), Less(999))}],
effect=vakt.ALLOW_ACCESS,
context={'referer': Eq('https://github.com')},
description=""" Allow to fork or clone any Google repository for users that have > 50 and < 999 stars and came from Github """
)
This JSON has fields which are either unclear (like "ci") or not user friendly (like "py/object"). I think this can be ressolved by using a better marshalling package like marshmallow. I created an implementation of such in this forked version of the code --> https://github.com/ketgo/pyabac.
Use of objectPath format for attributes in Policy. This object path can be used to eactract the value of the attribute from the Inquiry. In this way we can support nested attribute based access control. For example, if we have the following inquiry
@kolotaev Wanted to propose a couple of features which can enhance the usability and power of the project.
py/objects
fields to keep track of the classes for de-serialization. As an example, the policyhas the following JSON form:
This JSON has fields which are either unclear (like "ci") or not user friendly (like "py/object"). I think this can be ressolved by using a better marshalling package like marshmallow. I created an implementation of such in this forked version of the code --> https://github.com/ketgo/pyabac.
and want to set a policy which includes a rule on city in the adress field, we can do so by following
Here the sting
$.address.city
is in object path format. Again, I have a working implementation in the repo --> https://github.com/ketgo/pyabac.The text was updated successfully, but these errors were encountered: