Consistent ability to remove admin & privileged keys #522
Replies: 2 comments 10 replies
-
@Cooper-Kunz @bugbytesinc apologies, I've only just seen this discussion. I recently submitted a HIP proposal which is almost identical to yours! #540 I had a chat with @mgarbs and he suggested linking back to this discussion from the HIP I've submitted. Shall we combine forces and get this pushed through? I was mainly focussing on HTS but you raise a good point with contracts having the same issue. I'll update the HIP to reflect the contract admin key removal as well. Please also feel free to jump in and add comments/suggestions. @Ashe-Oro and @mgarbs have also been helping get it into a review state. |
Beta Was this translation helpful? Give feedback.
-
Agreed with everything in here! |
Beta Was this translation helpful? Give feedback.
-
Authors
Cooper Kunz
Jason Fabritz
Abstract
All entities across Hedera have opt-in administrative keys. Currently, the Consensus Service and File service allow these keys to be removed (making the entities immutable). However the Contract and Token Services do not provide such a feature consistently. We should enable existing administrative keys and other privileged keys for these entities to be able to sign an update transaction that permanently removes the keys from their privileged permissions.
Motivation
Less admins > More admins. Give folks tools to decentralize yourself over time.
Rationale
Currently you’re either in an admin world, or an admin-less world, on Hedera. It’s often preferable to launch in an administrative capacity to ensure things are operating smoothly, and transition into a more admin-less world overtime.
Specification
Adding this feature requires no changes in existing HAPI protobuf structure, as the respective update transaction body messages already in existence provide the required properties to represent the desired behavior.
All that is required is for the Hedera Network to recognize an Empty KeyList key as a sentinel value to indicate that the key should be removed from the entity. The following keys shall support this feature:
For token entities, the following TokenUpdateTransactionBody message properties:
For contracts, the following ContractUpdateTransactionBody message properties:
Additionally, in order to facilitate a progressive transition to immutability, for an entity, once a key has been removed from a contract or token definition, it may not be put back. In other words, a key, such as a mint key can be swapped for any other existing key (assuming the object has an admin key of course), including erasing the key from the definition. But once a key has been erased, it may not be added later.
It should be allowed to remove the adminKey from an entity within the same transaction that removes another type of key (a wipeKey for example), so long as the entity had a valid adminKey prior to executing said transaction.
Backward compatibility
This change is fully backwards compatible & opt-in. Existing entities that have been created with administrative keys can continue operating as desired. Entities that have been created without administrative keys can continue operating as desired. The use of an empty KeyList in an update transaction for these entities currently generates an error response, enabling it to represent a sentry value will be forward compatible.
Security Implications
Generally with administrative keys there are security requirements about how to secure and manage these secrets. This becomes increasingly important with this change, as a potential attacker could gain access to the admin keys and subsequently remove them from the entity - however, this would effectively lock/freeze them out, as it would the original administrator. These security considerations are not unique to this proposal and generally consistent with all keys attached to entities within the Hedera network.
How to Teach This
If you want to remove an admin or privileged key from any Hedera network entity, you can submit an AccountUpdateTransaction that replaces the existing key with an empty KeyList - this transaction will result in an entity no longer having an admin (or whatever key was hoping to be replaced).
Beta Was this translation helpful? Give feedback.
All reactions