joebalancio / authzy Goto Github PK
View Code? Open in Web Editor NEWVoting-based Authorization
License: MIT License
Voting-based Authorization
License: MIT License
Should the register
prefix be dropped?
// Register voter
authorizer.voter('is-registered', isRegisteredVoter)
// Retrieve voter
authorizer.voter('is-registered')
// Register poll
authorizer.poll('user', 'view', 'movie', ['is-registered'])
Should constants
by flattened on authzy itself?
authzy.constants.ALLOW
authzy.ALLOW
People need this!
It would be nice to be able to make a decision based on an instance of a subject or resource.
class User {}
class Movie {}
authorizer.registerPoll(User, 'view', Movie, ['access'])
authorizer.decide(new User(), 'view', new Movie())
A poll would be matched if the action
is an instance of User
and the resource
is an instance of Movie
.
I found a previous bug related to a bad unanimous strategy implementation. I need to create tests to validate the current strategies against existing implementations.
Implementations:
There would be a need to use simple voters for create polls, such as a voter that always allow, denies, or abstains.
authorizer.registerPoll('user', 'view', 'movie', [authzy.voters.allow])
authorizer.registerPoll('user', 'update', 'movie', [authzy.voters.deny])
authorizer.registerPoll('user', 'delete', 'movie', [authzy.voters.abstain])
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.