Repository navigation
feat: prove new SIWE identifiers with recovery mutations - #11151
Conversation
325168d to
8e5ddad
Compare
3c2e40c to
77ec26a
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Send identifierAuthorizations as a list sharing one challenge per escrow (escrow #7): one proof per SIWE identifier the escrow has not enrolled, plus the enrolled-identifier proof for updates. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
8e373aa to
023dfc5
Compare
cc92526 to
3d6bb9b
Compare
|
@metamaskbot publish-preview |
|
The two-identifier minimum can be bypassed with SIWE address casing. The new code treats SIWE addresses as case-insensitive when matching enrolled identifiers. But countDistinctIdentifiers and isApprovedSubset still compare exact strings. So register(secret, [WALLET, walletLowercase]) passes the MIN_IDENTIFIERS check locally even though it's one wallet. |
|
The SIWE namespace check accepts junk. getSiweNamespace runs String() on whatever the verifier holds. A verifier of {} with namespace "undefined:undefined" passes register (confirmed). It should require domain to be a non-empty string and chainId to be a positive integer. It should also reject a domain that contains a colon, which would make domain:chainId ambiguous. |
fixed here |
fixed here |
…e-enrollment Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # packages/mfa-recovery-controller/CHANGELOG.md # packages/mfa-recovery-controller/src/MfaRecoveryController.ts # packages/mfa-recovery-controller/src/escrow-providers/cubist-escrow-provider.test.ts # packages/mfa-recovery-controller/src/escrow-providers/cubist-escrow-provider.ts # packages/mfa-recovery-controller/src/identifier-auth.ts
|
A mutation can get stuck with no way out. PR https://github.com/consensys-vertical-apps/cubist-secret-escrow/pull/7 rejects malformed SIWE input with an error, not a deny. The core client then leaves the operation in the writing phase, where abort() isn't allowed and resume() keeps failing. These cases hit it: The same address twice in different case. |
|
@metamaskbot publisth-preview |
Co-authored-by: Cursor <cursoragent@cursor.com>
fixed here |
Co-authored-by: Cursor <cursoragent@cursor.com>
|
nits: If the app calls resume() automatically, for example on unlock or at startup, each attempt does this: It asks for a new approval, which means another MFA prompt. |
|
nits |
fixed here |
fixed here |
|
nits: |
## Explanation - Add `RecoveryRegistrationLockProvider` and `acquireLock` / `renewLock` / `releaseLock`. - Acquire or renew the lease before every approval. The 6-minute lease outlives the 5-minute approval, and escrows reject expired approvals, so another operation can only take the lease once this one's approvals are dead. - Persist `lockId` so retries and restarts reuse the lease. Release is blocked while a mutation is pending. Client flow: `acquireLock` → read → change Auth identifiers → mutate / `resume` → `releaseLock`. ## References - Stacked on MetaMask#11151 - Registration API: consensys-vertical-apps/va-mmcx-recovery-registration-service-api#21 --------- Co-authored-by: Cursor <cursoragent@cursor.com>
Explanation
Stacked on #11149. SIWE wallets prove control themselves (Auth doesn't vouch for them).
applyMutationtakesIdentifierAuthorization[], sharing one challenge per escrow.register. SIWE is exempt from theapprovedIdentifierscheck.References
Checklist