feat: per-endpoint SSH agent forwarding toggle#213
Merged
Conversation
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.
Summary
Moves SSH agent forwarding from an account-wide setting to a per-endpoint setting so endpoints that disallow forwarding (e.g.
AllowAgentForwarding noinsshd_config) can opt out without disabling forwarding everywhere. Matches the granularity already used foruserVerificationanddescription.endpoints.agent_forwardcolumn (defaults totrue); migration0007_endpoint_agent_forwardbackfills every existing endpoint totrueand dropsaccounts.agent_forward.forward: on/forward: offnext to the UV chip.SshTransportFactory.createreadsendpoint.agentForwarddirectly — replaces the per-connectaccountRepo.findByIdDB hop.seedAdminEndpoints[].agentForwardis optional, defaults totrue; the seed-export YAML only emits the field whenfalse.account.agentForwardAPI surface, and thegetAgentForwardfactory option.Default-flip note
Existing deployments where the account-wide flag was off will, post-migration, have forwarding on for every endpoint. This is intentional — most endpoints allow forwarding and per-signature passkey approval bounds the blast radius — but users who previously turned the account-wide flag off may want to review and toggle off the specific endpoints where forwarding is genuinely disallowed.
Test plan
pnpm typecheckpnpm lintpnpm spdx:checkssh-transport-factory,accountsroute,endpoint-repo,terminal-manager,loaderEndpointInfoagentForward: falseis emitted; reseed against a fresh DB and confirm both states round-trip