-
Notifications
You must be signed in to change notification settings - Fork 6
feat: contributor account verification in multiple places #2539
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR strengthens authorization controls by enforcing contributor identity verification across link management operations (suspend, resume, delete, and close). The key security improvement ensures that only the link owner or foundation-allowlisted payers can perform these privileged operations.
- Introduces
payer_in_foundationguard to differentiate between foundation authority and contributor ownership - Adds verification that
link.contributor_pk == contributor_account.keyfor non-foundation operations - Prevents unauthorized contributors from manipulating links they don't own
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| suspend.rs | Added contributor identity verification for link suspension operations |
| resume.rs | Added contributor identity verification for link resumption operations |
| delete.rs | Added contributor identity verification for link deletion operations |
| closeaccount.rs | Added contributor identity verification for link account closure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
smartcontract/programs/doublezero-serviceability/src/processors/link/suspend.rs
Show resolved
Hide resolved
smartcontract/programs/doublezero-serviceability/src/processors/link/resume.rs
Show resolved
Hide resolved
smartcontract/programs/doublezero-serviceability/src/processors/link/delete.rs
Show resolved
Hide resolved
|
@ANISH-SR Please, rebase to main |
aa2a0c8 to
d539866
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
smartcontract/programs/doublezero-serviceability/src/processors/link/suspend.rs
Show resolved
Hide resolved
d539866 to
52ef266
Compare
52ef266 to
e1e531b
Compare
…#2539) ## Summary of Changes * Enforced contributor identity across instructions to ensure contributor_account.key == link.contributor_pk where appropriate. * Preserved foundation/activator authority flows by introducing a payer_in_foundation guard: * Foundation-allowlisted payers bypass the contributor/link equality check in suspend, resume, and delete flows. * Prevents contributors from suspending, resuming, deleting, or closing links they do not own. * Establishes a consistent authorization invariant across all serviceability paths. * Still supports privileged foundation and activator workflows without breaking existing operational flows. ## Testing Verification * Existing unit and integration tests passed after updates. Closes malbeclabs#2213
…#2539) ## Summary of Changes * Enforced contributor identity across instructions to ensure contributor_account.key == link.contributor_pk where appropriate. * Preserved foundation/activator authority flows by introducing a payer_in_foundation guard: * Foundation-allowlisted payers bypass the contributor/link equality check in suspend, resume, and delete flows. * Prevents contributors from suspending, resuming, deleting, or closing links they do not own. * Establishes a consistent authorization invariant across all serviceability paths. * Still supports privileged foundation and activator workflows without breaking existing operational flows. ## Testing Verification * Existing unit and integration tests passed after updates. Closes malbeclabs#2213
Summary of Changes
Testing Verification
Closes #2213