DelegateAuthenticator: accept operational actors (Scopes.isOperator) - #84
Open
chunter-cb wants to merge 2 commits into
Open
DelegateAuthenticator: accept operational actors (Scopes.isOperator)#84chunter-cb wants to merge 2 commits into
chunter-cb wants to merge 2 commits into
Conversation
Update the deployment salt after the SessionPolicy bytecode changed so its canonical address retains the 0x8130...5e55 pattern.
Previously a delegate vouch required the nested actor to be admin (scope == 0x00). Align the vouch with the account's execution/ERC-1271 authority by accepting any operational actor per Scopes.isOperator, i.e. admin or a SENDER actor that is not POLICY-gated. POLICY-gated and capability-only actors remain non-operational and still revert InvalidNestedSignature.
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
DelegateAuthenticatorso a delegate vouch accepts any operational nested actor viaScopes.isOperator, instead of requiring admin scope (scope == 0x00) only.scope == 0) or aSENDERactor that is notPOLICY-gated — the same authority that can drive execution and sign (ERC-1271) as the account (seeDefaultAccount). This aligns delegate vouching with the account's execution/signing authorization surface.POLICY-gated actors and capability-only actors (e.g.NONCE/SELF_PAYER/SPONSOR_PAYER) remain non-operational and still revert withInvalidNestedSignature.Changes
src/authenticators/DelegateAuthenticator.sol: importScopes; replaceif (nestedScope != 0)withif (!Scopes.isOperator(nestedScope)); update docs/error comment.test/unit/authenticators/DelegateAuthenticator.t.sol:operationalSenderCannotVouchregression intotest_authenticate_success_operationalSenderVouches(SENDER actor now vouches and returns the delegate actorId).test_authenticate_revert_nestedSignerIsScopedto fuzz only non-operational scopes (clearsSENDERandPOLICY).Test plan
forge buildforge test --match-path test/unit/authenticators/DelegateAuthenticator.t.sol(8 passed)forge testfull suite (387 passed, 0 failed)