Repository navigation
Conversation
Signed-off-by: Adrien Langou <alangou@nvidia.com>
Signed-off-by: Adrien Langou <alangou@nvidia.com>
Signed-off-by: Adrien Langou <alangou@nvidia.com>
Signed-off-by: Adrien Langou <alangou@nvidia.com>
Signed-off-by: Adrien Langou <alangou@nvidia.com>
Signed-off-by: Adrien Langou <alangou@nvidia.com>
Signed-off-by: Adrien Langou <alangou@nvidia.com>
…SSH URLs Signed-off-by: Adrien Langou <alangou@nvidia.com>
Signed-off-by: Adrien Langou <alangou@nvidia.com>
Signed-off-by: Adrien Langou <alangou@nvidia.com>
Signed-off-by: Adrien Langou <alangou@nvidia.com>
This branch has not been deployed
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.
Why
Keep SSH session credentials out of the process arguments used for sandbox connections, file transfers and port forwards.
What changed
A gateway can advertise direct SSH on an authenticated
GetSandboxresponse. The proxy opensForwardTcpwith its gateway credential and the immutable sandbox ID from that lookup. The gateway checks workspace access, the ID and the SSH connection limit at admission, and records the sandbox and channel in the audit log. This path creates no SSH session record.Clients use the original session-token flow when the gateway does not advertise direct SSH. This includes older gateways, local-development identities and deployments whose interceptors observe or control SSH session creation or revocation. Older clients can still use their existing token flow. A released v0.1.9 CLI was also tested against the new gateway. A command that has selected direct SSH keeps that mode across reconnects. A definitive refusal stops automatic retries, including when it arrives in the gRPC trailers.
For launches initiated by the CLI or TUI, OpenSSH receives a one-use local handle. The proxy obtains its connection context over a same-account Unix socket or Windows named pipe. On legacy connections this channel also carries the session grant. The issuer attempts revocation after relay admission, failure or cancellation. Saved SSH configurations resolve their named profiles on invocation. File transfers retain the selected identity across retries and across uploads in one create request.
Scope
For regular CLI commands, a direct gateway endpoint selects the destination. When the profile and endpoint come from different sources (command line and environment), the CLI uses credentials registered for the endpoint. For a tunnel, pass both
--gatewayand--gateway-endpointexplicitly to pair the profile with the tunnel address. A saved SSH profile continues to select its own gateway when the editor inherits another endpoint.Generate saved SSH configuration from a named profile if the URL includes credentials, a path, a query, or a fragment. Regenerate custom proxy commands that passed the old hidden
--tokenoption. Direct Rust callers of the changedopenshell-coreandopenshell-cliSSH helpers may also need to update their calls.On Unix the proxy checks the account of the socket peer and the issuer PID. The Windows named pipe restricts access to the issuing account. Revocation is best effort if the issuer dies or the gateway is unavailable.
Verification
whoami, SSH session creation and relay admission. The test used distinct client certificates and real OpenSSH.--locked.