fix(export): make linked identities and keys opt-in (#336) - #348
Merged
Merged
Conversation
Exporting connections with Identities and SSH Keys unchecked still wrote the identities and keys those connections use, private key material included. buildBundle now only follows that cascade when asked, and the export dialog offers an "Include linked credentials" checkbox, off by default, whenever it would change the file. Secrets stored on the connection itself still travel with it. Jump-host and port-forwarding connections still cascade. MCP export gets the same default, so narrowing `types` really leaves credentials out. Unchecked checkboxes were nearly invisible: their border used --t-border-hover, close to the dialog background. One CSS rule now styles native inputs and a shared CheckboxBox with a --t-text-muted border, replacing six hand-rolled copies (import/export, roles panel, share menu, notes preview, port-forwarding and connection forms).
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.
Refs #336 (reopened after the reporter's follow-up).
Linked credentials are opt-in
buildBundletakes{ includeRelatedCredentials }, defaultfalse. With it off, identities and SSH keys that exported connections reference are no longer pulled in when their types are unchecked. The connections export without those references, and credentials are assigned after import.exportuses the default, so narrowingtypesactually leaves credentials out, as its refusal message already promised.Invisible unchecked checkboxes
The unchecked border used
--t-border-hover, nearly the dialog background. A single@layer baserule inglobals.cssnow styles nativeinput[type=checkbox]and a sharedCheckboxBox(src/components/shared/Checkbox.tsx) with a--t-text-mutedborder. It replaces six hand-rolled copies: import/export dialogs (4), roles panel, share menu, notes preview CSS, plus the unstyled native boxes in the port-forwarding and connection forms. The import/export radio shares the token through.radio-box.Verification
tsc --noEmitclean; 390 tests across import-export, members, terminal, snippets, notes, port-forwarding and connections pass. Newregistry.spec.tscases cover the opt-in, the default and explicitly checked identities.