Repository navigation
feat: upgrade legacy managed Gateways to Tailscale auth - #1128
TheAngryPit wants to merge 60 commits into
Conversation
|
Codex review: needs real behavior proof before merge. What this changesAdds an explicit action to enable Tailscale Dashboard authentication on eligible existing managed WSL Gateways while retaining their credentials. Example: A managed Gateway at wss://openclaw-host.tail1234.ts.net uses verified Gateway-owned foreground Serve.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep open: this PR provides a distinct, maintainer-engaged legacy Gateway upgrade absent from current main, and no blocking source defect was established. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherConnection settings invoke GatewayConnectionManager, which coordinates Core configuration and the saved Gateway registry; Dashboard entry points consume the shared link service before browser dispatch. flowchart TD
A[Connection settings] --> B[Gateway connection manager]
B --> C[Core configuration RPC]
B --> D[Managed Serve verification]
C --> E[Gateway registry]
E --> F[Dashboard link service]
D --> F
F --> G[Browser Dashboard]
Technical reviewBest possible solution: Retain the explicit, credential-preserving adoption path through the existing connection manager and shared Dashboard link owner. Do we have a high-confidence way to reproduce the issue? Current-main source confirms the missing in-place action and trust field, while the original merged Tailscale setup scope explicitly excluded existing-Gateway upgrades; no target code was executed during this review. Is this the best way to solve the issue? The supported-topology restriction, leaf-only hash-conditional patch, accept-then-persist ordering and separate readiness checks fit the existing owners and preserve the reviewed authentication boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0467121e68d2. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (35 earlier review cycles; latest 8 shown)
Reviewed November 14, 2026, 4:54 AM ET / 09:54 UTC (Revision 36). |
|
Thanks for flagging the Both pass the submitted object to The regression test deliberately verifies that an unrelated top-level field is absent from the submitted patch. I added a source comment documenting this invariant; no behavior changed in that follow-up commit. The draft remains blocked on the product/security decision in #1117 and does not claim exact-head runtime proof for the new failure branches. @clawsweeper please re-review the updated head. |
|
CI follow-up on exact head The setup-connect E2E exposed a real regression in The fix removes only that guard. Existing behavior remains:
Fresh proof after the correction:
The draft remains blocked on #1117's product/security decision and exact-head runtime-proof gate. The new CI run is the supported E2E proof for this head. |
|
Exact-head architecture and upstream reconciliation proof for
Fresh proof after the merge:
The first closeout run had one unrelated telemetry-listener test failure. The exact test passed on one bounded rerun, and the canonical closeout then passed in full; no telemetry code was changed. This is test/build/review proof, not current-head runtime or end-to-end proof. The draft remains blocked on the legacy-gateway authorization-policy decision and an inspectable redacted runtime artifact showing Core/local convergence, retained fallback credentials, and token-free Dashboard authentication. |
b57cc9c to
afc9111
Compare
Current-head Windows runtime proofI tested the published #1128 head as part of a combined Windows Companion candidate at The supported build passed all five projects. Focused validation passed 1,073 tests with zero failures, and the canonical Shared/Tray closeout passed 5,896 tests with zero failures (32 existing integration-category skips). The exact candidate was then installed and exercised through the supported {
"revalidated": true,
"success": true,
"trustTailscaleAuth": true,
"credentialFragmentPresent": false,
"errorCode": null
}This provides runtime proof that the installed Companion revalidated the authoritative Core setting and produced a successful trusted-auth dashboard result without including the retained fallback credential. No browser or Launcher was invoked, and no URL, token, endpoint, gateway identifier, or raw Core response was persisted. The temporary Local MCP proof surface was returned to Scope note: this Gateway had already adopted trusted auth, so the proof exercises current-head revalidation and token-free result construction rather than replaying the initial Sanitized agent transcript@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Addressed the remaining contributor-owned localization finding on exact head 653135c.
Validation:
The maintainer policy decision for the legacy identity authorization boundary and current-head proof of the initial untrusted-to-trusted transition remain open gates; this commit does not claim to resolve either. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Initial-adoption proof — provenance correctionCorrection: the installed combined Windows build The operator and Codex ran one bounded, explicitly authorized, reversible transition through the installed Companion's supported Connection UI. The transition observations and receipt below are runtime evidence for the authentication implementation at The current PR head is one descendant commit ahead. Its complete Accordingly, the strongest accurate proof is: Sanitized result: {
"status": "pass",
"proofLevel": "runtime_proven_plus_exact_head_equivalence",
"runtimeProvenPrCommit": "afc91117402e0ca46834faee791150ded570a90a",
"currentHead": "653135ce02ad3814604879b516b8e18e7f1b4593",
"currentHeadDelta": "localization_only",
"initial": {
"coreAllowTailscale": true,
"localTrustMarker": true,
"sharedFallbackPresent": true
},
"controlledReset": {
"coreAllowTailscale": false,
"localTrustMarker": false,
"sharedFallbackRetained": true
},
"adoption": {
"entrypoint": "supported_companion_connection_ui",
"fallbackReconnectSucceeded": true,
"coreAllowTailscale": true,
"localTrustMarker": true,
"sharedFallbackRetained": true
},
"rollback": {
"originalBooleanStateRestored": true,
"companionRunning": true
}
}What this proves:
The receipt SHA-256 is Receipt provenance note: the hashed receipt's Redaction: no URL, token, Gateway identifier, raw response, or secret value was persisted or included here. No update was installed. The two disposable identity runtimes used during diagnosis were removed after verification. This closes the behavioral initial-adoption proof gap through runtime evidence for |
|
@clawsweeper re-review |
|
@clawsweeper re-review |
653135c to
b51aa91
Compare
Integrate 8dfedf9 without rewriting contributor or maintainer commits. Preserve Workspace-only window ownership and the main closure rows. Clarify the two retained Dashboard rows: the link service owns Tailscale revalidation and fallback, while the URL builder owns scheme and token fragment construction. Independent incremental P0-P3 review passed. No auth implementation or runtime proof is claimed by this docs resolution. The four maintainer-required human proof pools remain open.
Integrate maintainer commit 067c58f. Assert GatewayRequestRejectedException with exact codes and messages for session creation and chat abort fixture rejections. Keep request inputs, negative cases, cancellation limits and production authority behavior intact. Validation: narrow Shared.Tests build passed; five focused cases passed. The earlier hosted cancellation timeout did not reproduce; its cause remains unexplained. Independent incremental P0-P3 review found no actionable issues.
|
The maintainer repair was pushed in Repaired behavior
These accept-then-persist semantics supersede the historical pre-dispatch persistence/rollback description and its old durable-intent question. Earlier Validation at eb6b6e4The default full
Canonical run 39507834238 remains failed. Core/CLI and Tray/setup passed. The remaining reported failure is Hosted setup/connect passed 40 with seven MXC skips; network recovery passed 2/2 and revocation recovery 1/1. Those skips are not MXC proof, and ordinary recovery is not Tailscale application-grant revocation proof. Recorded real behavior
Strict-run isolation caveat: an unowned E2E distro disappeared while another worktree's testhost was active. No observed owned command or our uninstall log named it. Causality remains unproven, so blanket shared-host invariance is not claimed. Still not verified
Full local logs, TRX, immutable review records, ownership/cleanup manifests, and hashes are retained. Strict TRX SHA256: |
Record credential-free failure phase, timing and runtime metadata without changing OCR deadlines, label checks or fallback behavior. Preserve the original exception if diagnostics fail. The independent P0-P3 review and UI-test project build passed. Full product build and all 4486 Tray tests passed. Shared retained one symlink-privilege setup failure before assertions and 26 explicit skips. The historical OCR cancellation cause and native authorization and upgrade proof remain open.
Integrate 2b7cfce without rewriting contributor or maintainer history. The sole conflict keeps the reviewed OCR diagnostics and adopts main's two current onboarding fallback labels. The one-line resolution passed an independent P0-P3 review and the current UITest project build. Existing Shared symlink-privilege and native authorization, UI and upgrade proof gaps remain open. No OCR timeout or assertion was weakened.
|
Thanks for sticking with this. CI is green and the fixes look good. Before merging, I’d just like a small real-world check of the upgrade and its failure path:
A short recording or redacted output is fine. Please include the tested commit, Core version, and Serve configuration so we know which setup was exercised. Also, please update the opening description to say trust is saved after Core acceptance, and note that background-Serve setups are not migrated by this action. |
|
The opening now states that trust is saved after Core acceptance and that this action does not migrate background-Serve setups. For the authorization check on This would be labelled global Tailscale authentication disable; it would not demonstrate selective per-user revocation. The case has not been run yet. Does that meet your current denial check, or do you also require selective per-profile revocation? |
…0261030 # Conflicts: # tests/OpenClaw.Tray.UITests/OnboardingNativeProof.cs
PR cleanup reviewReviewed head: This is not superseded by main's new-setup Serve support or by #1989 (feat(auth): use personal Tailscale identity in Companion), which explicitly handles a different personal-Companion-auth scope. Please integrate the current ConfigPatchResult owner without restoring ChannelsSnapshot, and preserve GatewayDashboardLauncher's final dispatch authorization. For proof, the latest maintainer request remains the bounded one: existing-Gateway enable/token-free access with independent credentials preserved; failed/interrupted upgrade with usable access and retry; and denied/revoked Tailscale access without independent valid auth. The historical second-identity capture withdrew a network ACL, not the application grant. Please clarify whether the proposed global allowTailscale=false case satisfies the requested denial scenario, then record the accepted cases on the final head. Green hosted CI and historical MXC results are useful but do not substitute for that changed-path evidence. Action in this cleanup pass: leaving this PR open. No branch changes or runtime-proof waiver. The findings above come from source, discussion and recorded-CI review; Windows validation was not rerun in this pass. |
|
Updated the branch onto main Tested Companion commit: Validation:
Fresh bounded native behavior on that exact build, using an isolated task-owned profile against an existing Windows/WSL Gateway (
Independent rubber-duck review found no new actionable defect in its bounded implementation/proof review and agreed that normal publication is reasonable with these gaps explicitly retained. The Gateway already had Still not verified / blocked: browser rendering is unavailable because browser launch was refused by host policy; no alternative route was used to bypass that refusal. Interrupted-upgrade recovery/retry, independently preserved shared-credential access, application-level denied/revoked identity, and signed installer upgrade still need their own evidence. This update does not claim complete migration qualification or merge readiness. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Related: #1117. Separate from #1989. Maintainer proof requirements.
What Problem This Solves
Existing Companion-managed WSL Gateways lack a supported in-place action to adopt Tailscale Dashboard authentication while preserving existing shared access.
User Impact
Operators can explicitly enable Core-verified Tailscale Dashboard authentication for eligible legacy managed Gateways. Existing credentials remain intact. This action supports Gateway-managed foreground Serve; it does not convert Setup background-Serve deployments or perform automatic migration. Real lab opt-in, local-persistence failure/retry and fixture-backed selective revocation are demonstrated below. Previous-version upgrade, complete proof-pool qualification and maintainer acceptance remain open.
Why This Change Was Made
The upgrade captures the authenticated connection epoch before reading config, requires the existing admin scope and authoritative base hash, then patches only
gateway.auth.allowTailscale. Replacement connections cannot receive a patch captured for the old connection. Core patch acceptance permits saving local trust; it does not prove asynchronous apply or continued ingress readiness. Dashboard link creation revalidates current config/applied state and managed ingress before a token-free launch.Saved links validate the credential/export requirements for that link, and setup authority is checked immediately before browser dispatch after asynchronous validation. An independently approved browser credential remains an intentional fallback for this upgrade flow. Personal-mode no-fallback selection is the separate #1989 contract.
Evidence
Real Windows/WSL/browser qualification was collected on 14 November 2026. It now includes normal native opt-in from false/false, token-free authenticated browser access, accepted-config/local-save failure followed by retry, selective application-grant denial, retirement of an admitted browser with code 4001, denied reconnect, and independent valid authentication. Details and limitations are below.
Current source and the native proof binary are both
ae660ef0e692d5dacb7a642cc026bd534560d8df, integrating frozen main34e8b609. All three runtime scenarios were repeated on this exact head. Current-head Build and Test and CodeQL passed; complete proof-pool acceptance remains open. No merge readiness is claimed.Change Type
Scope
winnodeRequired proof pools
windows-wsl-gateway-e2e: Partially qualified in operation. The three requested lab scenarios have real Gateway/browser evidence below. The grant policy is fixture-backed. A previous-version installer/data upgrade and the complete pool are not claimed.windows-winui-interactive: Partially qualified in operation. Mounted native Connection menu opt-in, failure/retry and normal Dashboard browser dispatch ran. Remaining full UI/distribution obligations and current CI are separate.Validation
./build.ps1 -Project All -Configuration Debug -NoTrustRepository: all five targets passed on native Windows x64, sourceae660ef0.dotnet test tests/OpenClaw.Connection.Tests/OpenClaw.Connection.Tests.csproj --no-restore --filter 'FullyQualifiedName~GatewayTailscaleAuthLiveVerifierTests|FullyQualifiedName~GatewayTailscaleAuthUpgradeTests': 156 passed, zero failures/skips. The new healthy-slow-probe regression failed before repair, then passed after it../scripts/validate-test-timing-patterns.ps1: passed after marking the intentional latency with the repository's required timing directive. No baseline increase.dotnet test tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore --filter FullyQualifiedName~TestDeterminismGuardTests: 38 passed, zero failures/skips after that directive.ae660ef0, 235 focused Connection cases, all 6,712 Tray cases and 557 focused approval/client cases passed. Full Shared had 5,871 passes, 30 skips and 12 explicit missing-symbolic-link-privilege failures; those failures were not hidden. Scoped Autoreview, NoComments and independent Astra reviewed the manual conflict resolution.Real Behavior Proof
Published and freshly built source:
ae660ef0e692d5dacb7a642cc026bd534560d8df, integrating pinned main34e8b6099f4cbf225c4247fa814e4823dd75c9d2. Native executable SHA-256:102D56749223CFA6CA19B5365198C5AC34919A21A62610801A743BF457DF8A33. Native opt-in, failure/retry, normal browser dispatch, protected access/reload and selective revocation were repeated with this binary. Earlier results for7676549c/2eb34396remain historical records.Environment: Windows x64 Companion, a separate task-owned Ubuntu WSL Gateway running official OpenClaw
2026.11.3 (847611d), Tailscale1.104.7, and genuine Gateway-owned foreground Serve on HTTPS 443. The saved legacy record and device were synthetic; the running Gateway, pairing, configuration transaction and browser were real. This is not a previous-version installer/upgrade proof. No model-provider credentials or private conversations were copied.allowTailscale=falsehello.auth.method=tailscaleand successfully requestedagents.list. The normal mounted Connection Dashboard button, with external-browser suppression disabled, also opened a new default-Chrome tab which authenticated through Tailscale and successfully requestedagents.list. Reload retained authenticated access.4001. A subsequent protected request failed because that connection was retired, and fresh handshakes were denied atauth_validatedwith causeoperator-access-denied. Serve remained reachable and independent pre-existing synthetic token/device authentication successfully fetched Gateway health over the same real WSS endpoint.operator.readreceivedFORBIDDEN: missing scope: operator.adminwhen invoking the fixture's revoke method. Repeating an authorized revocation reported zero newly aborted leases.agents.listagain.The grant policy and its admin operation are explicitly fixture-backed. They demonstrate enforcement by real Core, not a native grant-management UI or an external grant store's notification delivery. Network ACL withdrawal, device-token deletion and global
allowTailscale=falsewere not substituted for selective person revocation. A disconnected page can retain previously rendered content; that is not evidence of newly authorized protected I/O.Validation and remaining limits
ae660ef0.Readyexpected,Unavailablereturned after the old five-second aggregate deadline). After repair, 156 verifier/upgrade cases passed. The production runner's existing per-command timeout and cleanup remain in force; explicit verifier deadlines and caller cancellation remain supported.Security Impact
Compatibility and Migration
gateway.auth.allowTailscale=trueonly on the supported managed foreground-Serve topology. No automatic credential deletion or record replacement.Review Conversations
The current evidence materially advances the requested migration/retry/selective-denial proof. Current-head Build and Test and CodeQL passed. Maintainer acceptance and full pool/distribution obligations remain open. No upstream merge or review-thread resolution is claimed.