Repository navigation
feat(ios): establish native Cloudflare Access sign-in sessions - #146996
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 24, 2026, 12:13 PM ET / 16:13 UTC (Revision 24). ClawSweeper reviewWhat this changesAdds dormant iOS Cloudflare Access challenge verification, encrypted browser token transfer, Keychain-backed sessions, and native CI coverage. Merge readiness⛔ Blocked before merge - 3 items remain Keep open. Neither current main nor the latest release has this iOS capability, and the foundation remains distinct from its open app-integration successors. No actionable source defect was found, but native and upgrade qualification remain unfinished. Priority: P2 Review scores
Verification
How this fits togetherCloudflare Access can challenge an iOS connection before Gateway pairing. This layer turns a verified Access sign-in into a stored, per-authority session for later connection code; existing pairing credentials and manually configured proxy headers have separate owners. flowchart LR
A[Gateway URL] --> B[Access challenge]
B --> C[Signed application details]
C --> D[Encrypted browser transfer]
D --> E[Token and identity checks]
E --> F[Keychain session]
F --> G[Session snapshot]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +60, Config +12, Other +1851. Total +1923 across 15 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Qualify the native session owner and upgrade path, then let the open iOS connection work consume its validated snapshots while preserving existing credential stores. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds a dormant capability rather than repairing a reproduced current-main bug. Is this the best way to solve the issue? Yes in principle: an iOS-owned session Store and the existing Keychain adapter keep Access grants separate from pairing and manual headers. Native and upgrade qualification remain necessary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f2baae330da1. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (23 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review The decoder admission finding is fixed at |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
8c4553e to
9020c0d
Compare
506da71 to
082b452
Compare
441b26c to
e5a17d8
Compare
a042f67 to
eec38b3
Compare
082b452 to
4314e0c
Compare
4314e0c to
4427aae
Compare
eec38b3 to
04f373d
Compare
Recognize Cloudflare Access login redirects as discovery hints while verifying signed application metadata at the original gateway URL. Preserve preauthenticated ingress and strict metadata validation.
4b19090 to
fc3bff1
Compare
|
Merged via squash auto-merge.
|
* commit '9a1a6f7db9783d0b8abaf918bfe12978ea745b57': (26 commits) fix(maintainer): restore cold PR worktree provisioning (#157394) feat(ios): establish native Cloudflare Access sign-in sessions (#146996) fix: restore the Gateway after interrupted Doctor maintenance (#156854) refactor(line): retire the Express webhook adapter (#157369) refactor(cron): consolidate unavailable delivery targets (#157393) ci: apply Go memory defaults to architecture checks fix(cli): preserve the first PowerShell completion test failure (#157267) refactor(agents): consolidate transcript-tail model selection (#157382) fix(release): honor frozen validation contracts (#157034) fix(perf): use settled Kova terminal CPU accounting (#157029) chore(windows): verify packaged repair worker lifecycle (#157047) refactor(logging): share memory pressure threshold selection (#157164) fix(release): verify bundled fs-safe native bindings (#157027) perf(skills): skip warm prompt search when minimum cannot fit (#157343) fix(ui): avoid retaining detached tooltip anchors (#157226) perf(ci): reuse compiler state and shorten guard and UI tests (#157265) perf(ui): preserve model caches on unrelated metadata updates (#157254) chore: remove the tracked PR-body artifact and ignore .artifacts (#157296) refactor: consolidate duplicate MCP lifecycle tests (#157360) test(qa): consolidate CLI runtime fixtures (#118496) ...
…law#146996) * feat(ios): add Cloudflare Access browser authentication foundation * test(ios): separate nested Access redirect assertions * test(ios): bind Access fixture values before Testing macros * test(ios): await actor-owned Access request fixtures * test(ios): keep Access login gate on the main actor * fix(ios): reject malformed Access transfer data and recognize resource paths * style(ios): format Access JWT key arguments * test(ios): expect lifecycle proof in native smoke * fix(ios): canonicalize Access discovery root paths * fix(ios): bind shared Access attempts to applications * fix(ios): keep empty Access transfer polls pending * fix(ios): recognize Access login redirects Recognize Cloudflare Access login redirects as discovery hints while verifying signed application metadata at the original gateway URL. Preserve preauthenticated ingress and strict metadata validation. * fix(ios): normalize Access redirect paths * fix(ios): preserve empty-authority redirect paths * test(ios): exercise default Access Keychain persistence * test(ios): host Access tests in the native app target
What Problem This Solves
Cloudflare Access can challenge an iOS Gateway connection before pairing begins. This foundation verifies that challenge, performs Cloudflare's encrypted browser transfer, and gives validated grants one persisted session owner.
User Impact
This is dormant infrastructure: it does not activate browser sign-in or change existing app connection flows. Grants stay restricted to the exact HTTPS/WSS authority, separate from Gateway pairing credentials and manually configured service headers. App activation and its fresh/install-over, browser and reauthentication proof remain in the descendant composition.
Why This Change Was Made
The Store owns same-application sign-in coalescing, replacement/cancellation, expiry, and retirement before persistence or principal changes. It uses the existing Keychain adapter, with an app-specific Access service and canonical-origin accounts. Swift Sodium remains pinned to
cfd195c76882aa9b997560ca7cb95d72fbf5db00, with both redistributed licenses included.The three Access suites run in the existing app-hosted test target and import the actual production module. The native persistence case checks default Keychain save, restoration by a new Store, retirement before acknowledged deletion, and independent account/service survival, with exact-row cleanup. The logic target no longer compiles duplicate Access production sources.
Evidence
Current signed head:
8ad59cf0b41bc6ea440f524b6c82dd98721abffa; integrated main anchor:06815a460f73821268eb84417541b8a2f8534172.The previous-head CI run also hit an unchanged Windows installer fixture's outer PowerShell timeout on its healthy-download control, before stalled-download assertions: https://github.com/openclaw/openclaw/actions/runs/35987525771/job/107708274550. The same failure and inconclusive focused/ordered diagnostics are tracked in #157302. This PR does not repair or suppress that shared fixture; no successful replay will be presented as a fix.
Upgrade-risk disposition: the only production reference to
CloudflareAccessSessionStoreis its declaration inapps/ios/Sources/Gateway/CloudflareAccessSessionStore.swift; this PR adds no app-flow caller. ExistingGatewaySettingsStore, Keychain adapters, app identity and signing/entitlement settings are unchanged by the foundation patch. The new adapter uses a separate Access service and deletes only its exact service/account row. An installed-old app-flow check therefore remains assigned to the descendant activation, where existing credentials can interact with the new owner; it is not claimed as completed here.Qualification: current-head hosted CI, native Access execution and the named default-Keychain test passed. ClawSweeper found no source or security defect. Native landing still enforces the repository merge gates. Full installed-app preservation and live browser/authentication proof remain required at the app-wiring layer; neither is claimed here.
The direct Android foundation dependency, #147061, stays draft on its unchanged old-parent hold so this refresh cannot inflate its comparison. Its restack and qualification follow separately; the narrow Android series and held activation sources are unchanged.