smartcontract: allow reservation authority to manage access passes#3262
Draft
smartcontract: allow reservation authority to manage access passes#3262
Conversation
…d multicast allowlists The reservation authority key can now create/close access passes and add entries to multicast group publisher/subscriber allowlists. For subscriber allowlist operations, the reservation authority is also permitted to operate on access passes with a different user_payer than the one stored in the access pass. The legacy authorization mappings in authorize.rs are updated so ACCESS_PASS_ADMIN and MULTICAST_ADMIN flags also accept the reservation_authority_pk.
Reservation authority can only update, close, or modify multicast allowlists on access passes it owns (i.e., access passes it created).
…operations Reservation authority should only have access to access pass create/update/close, not multicast group allowlist add/remove operations.
d360da8 to
6323d6a
Compare
…iber allowlist Reservation authority can add subscriber allowlist entries on access passes they own, including with a different user_payer than the access pass.
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 of Changes
reservation_authority_pk) can now create, update, and close access passesownermatches the reservation key, preventing it from modifying foundation-created passesACCESS_PASS_ADMINlegacy permission mapping updated to includereservation_authority_pkDiff Breakdown
Core-heavy change with strong test coverage for all new permission paths.
Key files (click to expand)
smartcontract/programs/doublezero-serviceability/tests/accesspass_test.rs— 3 integration tests: create, close (owned), close (not-owned fails)smartcontract/programs/doublezero-serviceability/src/authorize.rs— addedreservation_authority_pktoACCESS_PASS_ADMINlegacy mapping + unit testsmartcontract/programs/doublezero-serviceability/src/processors/accesspass/set.rs— added reservation authority to auth check + ownership guard on update pathsmartcontract/programs/doublezero-serviceability/src/processors/accesspass/close.rs— added reservation authority to auth check + ownership guard on close pathTesting Verification
ACCESS_PASS_ADMINlegacy authorization via reservation authorityCustom(8)/NotAllowed)cargo test -p doublezero-serviceabilitypasses (229 unit + all integration tests)