Skip to content

fix: apply PathPortability to iCloud sync#756

Merged
datlechin merged 2 commits intomainfrom
fix/sync-path-portability-750
Apr 15, 2026
Merged

fix: apply PathPortability to iCloud sync#756
datlechin merged 2 commits intomainfrom
fix/sync-path-portability-750

Conversation

@datlechin
Copy link
Copy Markdown
Collaborator

Summary

Device-local filesystem paths (SSH key, agent socket, SSL certs) were synced as raw absolute paths (e.g., /Users/alice/.ssh/id_rsa), breaking connections on other devices. Applied the same PathPortability pattern already used in connection export: contract paths to ~/… form before pushing to iCloud, expand to device-local form when pulling.

All 9 path fields covered:

  • SSHConfiguration: privateKeyPath, agentSocketPath
  • SSHJumpHost: privateKeyPath
  • SSHProfile: privateKeyPath, agentSocketPath, jump host paths
  • SSLConfiguration: caCertificatePath, clientCertificatePath, clientKeyPath

One file changed: SyncRecordMapper.swift — 6 helper methods + 4 call sites.

Test plan

  • Mac A creates SSH connection with ~/.ssh/id_ed25519 → sync → Mac B has correct path for its own home dir
  • Mac creates connection → sync to iOS → edit name on iOS → sync back → SSH key path preserved on Mac
  • SSL cert paths sync correctly between Macs
  • SSH profiles with jump hosts sync with portable paths
  • New connections on iOS don't break macOS connections

Closes #750

)

Device-local filesystem paths (SSH key, agent socket, SSL certs) were
synced as raw absolute paths, breaking connections on other devices.

Apply the same PathPortability pattern already used in connection export:
contract paths to ~/… form before pushing to iCloud, expand them back
to device-local form when pulling. This makes paths work across Macs
with different usernames and prevents iOS from overwriting valid paths.

Covers: SSHConfiguration (privateKeyPath, agentSocketPath), SSHJumpHost
(privateKeyPath), SSHProfile (privateKeyPath, agentSocketPath, jumpHosts),
SSLConfiguration (caCertificatePath, clientCertificatePath, clientKeyPath).

Closes #750
@datlechin datlechin changed the title fix: apply PathPortability to iCloud sync — portable SSH/SSL paths (#750) fix: apply PathPortability to iCloud sync Apr 15, 2026
@datlechin datlechin merged commit 28cd5a1 into main Apr 15, 2026
2 checks passed
@datlechin datlechin deleted the fix/sync-path-portability-750 branch April 15, 2026 05:14
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.

bug: SSH private key path is exported in synced connections

1 participant