Skip to content

Order of permissions in ACL matters in overlapping principals #21

@mabagoury

Description

@mabagoury

In the add_items endpoint, the ACL to be checked is:

NewItemAcl = [(Deny, "user:bob", "create"), (Allow, Authenticated, "create")]

You can see that user bob has 2 principals (user:bob and Authenticated) mentioned with the required permission: create in the ACL. But the actions collide. One principal allows access. The other denies it.
So, what is the final result when Bob tries to add an item? With the ACL above, he is denied access. But if you just change the order of tuples in the list to be the following:

NewItemAcl = [(Allow, Authenticated, "create"), (Deny, "user:bob", "create")]

He will be granted access!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions