S1 lane: auth (setup token, passkeys with PRF, recovery key, sessions) #17
Closed
opened 2026-10-06 10:10:50 +00:00 by kayg
·
21 comments
No Branch/Tag specified
main
j470b-server-mesh-rejoin
mesh-compat-382
j444b-d381-key-wins-flood
j461b-macos-utun-reader-thread
j475b-remove-host-motion
fix-reconnect-new-link
j481-d380
dev
j479-mesh-soak
fix/j476-host-facts
j475-motion-pill-split
j470-mac-node-join
root-upgrade-d376
j474-review-merge
latency-targets-120hz
nightly-suite-shards
gotatun-pin-j469
macos-utun-reader-thread
fix-flood-echo-stall
wip/j416
motion-fast-ease-out
mesh-addhost-j259
takeover-close-terminals-d368
kbd-instant-followups
fix-trust-key-double-click
nightly-suite-partial-report
appwin-icons-j207
rusqlite-slice1
swipe-content-first-d374
mesh-mtu-381
addhost-instant-open
glass-contrast-d365-mock
glass-contrast-d365
signout-followups-442
fix-startup-toast-red
research-gotatun-matrix-j317
themes-sync-j304
fix-load-flakes
fix-nix-zig-patch
fix-compute01-browser-baseline
ratchet-size-baseline-419
predict-auto-d130
revoke-coverage-d367
nightly-suite-queue-timeout
nightly-browser-suite
fix-rustsec-2026-0459
fonts-ioskeley-obel
log-retention-d375
fix-kbd-no-anim-427
fix-dev-red-specs-2
takeover-proof-305-j205
wip/j410-server-pump
ui-consistency-d372
fix-osc52-clipboard
libghostty-vt-1.0
forget-retired-host-d369
j404-merge-426
fix-setup-lock-race
fix-touch-select-426
revoke-access-report-ui
fix-predictive-echo-specs
fix-selinux-agent-exec
wip/j395-checkpoint2
wip/j395
j391-review-scratch
ui-consistency-j195-deferred-rebased
fix-rustc-paths-421
decisions-wording-341
fix-install-suite-red
fix-dev-rtt-specs
fix-pending-removal-align
fix-privileged-skip
fix-install-suite-404
review-j368
mesh-dns-j254
revoke-access-report-d356b
revoke-privilege-round5
fix-removal-confirm
review-j360
gotatun-rotation-367
deps-refresh-340
review-j354
review-J351
review-j350
addhost-takeover-d359
revoke-report-items-347
revoke-end-sessions-d362
review-j348
size-mesh-ssh-346
size-trim-337
revoke-access-diff-d356
j259-pre-rebase-b06c5a6
j305-ended-at-start-spec
addhost-sudo-consent
fix-layout-real-specs-411
fix-shell-open-411
fix-console-hosts-373
fix-shell-exit
fuzz-host-name-353
fix-host-details-410
macos-filter-j197
research-gotatun-tricks
revoke-p3-j216l
stale-state-pill
revoke-followups-j216k
revoke-progress-j216e
backup/macos01-20261106/lume/j197
backup/macos01-20261106/lume/appwin-icons-j207-stash0
backup/macos01-20261106/claude/stash-0
backup/macos01-20261106/claude/stash-1
backup/macos01-20261106/claude/J80-macos-s1
backup/macos01-20261106/claude/J80
backup/macos01-20261106/claude/J80-slice1-20261102
backup/macos01-20261106/claude/J16b-appwin-on-dev
backup/macos01-20261106/claude/appwin-launch-idle-146
backup/macos01-20261106/claude/J80-s1-run
wip/j259
trust-285-p3c
runtime-lock-j216f
mesh-ssh-p3-j175
tun-proof-p3b
trust-285-p3
terminal-polish-j271
tun-proof-p3
ssh-install-flakes-j216i
fuzz-fixes-j264
trust-285-a
trust-285-b
restart-oversized-fixture-j198
backup/macos01-20261106/lume/appwin-icons-j207
restart-bound-j216h
up-preflight-p3-j198
backup/macos01-20261106/lume/j251
up-preflight-j198
wip/up-preflight-j198-j245-p2
wip/up-preflight-j198-j245-p1
agent-fsync-offloop-j196
wip/up-preflight-j198-j245
settings-offscreen-j231
wip/up-preflight-j198-j226-inspection
wip/j103f
themes-j206
wip/up-preflight-j198-j226
flakes-j216c
backup/macos01-20261106/claude/j197
flakes-j216b
backup/macos01-20261106/claude/j197-red
wip/up-preflight-j198-review
flakes-j216
backup/macos01-20261106/claude/appwin-icons-j207
engineering-j208b
appwin-mock-j209
toast-stack-j165
engineering-j208
decisions-d351
decisions-d350
decisions-d349
appearance-presets-mock-j129
decisions-d348
docs-audit-spec
doc-coverage-baseline-raise
decisions-d347
decisions-d346b
decisions-d346
j88h-profile
ui-consistency-j195-deferred
ui-consistency-j195
engineering-practices-j194
preferred-login-ui-j166
signin-pools-263-j174
macos-node-265-s1
decisions-d345
decisions-d344
proxy-cgroup-j164
verify-quick-fuzz-329
proxy-start-io-j168
timing-flakes-j163
up-263-s1
mcp-events-j147
verify-quick-fuzz-j158
proxy-p3-j159
agent-resource-j157-detect
wip/j103d-final
remote-cancel-hang-j155
proxy-traefik-281-j62d
j149-verify-quick
proxy-traefik-281-j62b
j150-drop-unnamed
wip/j79d-red-r4
wip/j103d-d332
rootless-toast-j142
wip/j103d-head
wip/j103d
j125c-mcp
macos-build-j136
backup/macos01-20261106/claude/j136
wip/j79d-red-cli
wip/j79d-red-server
j121-link-liveness
j118c-tracer-failures
wip/j79c-head
release-desktop-j131
j124c-signed-macos
wip/j79c-red-p3
wip/j79c-red-p23
wip/j79c-red-p22
merge-j128-check
perf-deferred-j128
sidebar-toggle-260
j127-shortcut-changed-dot
j125-mcp
j118-tracer-failures
j126-account-summary
settings-sections-mock-j92
j120-pinch-lock
sidebar-292
backup/macos01-20261106/claude/j120
taste-2026-11-03
row-actions-242-215
backup/macos01-20261106/claude/stash-0-untracked
backup/macos01-20261106/claude/J80-265-s1-run
backup/macos01-20261106/claude/J80-macos-s1-20261102
j112-canvas-commands
ui-no-overshoot-scroll
fix-recovery-restart
backup/macos01-20261106/claude/stash-1-untracked
taste-2026-11-02
size-baseline-ratchet
machine-cards-structure-j108
j109-boot-copy-mockups
fix-dev-red
wip/up-263-s1
j95b-settings-rows
proxy-traefik-281
j95-option-rows
docs-human-j91
docs-keys-palette
fix-flood-1013-270-j38d
mesh-ssh-s1
mesh-ssh-s0
addhost-d291-tunnel
test-stability-load
mesh-relay-220
repro-296
shim-thp-off-24
mesh-pins-258-v2
mesh-dns
signin-d311-merged
docs-pages
ui-size-283
fix-ui-batch-specs
wip/j12b-edge-update
gate-on-arm
fix-rename-sync-293
trust-285-j60b
fix-focus-ring-clip
integ-ui-1101
edge-update-v2
signin-d311
taste-2026-11-01
layout-per-tab-250
ui-approved-splitopt-224
ui-approved-splitopt-224-on-dev
icon-text-centre-282
ui-approved-189-212-216
research-reverse-proxy
transfer-budget-320
review-mesh-pins-258-r2
sidebar-pill-259
review-mesh-relay-220
wip/j12-edge-update-v2
nix-package
status-crash-loop-237
fix-dev-test-failures
fix-fixture-socket-path
wip/mesh-relay-220-pre-dev-advance-rebase
fix-canvas-side-clip
research-head-to-head
frosted-real-256
review-mesh-pins-258
wip/mesh-relay-220-pre-final-rebase
review-layout-per-tab-250-r2
broad-suite-triage
nix-devshell
review-status-crash-loop-237-r3
wip/nix-devshell-pre-p3
taste-frosted-real
wip/code-serve-demo-2026-10-30
wip/code-serve-glass-2026-10-30
wip/code-serve-clusters-2026-10-30
wip/code-merge-release94-dev-2026-10-30
wip/rproxy-delta-scratch-2026-10-30
wip/stale-note-257-staged-2026-10-30
wip/d241-size-staged-2026-10-30
review-broad-suite-207
wip/mesh-pins-258-pre-split
wip/mesh-relay-220-pre-rebase
mesh-measure-220
plan-211-update
review-edge-autoupdate-r3
perf24-reconnect
review-stale-note-r2
release-prod-live
d241-shell-marker
review-mesh-pins-server-258
review-revocation-r3
review-setup-token-r2
review-sync-journal-r3
wip/review-mesh-pins-258-prune-review-1995fee46
frosted-scroll-256
sync-journal-r3
revocation-per-account-wip
review-tokio-asyncfd-0386
review-sync-p3s
wip/stash-8by64-stash0-2026-10-30
mesh-drag-r2
setup-token-data-wip
release-9-4
auth-busy-1013
mesh-view-overlap
sync-p3s
review-auth-busy-wake
review-readd-r8-wip
mesh-drag-bounds
audit-auth-93
app-windows-stream-start
review-authority-cap-r3
app-windows-r7-measure
readd-minimal-r6
readd-minimal-r5
app-windows-r7-soak
readd-minimal-r4
app-windows-r7
app-windows-r6
readd-minimal-r3
readd-minimal-r2
readd-minimal
merge-release8-dev
review-busy-page-liveness-r2
review-busy-page-liveness
mesh-view-trim
review-authority-read-retry-r2
review-remove-uninstall-r2
release-retry-reattach
release-retry
review-remove-uninstall
review-authority-read-retry
app-windows-ship
mesh-autoswitch-p2
mesh-ssh
mesh-relay
mesh-macos-node
screen-and-control
session-labels
review-real-logins-r5
review-real-logins-r4
review-real-logins-r3
shim-memory-r2
review-real-logins-r2
shim-memory
shadow-addhost-instant
shadow-real-logins
shadow-same-session-flood
shadow-prod-perf-fix
hosts-from-server
app-windows-real
app-windows-transport
release-prod-6w
mesh-policy-verify
quiet-close-toast
dev-merge-r4
review-mesh-agent-transport
review-app-windows-transport
settings-roundtrip
review-release-pipeline-r4
mesh-agent-transport
ended-strip-fix
review-audit-ca-update-d244
settings-rows
phone-width
signout-clear
fix-restart-tests
dev-merge-rp
signer-hardening
review-audit-ca-update
terminal-fidelity
review-audit-ca-update-wip
mesh-integrate
review-mesh-agent-transport-515d3712
review-mesh-dataplane-feec1988
mesh-dataplane
signout
research-canvas-node
wip/review-renderer-cost
wip/review-terminal-fidelity
padlock-glyph
review-release-pipeline-2e95b689
phone-polish
sidebar-polish
inbox-generic
review-mesh-dataplane-378d4055
prod-batch
ui-inbox
ui-ca-unlock
ui-machine-sections
review-mesh-dataplane-a5f744fb
tls-session-prod
session-bounds-prod
fix-dead-session
session-bounds
tls-session
palette-polish
shortcuts-d222
research-appmeta
phone-gutter
ui-centre-button
wip/ui-centre-button
wip/tls-session
review-addhost-breakit
ui-platform
renderer-cost
remote-agents
mesh-api
ssh-bootstrap
prod-hotfix2
prod-fixes
review-remote-agents
review-mesh-dataplane
session-life
research-browser
review-mesh-api
research-capture
review-mesh-api-round3
review-mesh-api-round1
gate-stability
review-gate-stability
review-relay-direct
review-mesh-api-findings
proto-sessions
font-picker
proto-addhost
proto-windows
mesh-core
latency-gate
research-bsd
research-discovery
keytray-mods
mock-core
ui-tweaks
fix-motion-sel
fix-motion
integrate2
fix-robust
t-web
t-server
vt-ghostty
fix-snap-echo
t-web-auth
review-vt2
t-agent
lane-protocol
lane-shim
lane-auth
s1-base
s1-contracts
s1-workspace
No results found.
No labels
launch-qa
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
kayg/infraternal#17
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Decisions 24–28, 53: the first-run setup token, passkey registration and login (WebAuthn, PRF for key wrapping), the 24-word recovery key with a 24 h delay, 30-day sliding sessions, and device API keys. Storage in SQLite through sqlx. Base:
s1-base386acfd. Part of #9.Starting auth lane on branch lane-auth, base
386acfd. Reading decisions 23–29 and 53 and the scaffold before implementing; defensive review and ceremony/storage tests will accompany the change.Defensive review finding: webauthn-rs 0.5.5 passkey API enforces UV but omits PRF and requests nonresident credentials (upstream src/lib.rs start_passkey_registration). Browser options now request residentKey=required and PRF; finish rejects PRF results. Tests use real ES256 signatures/CBOR and a browser PRF double, with wrong-origin, UV, replay, delay/cancel cases. Build prerequisite finding: vendored OpenSSL fails with Command make not found in the lane shell; resolving worktree-local tooling before the required gate.
Defensive review: all 9 auth tests pass (14.02s debug); real ES256/CBOR ceremonies reject replay, wrong origin, missing UV, stale counters, wrong userHandle, and leaked PRF output. Concurrent owner/second-passkey enrollment accepts exactly one finish. Recovery cancellation invalidates begun enrollment; replacement revokes sessions/API keys, rejects old credentials/words, and cross-user wrap listing returns no other user data. Paths: crates/infraternal-server/src/auth/tests.rs and migrations/0001_auth.sql. Preliminary debug SQLite memory session n=200 p50=218us/p99=521us, Argon2id verification 540ms; optimized measurement is running. cargo-deny now passes with reviewed AGPL-compatible MPL-2.0/CC0/BSD-3-Clause/Zlib dependencies; webauthn-rs is pinned to its safe passkey API.
Defensive review finding: cookie sliding must refresh Max-Age on each successful cookie-authenticated HTTP action, rather than only updating SQLite expiry. Fixed in src/auth/http.rs with an HTTP wraps test. JSON parsing errors are redacted to prevent caller logs echoing submitted strings; cancellation rechecks session liveness under the replacement writer lock. Optimized benchmark evidence: n=200 SQLite memory session p50=91us p99=253us; Argon2id m=19456KiB,t=2,p=1 verification=31ms. Command: cargo test --release -p infraternal-server http_csrf_cookie_flags_body_limit_and_latency_evidence -- --nocapture; output target/auth-release-bench.log. This measures host storage/CPU, not network/browser time. Running the required final gate after the hardening edits.
Finished auth library lane on branch lane-auth.
Head: a06368f538aa99e4e78caf4634e9f93e8db9b9eb
Base:
386acfd3dcAuth core, axum HTTP handlers, SQLite migration and contracts/keywrap.md are committed atomically. Nine defensive software-authenticator/storage/HTTP tests pass. PRF is tested with a client double; real browser interoperability and linking the auth library into the running server remain the integration lanes' work. No UI was changed. Working tree is clean. No push/deploy performed; issue remains open.
Optimized local evidence: SQLite memory session n=200 p50=91us/p99=253us; Argon2id verification=31ms (m=19456KiB,t=2,p=1). Full review, scope and gate transcript: docs/verification/auth.md.
Required gate: nix shell nixpkgs#binutils nixpkgs#file -c scripts/verify fast
Exit status: 0. Gate output follows verbatim:
Independent defensive review started in lane-auth; base s1-base and head a06368f. Read-only code review against decisions 23–29, 40, 53 and keywrap/plugin contracts. Findings and gate evidence will follow.
Review findings at a06368f: BLOCKER recovery_start (auth/mod.rs:509–518) verifies a hash before an unguarded INSERT. Isolated unchanged-source race test returns success after recovery hash rotation, expected denial (0 passed / 1 failed, 2.33s). Old words can authorize a replacement after the new 24h delay; arbitrary valid-length wraps suffice for server identity replacement. BLOCKER static row builds clap-only CLI: actual aarch64 auth library build fails in vendored OpenSSL with aarch64-linux-musl-gcc missing even after supplying existing make. BLOCKER history is one commit for 5583 insertions across dependencies/schema/contracts/auth/HTTP/tests/docs, violating owner atomic-history rule. Evidence: /home/kayg/.local/state/codex-jobs/infraternal/review-auth/findings.md and adjacent logs. No tracked code edited.
Further evidence: BOTH actual auth musl builds fail after supplying existing make: x86_64-linux-musl-gcc and aarch64-linux-musl-gcc missing (auth-x86-with-make.log / auth-aarch64-with-make.log). Static gate scaffold sizes vs rebuilt s1-base: x86 705624 -> 705624 bytes; arm64 607880 -> 607880 bytes, delta 0; these omit auth and cannot measure its overhead. SHOULD-FIX http.rs:268–288: 120 invalid no-Origin device-redeem requests consume the shared budget; following valid owner login-start returns 401 instead of 200. Isolated test fails (0 passed / 1 failed, 0.58s). Browser PRF/resident/native WebCrypto integration has only Rust doubles, no Playwright evidence (decision 40). auth/mod.rs has 842 lines spanning multiple responsibilities; proposed module and atomic-commit splits are in findings.md. Independent optimized n=200 SQLite-memory session p50/p99=75/196us; Argon2id m=19456KiB,t=2,p=1 measured 21ms.
Independent defensive review finished. Verdict: REWORK.
Head: a06368f538aa99e4e78caf4634e9f93e8db9b9eb; base:
386acfd3dc.Blockers:
Should-fix: shared global budget permits 120 unauthenticated invalid device polls to deny legitimate browser login; real-browser PRF/resident/WebCrypto evidence missing. Module split recommended for 842-line auth/mod.rs.
Report: /home/kayg/.local/state/codex-jobs/infraternal/review-auth/findings.md; adjacent logs and review-probes.rs preserve evidence.
Read-only tracked code review: no code modifications, commits, push, deploy or issue closure. git status --short empty.
Required scripts/verify fast exited 0 (scaffold-static limitation above). Verbatim output follows:
Starting independent-review rework on lane-auth at a06368f538aa99e4e78caf4634e9f93e8db9b9eb, base s1-base
386acfd3dc. Will preserve lane-auth-v1, reproduce the recovery rotation race, repair real auth musl linking for both architectures, isolate polling admission, add browser evidence, and rewrite local atomic gated commits. No push or deploy.B1 reproduced before editing: target/recovery-before.log shows 0 passed, 1 failed in 2.02s. Hash recheck under SQLite writer transaction passes (target/recovery-after.log, 1 passed in 1.96s). Strengthened regression now pauses after actual Argon verification and commits a complete replacement through recovery_ready/registration_finish; no timing sleeps. All 11 Rust auth tests pass in 15.28s (target/auth-tests.log). S1 reproducer now verifies 60 invalid device polls return 401, later polls return 429 + Retry-After: 60, and browser login remains 200; fixed partitions cap aggregate admission at 180/minute. N1 split is underway: facade 142 lines, dedicated crypto/setup/WebAuthn/session/recovery/device/wrap modules. B2: pinned Zig 0.15.2 compiles vendored OpenSSL/SQLite for aarch64 musl; real auth-linked binary is 7805704 bytes, PT_INTERP absent. Final measurements and commit references will follow.
S2 now has real Chromium evidence: target/auth-browser.log, Chromium 149.0.7827.55, four isolated scenarios pass. Real resident UV credential registration, PRF-enabled check, fallback get, stripped PRF proof outputs, native WebCrypto HKDF/AES-GCM wrapping for both passkey and BIP-39 recovery, cookie session, login/unwrapping same DEK; unsupported PRF/missing residence/no UV abort before owner creation; native assertion without UV and altered origin fail server verification. No network port bound: scripts/verify-auth-browser uses private IPC with the actual Rust router. A physical Safari/iPhone run is deferred: no physical device is available in this job and the product browser integration has not landed; Chromium is not claimed as Safari evidence. B2 choice: retain webauthn-rs 0.5.5 and vendored OpenSSL, use checksum-pinned Zig 0.15.2 for both C targets. Core declares unconditional openssl/openssl-sys; disabling defaults does not remove them. 1Password passkey is client/authenticator, not an RP verifier (https://docs.rs/passkey/latest/passkey/). A minimal replacement would newly own attestation parsing and origin/RP/UV/signature/counter policy and require another security review; preserving the independently reviewed verifier is preferable for this rework. Auth-linked static binaries currently x86 9322720 bytes and aarch64 7809800 bytes; scaffold baselines 705624/607880 bytes are not auth overhead measurements. PT_INTERP absent for both; final exact sizes and commits follow.
Commit dispositions now established: B1 fixed in
ea4cf43(deterministic complete-rotation regression accompanies module); B2 fixed by469d0e8(checksum-pinned cross C toolchain) +afbe8e2(real Auth/router executable linkage; both static targets gated); S1 fixed inafbe8e2(bounded 120 browser/60 CLI partitions, 429 + Retry-After, reset/header-distrust tests and documented per-source ingress policy); S2 browser evidence in8f35170(four Chromium 149.0.7827.55 scenarios, real native WebAuthn/PRF/WebCrypto). Physical Safari/iPhone test remains deferred because no device is available and product browser integration is outside this library lane; no Safari compatibility claim is made. N1 fixed across f019691/ecd302b/ea4cf43/294effc/afbe8e2 (147-line facade, dedicated security modules). B3: local branch is reconstructed on386acfdwith twelve atomic fast-gated commits so far, old head preserved at lane-auth-v1; evidence docs commit still to follow. Final fast/HEAD output will follow. Optimized session sample n=200: p50 56us, p99 137us; Argon2id 24ms (target/auth-rework/latency.log). No push/deploy/issue close.Finished local auth review rework on lane-auth. Base
386acfd3dc; HEADce3359ceab. Old head remains reachable as lane-auth-v1 (a06368f538aa99e4e78caf4634e9f93e8db9b9eb). Working tree clean; no push/deploy/issue close. All 13 atomic commits pass the five fast rows before committing; logs target/auth-rework/commit-01-fast.log through commit-13-fast.log. Final required command on committed HEAD: nix shell nixpkgs#binutils nixpkgs#file -c scripts/verify fast (exit 0).Every review finding answered:
B1 fixed
ea4cf43: test failed before fix; deterministic regression now pauses after actual old-word Argon verification, commits full replacement, rejects resumed old words, proves no inserted recovery row/revoked old session and accepts rotated words. Writer transaction rechecks the exact verified hash.B2 fixed
469d0e8+afbe8e2: pinned Zig 0.15.2 cross-compiles vendored OpenSSL/SQLite for both musl targets; infraternal actually constructs Auth/router and links server/verifier. Both PT_INTERP absent. x86_64 9322720 bytes versus 705624-byte scaffold (+8617096); aarch64 7809800 versus 607880 (+7201920). Evaluated webauthn-rs features (no Rust crypto backend), 1Password passkey/types (client/authenticator, not RP), and a minimal RustCrypto/CBOR verifier (new security-sensitive parsing/policy that would require fresh independent review). Retaining the reviewed verifier plus reproducible static cross-build was chosen over introducing that verifier surface; rationale and sizes are in both relevant commit bodies and docs/verification/auth.md. No advisory/license exceptions.B3 fixed: thirteen local atomic commits on s1-base, old head tagged, each fast-gated; list below.
S1 fixed
afbe8e2: 60 CLI polling/admission slots cannot spend 120 browser slots, aggregate bounded 180/minute; 429 with Retry-After: 60; exhaustion/reset/spoofed-forwarding-header regressions and documented trusted-ingress per-source policy. This library does not infer trusted proxies from attacker-controlled headers.S2 fixed for this library slice
8f35170: real Chromium resident UV passkeys, PRF enabled/fallback get, stripped outputs, native WebCrypto passkey/recovery envelopes, login DEK roundtrip; unsupported PRF/residence/UV abort before owner creation; wrong origin/native no-UV assertions denied. Four isolated scenarios PASS on Chromium 149.0.7827.55. Physical Safari/iPhone run deferred: no physical device is available to the job and product browser integration has not landed. Chromium is not presented as Safari evidence; this remains the physical-device integration check. No product UI exists here, so screenshot-quality review is not applicable.N1 fixed across f019691/ecd302b/ea4cf43/294effc/afbe8e2: facade is 147 lines with dedicated crypto/setup/WebAuthn/session/recovery/device/envelope/HTTP modules and explicit transaction invariants.
Performance evidence: optimized session n=200 p50 56us/p99 137us; Argon2id 24ms (target/auth-rework/latency.log). Three alternating recovery-start probes n=50/run: old p50/p95 us 18978/20937, 19085/21350, 19919/22499; corrected 19238/22360, 19516/23321, 19449/22038. Median per-run p50 19.085ms -> 19.449ms (+0.364ms, 1.9%), p95 21.350ms -> 22.360ms (+1.010ms, 4.7%). Small noisy cost justified by preventing revoked-word takeover; Argon2 remains outside writer lock. Sources and unedited logs target/auth-rework/bench-{old,new}/ and bench-{old,new}-{1,2,3}.log. SQLite-memory/single-host numbers exclude disk/network/browser/phone latency.
New commit list:
Final browser gate, verbatim:
Final required fast gate output, verbatim:
Second independent auth review started on lane-auth at
ce3359c; base s1-base (386acfd3dc). Checking all first-review findings, recovery-rotation reproduction, all 13 commit gates, static size/RSS and pure-Rust alternatives. Lane commits remain read-only.Second-review evidence: original recovery-rotation reproducer rerun against an isolated copy of
ce3359cpasses (1 passed, 0 failed, 2.21 s; target/review-auth2/old-recovery-repro.log). The retained deterministic full-replacement regression also passes in the head fast gate. Chromium browser gate passes all four scenarios on 149.0.7827.55 (target/review-auth2/browser.log). Measurement limitation: crates/infraternal/src/main.rs agent mode prints not implemented and exits 2, so this head has no sustained idle infraternal-agent state; decision 41 idle RSS compliance cannot yet be measured. Measuring transient startup separately, not claiming it proves the idle budget.Size-alternative finding: scratch webauthn_rp 0.3.0 musl release probe links real registration and signature-verification paths at 1,174,496 bytes (target/review-auth2/rp-prototype/). However cargo deny advisories fails on rsa 0.9.10 / RUSTSEC-2023-0071, no safe upgrade available (target/review-auth2/rp-advisories.log). The advisory concerns private-key RSA timing; this RP uses public verification, so this is not evidence of an exploitable RP flaw, but adopting it fails our current supply-chain gate without a reviewed policy change. Latest published RP release is 2025-04-03; upstream log has later weak-Ed25519-key / backup-eligibility / PRF changes. This weakens the case for switching as part of this lane.
Second-review size evidence: x86_64 shipped binary 9,322,720 bytes; .text 6,304,536 bytes. cargo-bloat plus deduplicated native-archive symbol attribution identifies OpenSSL text 2,447,122 bytes and SQLite text 1,345,533 bytes (target/review-auth2/bloat.log, native-attribution.log, sections.log). Zig is build tooling and is not distributed in the binary. Exact shipped agent stub exits 2 in 8.074–35.814 ms; transient peak RSS 2,752–4,928 KiB over 30 invocations. A separately labelled same-source parked runtime probe also remains exactly 9,322,720 bytes and has stable RSS 4,920 KiB / PSS 4,916 KiB, nine threads, over 30 seconds (target/review-auth2/parked-rss.log). This excludes all future transport/plugin/shim work and is not proof of decision 41 compliance for a functioning infraternal agent.
Second independent review finished: verdict MERGE for the scoped auth library lane. Head
ce3359ceab, base386acfd3dc. B1/B2/B3 and Chromium S2 fixed; S1 polling isolation passes; physical Safari/iPhone and functioning infraternal-agent idle RSS remain future integration evidence, not claimed complete. All 13 commits independently pass the requested fast command; temporary /tmp worktree removed. Original recovery reproduction passes, 1/0 in 2.21 s; retained deterministic replacement regression passes; browser 4/4 on Chromium 149.0.7827.55.Size recommendation: Keep webauthn-rs with vendored OpenSSL for this lane: the measured parked-runtime baseline is about 4.8 MiB RSS, while neither evaluated alternative currently provides a reviewed, gate-passing replacement with demonstrated parity for this auth policy. Revisit webauthn_rp in a separate migration after a security review of a current released version, PRF/browser/counter/backup-policy compatibility tests and resolution of its RSA advisory gate; its smaller prototype makes that investigation worthwhile, at the cost of migration and security-review work.
Measured x86 file 9,322,720 bytes / aarch64 7,809,800; PT_INTERP absent. OpenSSL linked text 2,447,122 bytes, SQLite 1,345,533; whole .text 6,304,536. Actual agent stub has no idle state (exits 2); separately parked same-source/runtime probe is 9,322,720 bytes, RSS 4,920 KiB over 30 seconds, nine threads, not proof of completed daemon budget. RP prototype 1,174,496 bytes, but cargo-deny fails rsa advisory; passkey/types have no RP verifier. Unloaded release session n=200 p50 79 us/p99 273 us; Argon2 21 ms.
Report: /home/kayg/.local/state/codex-jobs/infraternal/review-auth2/findings.md. Full evidence target/review-auth2/. No tracked changes, push, deploy, decisions edited or issue closure. Final fast command exit 0; unedited gate output follows verbatim:
Merged into
devas7668d0c(after188c805, the s1-base merge). Gate on the merge result: fmt, clippy, test, cargo-deny, static builds all PASS. Passkey crypto: webauthn-rs with OpenSSL, approved by the owner (DECISIONS 86).Closed by the orchestrator during the 2026-10-28 handover (#254), on the owner's request to close finished issues. Evidence: Auth lane merged to dev as
7668d0c(verified in dev) after rework and second review verdict MERGE; D86 approved crypto. Reopen if anything is still missing.kayg referenced this issue2026-10-28 17:53:54 +00:00