Skip to content

fix(core): a Team Library copy carries no device credential path, and the core lists what a shared row would use here - #4687

Merged
datlechin merged 11 commits into
mainfrom
fix/core-team-copy-device-paths
Nov 28, 2026
Merged

datlechin merged 11 commits into
mainfrom
fix/core-team-copy-device-paths

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • A Team Library copy carries no credential or trust material of the device that wrote it, in either direction:
    • SSH key and agent socket paths, jump-host key paths, the TLS CA, client certificate and key paths;
    • a driver's LocalFile fields (keys, certificates, SQLite extensions);
    • the SSH profile link.
  • Those path members go out as empty strings, which a beta Mac's ExportableSSHConfig decoder needs. The SSH sign-in method stays, so a key copy asks the reader for a key of their own.
  • Database file paths are destinations, not credentials. duckdbFilePath (MotherDuck md: included), libsqlFilePath, attachedDatabases and localSocketPath move from LocalFile to Destination in field_trust.rs and ConnectionFieldTrust.swift, and travel.
  • New tablepro_sync::adapters::library::shared_row_local_uses, exposed as Core.sharedRowLocalUses(record, fileBased:) (fileBased comes from an app whose engines this core lacks; None asks this core's drivers). It lists what a row from another origin would use of this device: the SSH agent, key files and default keys per server for the main host and each hop (as the core's transports try them, password tunnels included), the SSH profile link, and a database file or socket here.
  • A team envelope never holds a key passphrase. A publish never reads or seals ssh_key_passphrase or ssl_key_passphrase, which open key files on the publishing device that the copy no longer names, and a member never opens one an older build sealed. Password, SSH password and TOTP secret still go. Edits that name a passphrase still parse.
  • C# bindings regenerated.

Test plan

  • bundle_tests.rs:
    • a beta Mac's bundle reads without its device paths and goes back out with them empty;
    • a published copy carries none;
    • a DuckDB md: copy, a DuckDB file copy and a libSQL copy keep their path.
  • local_uses_tests.rs: each auth method, named keys with the agent, each hop by host, the profile, files, socket hosts, md: and remote files left out, a local name holding ://.
  • team_library.rs: the FFI list crosses, and an app's fileBased overrides an empty driver registry.
  • team_secrets.rs: a_publish_seals_no_key_passphrase. secrets.rs: the pinned test a_secret_goes_up_only_when_the_copy_uses_it is now …_and_a_key_passphrase_never, since passphrases stop going up. The FFI saved-secrets test holds both passphrases and reads neither.
  • Local: tablepro-sync and tablepro-ffi --lib tests, storage field_trust tests and clippy on macOS; storage and sync tests and clippy in the Linux container; TableProCore package tests (ConnectionFieldTrust); field trust parity script; C# bindings and Windows build.

@datlechin
datlechin merged commit 10a30d0 into main Nov 28, 2026
2 checks passed
@datlechin
datlechin deleted the fix/core-team-copy-device-paths branch November 28, 2026 12: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.

1 participant