Use vscode privilege escalation mechanism for Admin Tabs? #3425

Closed
opened 2026-01-30 23:20:59 +00:00 by claunia · 4 comments
Owner

Originally created by @mikemaccana on GitHub (Aug 15, 2019).

Description of the new feature/enhancement

The idea of having 'admin' tabs has been discussed before, allowing users to quickly open a shell as administrator without having to launch a second Terminal window

It has generally concluded that OS limits within Windows make admin tabs in Terminal not a possibility.

However I'd like someone who knows more than me about this to check out vscode, when editing a file that doesn't have write permission

image

Would it be possible to use something like vscode's privilege escalation mechanism for Admin Tabs?

Thanks! 🙂

Originally created by @mikemaccana on GitHub (Aug 15, 2019). # Description of the new feature/enhancement The idea of having 'admin' tabs has been discussed before, allowing users to quickly open a shell as administrator without having to launch a second Terminal window ## It has generally concluded that OS limits within Windows make admin tabs in Terminal not a possibility. However I'd like someone who knows more than me about this to check out vscode, when editing a file that doesn't have write permission ![image](https://user-images.githubusercontent.com/172594/63086758-769c0e00-bf48-11e9-9fee-381aa793070c.png) ## Would it be possible to use something like vscode's privilege escalation mechanism for Admin Tabs? Thanks! 🙂
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-FixResolution-Answered labels 2026-01-30 23:20:59 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Aug 15, 2019):

As discussed at length, we're not going to be mixing elevated and non elevated tabs in the same window. Just because it's something that might be possible, doesn't mean it's something that we should do.

@zadjii-msft commented on GitHub (Aug 15, 2019): As [discussed at length](https://github.com/microsoft/terminal/issues/632#issuecomment-519375707), we're not going to be mixing elevated and non elevated tabs in the same window. Just because it's something that might be possible, doesn't mean it's something that we should do.
Author
Owner

@mikemaccana commented on GitHub (Aug 15, 2019):

Hi @zadjii-msft I appreciate the response! I mentioned those limits in the comment you're responding to (in heading 2 no less)! but I can clarify my question as a response to your comments you linked to:

If we start an elevated connection and host it in a non-elevated window, we've suddenly created a conduit through that security boundary

Given that vscode is a non elevated window that does privileged actions if the user allows it via UAC:

  • is vscode secure (in which case can terminal do the same?)
  • is vscode insecure (in which case we should probably raise an issue with vscode)?
@mikemaccana commented on GitHub (Aug 15, 2019): Hi @zadjii-msft I appreciate the response! I mentioned those limits in the comment you're responding to (in heading 2 no less)! but I can clarify my question as a response to your comments you linked to: > If we start an elevated connection and host it in a non-elevated window, we've suddenly created a conduit through that security boundary Given that vscode is a non elevated window that does privileged actions if the user allows it via UAC: - is vscode secure (in which case can terminal do the same?) - is vscode insecure (in which case we should probably raise an issue with vscode)?
Author
Owner

@zadjii-msft commented on GitHub (Aug 15, 2019):

I honestly don't know. I'll summon our resident vscode expert @Tyriar to weigh in on the matter. I'd presume that since VsCode is asking for elevation of a single action (the saving of a file), it's not granting the entire process the ability to drive arbitrary commandline executables. It's merely attempting to write that singular file. Presumably, they're launching another separate process that's running elevated, and that process performs the write, so that actions on the main window (unelevated) can't be used to drive the elevated process.

@zadjii-msft commented on GitHub (Aug 15, 2019): I honestly don't know. I'll summon our resident vscode expert @Tyriar to weigh in on the matter. I'd presume that since VsCode is asking for elevation of a single action (the saving of a file), it's not granting the entire process the ability to drive arbitrary commandline executables. It's merely attempting to write that singular file. Presumably, they're launching another separate process that's running elevated, and that process performs the write, so that actions on the main window (unelevated) can't be used to drive the elevated process.
Author
Owner

@Tyriar commented on GitHub (Aug 16, 2019):

We use this node module to elevate processes https://github.com/jorangreef/sudo-prompt

As discussed at length, we're not going to be mixing elevated and non elevated tabs in the same window.

This is actually something that I'd like Windows users to be able to do in VS Code, since you shouldn't be launching code as admin. Maybe one day...

@Tyriar commented on GitHub (Aug 16, 2019): We use this node module to elevate processes https://github.com/jorangreef/sudo-prompt > As discussed at length, we're not going to be mixing elevated and non elevated tabs in the same window. This is actually something that I'd like Windows users to be able to do in VS Code, since you shouldn't be launching code as admin. Maybe one day...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3425