-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate Ownable to Roles #1146
Comments
I am in favor of replacing Ownable with RBACOwnable. For people who feel strongly about using the simple Ownable, they can always install a pre-2.0 version of openzeppelin-solidity. And I think this is a momento to start thinking about extensibility and more interesting use cases for ethereum contracts. This is what an API designed on top of RBAC give us. |
I'm in favor of switching to RBAC as described. Only concern is that Ownable as a "single account that has admin permissions with minimal code" is a useful concept. Perhaps we could change it to |
I'm in favor of replacing To explain a bit further, the idea here is to change all the contracts that currently provide There are a couple of outstanding problems that we need to resolve.
Regarding the second point. Currently A first alternative is to have a Another one is to have something like a "role descriptor" These are just some ideas. |
The current proposed changeset is as follows:
|
I'm not sure there's a default behavior that is both universally useful and not a security concern. Something like RBACWithAdmin is useful out of the box, but defining the management API of your access control layer is very much an application-specific problem. It feels like the best middle ground i stuff like RBACOwnable, RBACMintable, RBACHeritable, etc etc where we pre-code the access control layer CRUD operations for specific applications of RBAC.
probably the best option before abiencoderv2 ships
what about "pinned"? i.e. "escrow is pinned to pull payment." |
I definitely agree. The thing that's missing that would be universally useful and secure is a way to set up an initial assignment of roles on deployment. It's one of the points that @nventuro wrote down though. |
Regarding names for "true ownership"... what about |
"private owner" could work.. We could take a term from the military and use "commander": escrow's commander is pull payment. Or from computing and use "master/slave": escrow is slave to pull payment. |
Not a fan of 'commander', the other contract isn't really taking commands IMO. Also, the industry has moved a bit away from the 'master/slave/ terminology, since it doesn't evoke the happiest feelings. |
Yup yup. The perspective on that master/slave terminology is a little odd, but those arguments have been well documented. How about we keep |
With the 2.0 release coming soon, we want to stabilize as much of our API as possible, and in the process reduce the attack surface of our contracts. It's been pointed out that
RBACOwnable
is very similar toOwnable
and could easily replace it, providing future extensibility, at the cost of added complexity.We need to decide whether to keep both contracts or remove
Ownable
altogether from the codebase (which would impact some contracts likeHeritable
). I personally think this duplication is a mistake, which has caused theowner
concept to extend to places where it doesn't belong (e.g.Mintable
), and that we'd benefit greatly from the role semantics (minter
,burner
, etc.). This would also mean dropping theRBAC
prefix from multiple contracts, since that's our standard role solution (e.g.RBACOwnable
andRBACMintable
would simply beOwnable
andMintable
).This is a place to discuss whether or not we want to do this: if consensus is reached and we decide to move forward, we'll also need to settle on a design for the affected contracts (like
Inheritable
).Resolves #366.
The text was updated successfully, but these errors were encountered: