Skip to content

fix: support password auth mode for gateway connections (remote mode)#82

Closed
ghost wants to merge 2 commits into
mainfrom
unknown repository
Closed

fix: support password auth mode for gateway connections (remote mode)#82
ghost wants to merge 2 commits into
mainfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jan 2, 2026

Copy link
Copy Markdown

Fixes macOS app authentication when connecting to remote gateway with password-based auth.

Changes

  • GatewayChannel.swift: Send both token and password fields in auth payload to support both auth modes
  • ClawdisConfigFile.swift: Add gatewayPassword() method to read password from config file
  • GatewayEndpointStore.swift: Token closure now checks env var first, then falls back to config file
  • hooks-mapping.ts: Add missing signal and imessage to channel type union

Background

The gateway supports two auth modes: token and password. When auth.mode = "password", it expects auth.password, but the macOS app was only sending auth.token, causing "unauthorized" errors when connecting to remote gateways configured with password auth.

Testing

  • Verified SSH tunnel connects to remote gateway (ws://172.27.187.184:18789)
  • macOS app successfully authenticates with password from ~/.clawdis/clawdis.json
  • Network logs show: status 200, 204 bytes sent (auth), 650 bytes received

🤖 Generated with Claude Code

jeffersonwarrior and others added 2 commits January 1, 2026 21:26
GatewayChannel now sends both 'token' and 'password' fields in the auth
payload to support both authentication modes. Gateway checks the field
matching its auth.mode configuration ('token' or 'password').

Also adds config file password fallback for remote mode, allowing
gateway password to be configured in ~/.clawdis/clawdis.json without
requiring environment variables.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
…urrency

- Add CLAWDIS_GATEWAY_PASSWORD to launchd plist environment
- Read password from gateway.remote.password config in client
- Fix Swift 6.2 sending parameter violations in config save functions
- Add password parameter to GatewayConnection.Config type
- GatewayChannel now sends password in connect auth params
- GatewayEndpointStore and GatewayLaunchAgentManager read password from config
- CLI gateway client reads password from remote config and env
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants