Skip to content

fix(macos): a Team Library or linked-folder row asks before it uses this Mac's SSH credentials or files - #4683

Merged
datlechin merged 6 commits into
mainfrom
fix/macos-shared-row-ssh-consent
Nov 28, 2026
Merged

datlechin merged 6 commits into
mainfrom
fix/macos-shared-row-ssh-consent

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • A Team Library or linked-folder row asks once per destination, through localCredentials, before it uses this Mac's SSH credentials or files:
    • the agent with its socket;
    • a key file (an empty path is the keys ssh finds itself);
    • a linked SSH profile;
    • a database file or socket here.
  • The list follows what LibSSH2TunnelFactory tries:
    • for the main host and each hop, ProxyJump hops from ~/.ssh/config included;
    • an agent hop's key fallback, and a hop whose agent the config turns off;
    • each use with the server ~/.ssh/config resolves to, so a moved HostName asks again.
  • The chain resolves off the main actor. If it changes while the question is open, it asks again before approving.
  • Test Connection on a shared row asks first and uses the refreshed SSH profile. Reconnect asks. Recovery refuses an unapproved row.
  • The Mac keeps its own list, not the core's Core.sharedRowLocalUses. Its SSH client (libssh2) tries different methods (no key after a password) and reads ~/.ssh/config in Swift.
  • Follow-up macOS: dial the SSH chain a shared row's approval covered, not one read again after the check #4667: dial the approved, resolved chain. Today the tunnel reads the profile and ~/.ssh/config again after the check.

Test plan

  • LocalCredentialConsentTests:
    • an agent row asks, naming the server; a key row and a jump agent each name their host; a password tunnel asks nothing;
    • a ~/.ssh/config ProxyJump asks;
    • a changed agent-hop fallback key asks again; a moved HostName asks again; a change while the question is open asks again;
    • a SQLite file asks once; MotherDuck asks nothing; a socket host is a file;
    • this Mac's own row asks nothing;
    • an unapproved row never reaches the tunnel from a connect or a Test; an approved row goes on without asking.
  • SessionRecoveryLoopTests: an unapproved team row's recovery stops and dials nothing.
  • Local: app build; LocalCredentialConsent, ConnectionApprovalStore, SessionRecoveryLoop, PromptedPasswordKey, DatabaseManagerRDSEndpoint, DatabaseManagerTunnel, WelcomeViewModelLinkedConnection and EnvVarReferenceConsent suites; lint.

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.

1 participant