question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[AccessControl] Ability to deny admins from revoking other admins

See original GitHub issue

🧐 Motivation

Suppose we have common roles hierarchy like: Operator Admin => Operators. Operators can do certain daily operations. Operator Admins can manage operators. Admins can also add other admins or renounce themselves. This is OK.

But what if one of admin’s private key leaks to public? In this case, we want to prevent this admin from revoking other admins to maintain a partial control over the system. Otherwise leaked private key can be used to add another hacker’s private key and revoke all other operator admins from the system capturing and sealing hackers permission over operators forever.

So it make it a better permission model to disallow any member to revoke other member of its kind (same role) for the top role in the hierarchy.

BTW

It was the case in the v2.3.0 for Whitelisted Admin role but I am not sure why it was changed: I don’t see the ability for an admin to revoke other admin here: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v2.3.0/contracts/access/roles/WhitelistAdminRole.sol.

It looks like a downgrade in security model.

📝 Details

As far as I understand, AccessControl.sol can not be configured this way right now. We need an addtional configuration option in RoleData like:

 struct RoleData {        
   mapping (address => bool) members;        
   byters32 adminRole;
   bool revokingOtherMembers;    
 }

This option can determine if a member can revoke other member.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Amxxcommented, Jun 8, 2021

@bogdan if you want to try doing contract maintenance/administration easily, and using a multisig transparently, I recommend you check out defender

0reactions
bogdancommented, Jun 8, 2021

I also want to point out that this wouldn’t happen unless operator admins are the role admin for operator admins themselves

Agreed. This can only happen for the top role in the hierarchy.

it should probably only ever be granted to multisig contracts or highly secured keys

This vision is too theoretical. Companies are not made just to be secure, they have to be make money in the first place. If you can make system more secure without creating more operational work - you should take this opportunity even if it is not THAT secure.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deny Domain Admins from folder Take Ownership - TechNet
In regards to "even if that folder had explicitly forbid their account to take ownership.", again, you wont be able to restrict a...
Read more >
Access denied to a folder after removing administrator ...
This is Windows 7, I am administrator on of my PC. On the folder I did right click->properties->security. for the System and Administrators...
Read more >
Access Controls - Gerrit Code Review
This restriction is by design. Granting ownership to another group gives nearly the same level of access as membership in Administrators does, as...
Read more >
User, Group and Access Rights Administration
Avoid using a Deny statement. Group principals are evaluated in order, both within the hierarchy and order within a single access control list....
Read more >
Data object privileges | Databricks on AWS
It also describes how to grant, deny, and revoke object privileges. ... An administrator must enable and enforce table access control for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found