Skip to content
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

Each Tab should clearly identify to what you are connected to (security issue) #13396

Closed
ohault opened this issue Jun 28, 2022 · 7 comments
Closed
Labels
Issue-Question For questions or discussion Needs-Tag-Fix Doesn't match tag requirements Resolution-Answered Related to questions that have been answered

Comments

@ohault
Copy link

ohault commented Jun 28, 2022

Description of the new feature/enhancement

When using Terminal, the user cannot see to where he/she is connected to. The problem is even worse and dangerous when you are using several tabs on the same type.

e.g.
Tab 1 : a PowerShell session to your local Windows host
Tab 2 : a PowerShell session to a Windows Container X
Tab 3 : a PowerShell session to a Windows Container Y
....

This ticket is in relationship with SSH sessions - see #13327

Proposed technical implementation details (optional)

Each tab should clearly display in all cases and situation to what your are connected to (the remote end point of your connection).

@ohault ohault added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Jun 28, 2022
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jun 28, 2022
@ohault ohault changed the title Each Tab should name to what you are connected to (security issue) Each Tab should clearly identify to what you are connected to (security issue) Jun 28, 2022
@DHowett
Copy link
Member

DHowett commented Jun 28, 2022

Hey, thanks for the request!

The terminal does not know (1) that there is even a "remote" connection, and (2) where that connection terminates. Unfortunately, that information just isn't available -- ssh.exe, powershell.exe, and friends don't report it, so we can't figure it out.

That having been said, a great many people configure their remote shells to report that information for them, into the prompt and into the titlebar. There are some very good tutorials around the web on how to get this going.

As an alternative, I might recommend renaming your tabs when you know what they're connected to:

image

@DHowett DHowett closed this as completed Jun 28, 2022
@DHowett DHowett added Issue-Question For questions or discussion Resolution-Answered Related to questions that have been answered and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jun 28, 2022
@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Jun 28, 2022
@ohault
Copy link
Author

ohault commented Jun 28, 2022

@DHowett can your please re-open this ticket because it's taking the problem by the wrong side ?

Terminal SHOULD take care of these critical information. This is a security issue. You cannot take the assumption to delegate the accountability of all Terminal users around the world to make specific configurations to don't mess up their connections !!!!

The profile only model of Terminal is just a too restrictive and very, very dangerous.
Just imagine how dangerous could be Remote Desktop client software if the user could identify their connections !!!!

My suggestions are the following:

  • For all "profite" that are connection-oriented like PowerShell, SSH, .... Terminal should provide a way to open a new SESSION via a window to establish to a connection.
  • Terminal should provide an API / command line parameters to do it from another program (e.g. docker/nerdctl, WSL ....)
  • For the others, Terminal and plugins should provide a way to parse the prompts to report to Terminal which is the target system currently connected to (including well known split screens technologies - https://opensource.com/article/20/5/split-terminal)

@DHowett
Copy link
Member

DHowett commented Jun 28, 2022

A single terminal emulator doesn't have the sway over the ecosystem at large to pull off what you're asking for; it's just not technically feasible given the direction in which text-mode software has evolved. There is no distinction between a local text-mode application that access local resources, and a local text-mode application that connects to a remote server and accesses remote resources.

At the end of the day, it is a terminal emulator's job to host local applications regardless of what those local applications do. Profiles specify only local applications.

If we were to seek to standardize some form of host reporting, it would probably take a decade to get anywhere -- and we would need buy-in from the Docker folks, the SSH folks, terminal emulator authors across the industry and more. It's just... not something we can tackle.

Guessing (as suggested by your third bullet point) has its own issues:

image

What host is this? It didn't tell us. We don't even know with certainty what operating system it is.
I've used GNOME Terminal to illustrate that we're not alone in not being able to figure this out.

@ohault
Copy link
Author

ohault commented Jun 28, 2022

For sure some exceptions will last and the problem is not simple one. I can even think about using AI for the more complex situations.

The main goal here is to solve this huge problem/security risk for all the other cases.

@tracker1
Copy link

@ohault If I open a WSL prompt, and then ssh to a remote machine, should it be showing that I'm SSHd to a remote, or that I'm in a local WSL? This could get very messy.

For reference, I do have most of my prompts display the system, including setting the windows title with it.

@ohault
Copy link
Author

ohault commented Sep 15, 2022

hi @tracker1 , the idea is well to have a background tracking of what the user is typing and the results to infer the context as if someone was looking over my shoulder.

@tracker1
Copy link

@ohault that seems like a LOT of overhead... so now, the Terminal needs to know you're in a bash shell vs. pwsh vs X, Y or Z tools?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Question For questions or discussion Needs-Tag-Fix Doesn't match tag requirements Resolution-Answered Related to questions that have been answered
Projects
None yet
Development

No branches or pull requests

3 participants