Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for ProxyJump. #2873

Merged
merged 1 commit into from
Jul 26, 2019
Merged

Add support for ProxyJump. #2873

merged 1 commit into from
Jul 26, 2019

Conversation

klizhentas
Copy link
Contributor

This commit implements #2543

In SSH terms ProxyJump is a shortcut for SSH client
connecting the proxy/jumphost and requesting .port forwarding to the
target node.

This commit adds support for direct-tcpip request support
in teleport proxy service that is an alias to the existing proxy
subsystem and reuses most of the code.

This commit also adds support to "route to cluster" metadata
encoded in SSH certificate making it possible to have client
SSH certificates to include the metadata that will cause the proxy
to route the client requests to a specific cluster.

tsh ssh -J proxy:port is supported in a limited way:

Only one jump host is supported (-J supports chaining
that teleport does not utilise) and tsh will return with error
in case of two jumphosts: -J a,b will not work.

In case if tsh ssh -J user@proxy is used, it overrides
the SSH proxy coming from the tsh profile and port-forwarding
is used instead of the existing teleport proxy subsystem

@klizhentas
Copy link
Contributor Author

retest this please

Copy link
Contributor

@webvictim webvictim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on the whole

ctx: ctx,
})
if err != nil {
log.Errorf("Unable instantiate proxy subsystem: %v.", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unable to instantiate

}

if err := subsys.Start(sconn, ch, &ssh.Request{}, ctx); err != nil {
log.Errorf("Unable start proxy subsystem: %v.", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unable to start

Interval: clusterConfig.GetKeepAliveInterval(),
MaxCount: clusterConfig.GetKeepAliveCountMax(),
CloseContext: ctx.CancelContext(),
// TODO(klizhentas): is this the best way to signal
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO still here

out: []JumpHost{{Username: "alice", Addr: NetAddr{Addr: "127.0.0.1:7777", AddrNetwork: "tcp"}}},
},
{
in: "alice@127.0.0.1:7777, bob@localhost",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we explicitly supporting spaces in jump host lists? All the examples we give have no spaces.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it's fine

@klizhentas klizhentas force-pushed the sasha/j branch 2 times, most recently from e799706 to a841bbd Compare July 24, 2019 23:01
This commit implements #2543

In SSH terms ProxyJump is a shortcut for SSH client
connecting the proxy/jumphost and requesting .port forwarding to the
target node.

This commit adds support for direct-tcpip request support
in teleport proxy service that is an alias to the existing proxy
subsystem and reuses most of the code.

This commit also adds support to "route to cluster" metadata
encoded in SSH certificate making it possible to have client
SSH certificates to include the metadata that will cause the proxy
to route the client requests to a specific cluster.

`tsh ssh -J proxy:port ` is supported in a limited way:

Only one jump host is supported (-J supports chaining
that teleport does not utilise) and tsh will return with error
in case of two jumphosts: -J a,b will not work.

In case if `tsh ssh -J user@proxy` is used, it overrides
the SSH proxy coming from the tsh profile and port-forwarding
is used instead of the existing teleport proxy subsystem
@klizhentas
Copy link
Contributor Author

retest this please

2 similar comments
@klizhentas
Copy link
Contributor Author

retest this please

@klizhentas
Copy link
Contributor Author

retest this please

@klizhentas klizhentas merged commit 838e754 into master Jul 26, 2019
@klizhentas klizhentas deleted the sasha/j branch July 26, 2019 17:58
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants