hashicorp / boundary

Boundary enables identity-based access management for dynamic infrastructure.
https://boundaryproject.io
Other
3.85k stars 289 forks source link

[Feature Request] Support user defined target port at runtime #4347

Open yongzhang opened 9 months ago

yongzhang commented 9 months ago

Is your feature request related to a problem? Please describe. I'm not sure if this feature is in place or not, but I didn't find it from the docs.

When creating a target, there's a default port (the target port, not proxy port), e.g. 1234 for a generic tcp target.

I want the worker connect to a different port when do boundary connect, something like

boundary connect -target-id=ttcp_123456789 -target-port=5678

This is very useful if the target address is a fixed one, but that target has many other services listening on it with dynamic ports.

Describe the solution you'd like

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Explain any additional use-cases If there are any use-cases that would help us understand the use/need/value please share them as they can help us decide on acceptance and prioritization.

Additional context Add any other context or screenshots about the feature request here.

AdamBouhmad commented 9 months ago

Hey @yongzhang, thanks for using Boundary!

When using boundary connect, this should already be possible using the -listen-port flag documented here: https://developer.hashicorp.com/boundary/docs/commands/connect#listen-port.

Via the Desktop client, there isn't a way to set a user defined default listening port or address at session establishment time, but that's an interesting feature request that I can share with folks internally.

Hope this helps!

yongzhang commented 9 months ago

Hey @yongzhang, thanks for using Boundary!

When using boundary connect, this should already be possible using the -listen-port flag documented here: https://developer.hashicorp.com/boundary/docs/commands/connect#listen-port.

Via the Desktop client, there isn't a way to set a user defined default listening port or address at session establishment time, but that's an interesting feature request that I can share with folks internally.

Hope this helps!

If I understand the doc correctly, -listen-port should be the port in local machine to proxy request right? This feature request is asking a port used by workers connecting to the target.

yongzhang commented 9 months ago

@AdamBouhmad I found a very similar request: https://github.com/hashicorp/boundary/issues/2649