-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Surface target ports in tsh and Connect #49688
Conversation
abeb5d8
to
c512b52
Compare
Everything works great for me. A couple things to consider (not asking for changes)
|
@avatus Thanks. Yeah, I was thinking about adding the search input, I saw your PR with that. The problem is that here the search would need to be smarter than it is now. E.g. if you have a port range 2000-3000, I'd expect that if I type "2345", it's going to show up. This is the same reason why I haven't implemented a port select in the search bar. So for now all this UI element is supposed to do is just let you see what ports are available in the first place. I doubt (I hope?) that people are going to be used multi-port apps through those ports – I'd expect most of the time the port number is going to match some pre-defined port in a 3rd-party client. But people could end up wanting to treat those ports like pets not cattle, e.g., they might want to give them names. So we'll see how this will end up being used. Regarding duplicates, that's a conscious decision:
Otherwise we'd have to consider stuff like overlapping ranges or port numbers that already included in other ranges (e.g., |
i actually really liked the comments left in your 'example' app spec next to each port describing their purpose. To be honest, seeing that finally made multi-port "click" for me. I could see naming being very valuable in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it locally, didn't find any issues.
c512b52
to
ee08096
Compare
@ravicious See the table below for backport results.
|
* tsh: Print target ports when returning multi-port apps * Add TCP ports to App message in lib/teleterm * Connect: Add port selector for multi-port TCP apps * Add controls to ActionButtons story * Add control for rendering lots of menu items in ActionButtons story * Include target port in VNet modals and notifications in Connect * Empty commit to trigger CI
* tsh: Print target ports when returning multi-port apps * Add TCP ports to App message in lib/teleterm * Connect: Add port selector for multi-port TCP apps * Add controls to ActionButtons story * Add control for rendering lots of menu items in ActionButtons story * Include target port in VNet modals and notifications in Connect * Empty commit to trigger CI
* Surface target ports in tsh and Connect (#49688) * tsh: Print target ports when returning multi-port apps * Add TCP ports to App message in lib/teleterm * Connect: Add port selector for multi-port TCP apps * Add controls to ActionButtons story * Add control for rendering lots of menu items in ActionButtons story * Include target port in VNet modals and notifications in Connect * Empty commit to trigger CI * VNet: Refuse conn if local port doesn't match app spec
This PR makes it so that both
tsh apps ls
and Connect are capable of showing target ports supported by TCP apps. See the UI section of the RFD.It also makes sure that any VNet modals or notifications in Connect include the target port where possible.
How to test
To test the display of target ports, you need to compile teleport from this branch and then add any bogus multi-port TCP app – the ports don't have to work.
To test the notification and the modal, you can set up any kind of HTTP app on 8765, start VNet and then try to curl the app at
multi-port-example.<your cluster>:8765
. Just make sure the address of the app is not in your/etc/hosts
. Turning on per-session MFA and then closing its modal will let you test the notification. The modal can be seen in the story or by first curling the app, waiting for the cert to expire and then attempting to curl it again – it's important that you curl it at least once before the cert expires.