Skip to content
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

Allow AccessConfig to use a list of addresses instead of just a single address #945

Closed
sunnya97 opened this issue Aug 16, 2022 · 2 comments · Fixed by #974
Closed

Allow AccessConfig to use a list of addresses instead of just a single address #945

sunnya97 opened this issue Aug 16, 2022 · 2 comments · Fixed by #974
Assignees
Milestone

Comments

@sunnya97
Copy link
Member

sunnya97 commented Aug 16, 2022

Currently the AccessConfig allows for a single address to be given for use with ACCESS_TYPE_ONLY_ADDRESS. However, often times we might want to have a set of addresses be given a certain access control. For example, in a chain with permissioned code upload, we may want to give a list of trusted actors the ability to upload code without going through the governance process.

We should make a new AccessType called ACCESS_TYPE_ONLY_ADDRESSES that allows for a list of addresses instead of just a single one.

We could achieve something like this with authz, but a proper whitelist is cleaner and can be fully controlled by governance rather than the original grantee.

@sunnya97 sunnya97 changed the title Allow AccessConfig to use a list of addresses instead of a single address Allow AccessConfig to use a list of addresses instead of just a single address Aug 16, 2022
@ethanfrey ethanfrey added this to the v0.29.0 milestone Aug 16, 2022
@ethanfrey
Copy link
Member

I agree with the requirements as a useful, backwards compatible addition for permissioned cosmwasm chains.

I would propose using ACCESS_TYPE_ANY_OF to signify any of the listed addresses can upload code alone. (only addresses could imply any or all must sign)

@alpe alpe self-assigned this Sep 1, 2022
@alpe
Copy link
Member

alpe commented Sep 1, 2022

This makes sense for me, too and I actually had this in a very early version once. My question would be: to do this with or without state migration?
I can easily add another field to the [AccessType](https://github.com/CosmWasm/wasmd/blob/main/proto/cosmwasm/wasm/v1/types.proto#L40] for a set of addresses or modify it to repeated string which feels like the cleaner option for state and api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants