Skip to content

Modeling Authorization Layer, Object Types, and Role-Based Permissions in Warrant #176

Answered by akajla09
vstepanyuk asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @vstepanyuk,

Thanks for the detailed description. If I were to summarize, I believe what you're looking for is a hybrid of fine-grained (object-level) and RBAC (role-based) access control.

First, looking at your example, here's how I'd express a basic 'article' object-type within Warrant:

"article": {
    "owner": {},
    "editor": {
        "inheritIf": "owner"
    },
    "reader": {
        "inheritIf": "editor"
    }
}

This representation defines an 'article' type with 'owner', 'editor' and 'reader' relations (or roles). The inheritIf attribute allows us to specify that any subject (user) having an 'editor' relation to an 'article' also has the 'reader' relation and any subject (u…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@vstepanyuk
Comment options

@akajla09
Comment options

Answer selected by vstepanyuk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants