[New Permission 3/4] smartcontract: define topology/resource/index permission flags#3942
Open
juan-malbeclabs wants to merge 1 commit into
Open
[New Permission 3/4] smartcontract: define topology/resource/index permission flags#3942juan-malbeclabs wants to merge 1 commit into
juan-malbeclabs wants to merge 1 commit into
Conversation
…rmission flags Add TOPOLOGY_ADMIN (1<<15), RESOURCE_ADMIN (1<<16), and INDEX_ADMIN (1<<17) to permission_flags, with legacy authorization mapping each to the foundation allowlist in authorize() (plus unit tests). Expose the new names in the serviceability CLI (topology-admin/resource-admin/index-admin) and add the matching constants to the Go, TypeScript, and Python SDKs. Documents the flags in PERMISSION.md and the serviceability README. This defines the permissions; enforcement in the processors lands in 4/4.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TOPOLOGY_ADMIN(1<<15),RESOURCE_ADMIN(1<<16),INDEX_ADMIN(1<<17) — so segment-routing topologies,ResourceExtensionaccounts, and internalIndexaccounts can be delegated without granting the broadFOUNDATIONflag (today they are foundation-only).foundation_allowlistinauthorize()'s legacy path, so authorization behavior is unchanged until aPermissionaccount is supplied.topology-admin/resource-admin/index-admin) in the serviceability CLI forpermission set --add/--remove, and adds matching constants to the Go, TypeScript, and Python SDKs.PERMISSION.mdand the serviceabilityREADME.md.This PR is definition-only; processor enforcement lands in the follow-up 4/4. Stacked on #3206.
Testing Verification
authorize()legacy-mapping unit tests for each new flag (allowed via a foundation member, denied for others).Reference:
smartcontract/programs/doublezero-serviceability/PERMISSION.md