Repository navigation
fix(account): gate M1, M2 and M3 with hardening: product pin on the verified DID, a viewer address on every request, fresh device-bound genesis with a notice, no tokens for deleted accounts - #191
Merged
Conversation
…erified DID, a viewer address on every request, fresh device-bound genesis with a notice, no tokens for deleted accounts, fail-closed stage, named SSM grant
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
WillCybertron
added a commit
that referenced
this pull request
Nov 12, 2026
…dds, which every request needs since #191
WillCybertron
added a commit
that referenced
this pull request
Nov 12, 2026
…gn-in for the root passkey, grant resend, decoy parity, method.add bound to its identity, ordered Apple notices (#193) M7, M2 (sign-in part), the deleted-account login code, email decoy and grant delivery leads, and two hardening items, each with a regression test (docs/mobile/review/GATE-FIXES.md in the meta repo). The browser checks now set the viewer address that every request needs since #191.
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.
Day 6 review gate (
docs/mobile/review/GATE-REPORT.mdin the meta repo), Account-core part 1 of 3: M1, M2 (key log), M3, the deleted-account lead and three hardening items. Each fix has a test that fails without it.M1, the product signer pin (
rfc9421.ts)keyidanywhere inSignature-Input, while the SDK verifies onlysig1. A decoy member naming a product made adid:keysigner pass as that product.PRODUCT_DIDS, or a staging test product. The regex is gone.unknown_signer.signatures.test.ts"gate M1: a decoy Signature-Input member…" answered 200 before this change and 403 now.M3, one rate-limit bucket for every caller (
http.tsipOf,account-stack.ts)allExcepttakes no CloudFront headers,allViewerAndWhitelistCloudFrontforwards Host, and a whitelist cannot carryAuthorizationwith caching disabled.x-oe-viewer-addressfromevent.viewer.ip, overwriting any value a client sends, and the existing policy forwards it.ipOfreads that header and refuses with 503unavailablewithout it, instead of counting under0.0.0.0.gate.test.ts(no header is 503; two addresses have separate buckets) and a stack test that the function is on the only behavior.scripts/account-check.shposts/v1/installs, which needs the address, and expects 201.M2, the key log part (
keylog.ts; the passkey registration part is Account-web's)reauth_required.binding_required).keylog.genesis) and email.freshSignInandREAUTH_WINDOWmove tohttp.ts; account deletion uses the same check.gate.test.ts, three checks, each failing without its line.Lead: product tokens for a deleted account (
sessions.ts)accessTokenandrotaterefuse an account withdeleted_at. That also covers a login code redeemed after deletion and a sign-in that raced it.gate.test.ts, with a session opened after the deletion.Hardening
lambda.tsrefuses to start on aSTAGEother than production or staging. Before, it ran as staging. Test: the handler rejects withSTAGE=prod.params.tslists them, and bothlambda.tsand the stack use that list, as the forwarder does. Before, it could read every/openentity/account/*parameter.PARAM_SUFFIXvariable is gone.Contract:
POST /o/{id}/loglistsreauth_requiredand productionbinding_requiredfor genesis.Tests: account 184 pass, infra account stack 17 pass. Every guard was checked by removing it.
scripts/verify.shis green in the pre-push hook.