iOS/Security: force TLS for non-loopback manual gateway sessions#21441
Closed
bmendonca3 wants to merge 2 commits intoopenclaw:mainfrom
Closed
iOS/Security: force TLS for non-loopback manual gateway sessions#21441bmendonca3 wants to merge 2 commits intoopenclaw:mainfrom
bmendonca3 wants to merge 2 commits intoopenclaw:mainfrom
Conversation
Contributor
|
Closing as superseded by focused replacement PR #21969.\n\nReason:\n- lands the iOS non-loopback manual TLS hardening with strict loopback matching\n- avoids the prefix-bypass host issue (e.g. 127.attacker.example)\n- keeps scope limited to the iOS change + targeted tests |
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
ws://support only for explicit loopback development hosts (localhost,127.*,::1,0.0.0.0).ts.netdefault-port behavior (443 when TLS and no explicit port)Why
Deep-link/setup-code hardening already rejects insecure non-loopback setup payloads, but manual runtime connection logic could still use plaintext transport for non-loopback hosts if TLS was toggled off. This closes that remaining path and aligns iOS behavior with Android transport hardening.
Validation
./scripts/ios-configure-signing.sh(pass)xcodegen generateinapps/ios(pass)xcodebuildtest execution in this environment is blocked because the active developer directory is Command Line Tools (/Library/Developer/CommandLineTools) rather than full XcodeScope / Non-duplication
Greptile Summary
Forces TLS encryption for all non-loopback iOS manual gateway connections at the controller level, closing a security gap where users could disable TLS for remote hosts. The change:
resolveManualUseTLS()to enforce TLS based on host type (loopback vs remote)isLoopbackHost()helper to identify development hosts (localhost,127.*,::1,0.0.0.0)shouldRequireTLS) from Tailscale port-443 default logic (shouldUseTLSDefaultPort443)This complements existing deep-link/setup-code parsing guards and aligns iOS behavior with Android transport hardening.
Confidence Score: 5/5
Last reviewed commit: 4b15033