You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dwedul-figure opened this issue
Apr 27, 2022
· 3 comments
Assignees
Labels
authzCLICommand line interface featureenhancementNew feature or requestepicThis ticket is used for grouping other tickets together.markerMarker ModulemetadataMetadata ModuleprotoProtobuf files work
Create an authorization for use with x/authz that restricts the authorization to a number of uses.
Problem Definition
As an asset owner, I want to give authorization to a grantee that is limited to a certain number of times, so that I can more accurately restrict the authorization.
Proposal
Create a new authorization message that has a uses left count and an underlying authorization.
MsgTypeURL should return the MsgTypeURL of the underlying authorization. Accept should check and update the uses left and also call the Accept of the underlying authorization. ValidateBasic should make sure the uses left is greater than zero and call the underlying authorization's ValidateBasic.
As part of this, we will also want to update all custom uses of authorizations (e.g. in the x/metadata module) to call the Accept method and make sure they allow for this new type of authorization (e.g. aren't limited to a generic authorization). If any such limitations exist, check for this type of authorization, and then limit off of its underlying type. In other words, don't allow this type of authorization without checking the underlying type.
Also, make sure that we can use the provenanced tx authz command stuff to add this new type of authorization.
authzCLICommand line interface featureenhancementNew feature or requestepicThis ticket is used for grouping other tickets together.markerMarker ModulemetadataMetadata ModuleprotoProtobuf files work
Summary
Create an authorization for use with
x/authz
that restricts the authorization to a number of uses.Problem Definition
As an asset owner, I want to give authorization to a grantee that is limited to a certain number of times, so that I can more accurately restrict the authorization.
Proposal
Create a new authorization message that has a uses left count and an underlying authorization.
MsgTypeURL
should return theMsgTypeURL
of the underlying authorization.Accept
should check and update the uses left and also call theAccept
of the underlying authorization.ValidateBasic
should make sure the uses left is greater than zero and call the underlying authorization'sValidateBasic
.This will be similar to the
SendAuthorization
implementation in https://docs.cosmos.network/master/architecture/adr-030-authz-module.html#authorization except with a uses left count instead of coins, and the addition of the underlying authorization.As part of this, we will also want to update all custom uses of authorizations (e.g. in the
x/metadata
module) to call theAccept
method and make sure they allow for this new type of authorization (e.g. aren't limited to a generic authorization). If any such limitations exist, check for this type of authorization, and then limit off of its underlying type. In other words, don't allow this type of authorization without checking the underlying type.Also, make sure that we can use the
provenanced tx authz
command stuff to add this new type of authorization.Subtasks:
Delete
flag. #905For Admin Use
The text was updated successfully, but these errors were encountered: