Repository navigation
fix(auth,core): client keys, reset budget, waitlist notice, audit deployment advisories - #604
Merged
Merged
Conversation
…eployment advisories - auth: a password reset clears the account-wide `login:password:<email>` attempt budget instead of a key that is no longer written (#546). - core/auth: rate-limit client keys group an IPv6 client by its /64 and an IPv4-mapped address as IPv4. Core's throttle uses clientKey from client-address.ts; auth keeps an equivalent helper so it still runs on every core its peer range allows. Both are pinned to shared vectors in test/client-key-vectors.json (#547). - auth: in waitlist mode the duplicate-address registration notice is no longer awaited before replying (#548, part b). - core: `urlcode audit` reports deploymentAdvisories for a client-partitioned throttle without declared trusted proxies and for --metrics on the public listener; audit takes --trusted-proxies/--metrics to describe the deployment (#575). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Sep 23, 2026
jimhoyd
added a commit
that referenced
this pull request
Sep 24, 2026
…on; scope sign-in-code issuance per client (#548) (#641) (a) A duplicate /register returned the same generic 201 body as a genuine registration, but also set a session cookie built from a token that was never persisted server-side. The cookie looked valid while authenticating nothing, so a caller could still tell new-signup from existing-email by attempting an authenticated request with it. Duplicate registration now keeps the same status/body but omits the session cookie entirely, clearing only the anonymous flow cookie like the genuine path already does. (c) Per-email sign-in code issuance had a 20/day cap with no scope on the caller, so a single client could alone exhaust — or, since a fresh code invalidates whichever one is in flight, alone keep cancelling — another account's codes. A trusted client now also gets its own tighter per-email daily budget, alongside the existing per-email cap, mirroring the client-scoped budget already used for password guesses (#547). Part (b) of #548 (the waitlist duplicate-notice timing signal) already landed in #604. Co-authored-by: Claude Opus 5.5 <[email protected]>
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
login:password:<email>, hashed as elsewhere) instead of a key that is no longer written. Client-scoped keys are left to expire. Regression test: many clients exhaust the account-wide budget, the password is reset, and sign-in succeeds immediately. The test fails without the fix.clientKey()inpackages/core/src/client-address.ts, used by the throttleclientandclient-routepartitions.packages/auth/src/client-key.tsdoes the same job for the per-client password budget and the abuse-policyclientandsignupClientlimits. Auth keeps its own copy because importing a new core export would break auth on the cores its peer range (>=0.5.0) still allows (seescripts/peer-api.ts). Both implementations are pinned to the shared vectors intest/client-key-vectors.json.docs/policies/operations.md,docs/policies/throttle.md,packages/auth/README.md.notice()was already best-effort and swallows delivery errors. Test: when the notice sender blocks, the duplicate still gets a 202 quickly. That test fails with the oldawait. Parts (a) and (c) are unchanged and still need a decision.urlcode auditreports a new non-blocking field,deploymentAdvisories:client-throttle-without-trusted-proxies: lists the routes with client-partitioned throttles when no trusted proxies are declared.metrics-on-public-listener: raised when--metricsis declared.auditnow accepts theserveflags--trusted-proxiesand--metricsto describe the deployment under review; its own probe server applies neither. JS API:auditProject(app, { deployment }).docs/READINESS.md#deployment-advisoriesanddocs/MONITORING.md. No separate metrics bind address was added.Changeset:
.changeset/auth-client-keys-reset-budget.md(auth patch).Verification
npm run verify: passed. Core 779, ui 91, auth 219, admin 67, store 32, forms 7 and workspace integration tests, all with 0 failures.npm run test:package: passed.npm run check:docs: passed.urlcode audit --metricson a throttled project reports both advisories, and--trusted-proxies 10.0.0.0/8clears them.readyis unaffected.These are local synthetic checks. They are not an independent security review.
Closes #546
Closes #547
Closes #575
Refs #548
🤖 Generated with Claude Code