Skip to content

Add initial support for Get-Credential #114

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

Closed
daviwil opened this issue Jan 12, 2016 · 10 comments
Closed

Add initial support for Get-Credential #114

daviwil opened this issue Jan 12, 2016 · 10 comments
Labels
Issue-Enhancement A feature request (enhancement).
Milestone

Comments

@daviwil
Copy link
Contributor

daviwil commented Jan 12, 2016

Get-Credential support is often necessary for users who are writing administrative scripts. I don't currently have a good idea for how to implement this securely via the host protocol because it might require plaintext credentials crossing process boundaries. I'll need to consult security experts before I'll feel safe building a general solution.

A better short-term solution would be to have the language/debugging service process raise a WPF dialog which can handle the credentials securely in-process. The user experience of this may be slightly poor due to having a modal window appear which isn't attached to the editor client process, but it's better in the short term than passing credentials in an insecure way.

@daviwil daviwil added the Issue-Enhancement A feature request (enhancement). label Jan 12, 2016
@daviwil daviwil added this to the 0.4.0 milestone Jan 12, 2016
@rkeithhill
Copy link
Contributor

Seems like VSCode could use a generic mechanism to get credentials not just for this extension either. I've been trying VSCode's Git support on Linux. When my cached credentials expire, Git commands in VSCode fail (when it could prompt for credentials). I have to go into Bash and re-enter my credentials. Then Git in VSCode works for a while longer.

@daviwil
Copy link
Contributor Author

daviwil commented Jan 12, 2016

Yeah, the problem is that even if they provide a secure way to enter credentials I still need to have a secure way to send them to the host process. Might be able try public-key encryption but that will take some effort to get going.

@rkeithhill
Copy link
Contributor

If the VSCode side supported this then I could imagine them using DPAPI to encrypt the creds and then we'd use DPAPI to decrypt. However the limitation with DPAPI is it is per user and per machine. So it wouldn't work in the case of the extension running on a different box.

I wonder if it makes sense at some point if the stdio between VSCode and extension happened via SSH? Disclaimer - I can barely spell SSH and have only a vague idea what it is. So if that idea makes no sense at all, apologies in advance. :-)

@daviwil
Copy link
Contributor Author

daviwil commented Jan 12, 2016

DPAPI could be a decent solution on the local machine, I might ask the VS Code team about that.

As far as SSH is concerned, I was considering the possibility of using that for remote stdio communication (or potentially WebSockets over SSL), so we'll be able to get an encrypted remote channel one way or another. Local SSH is an interesting idea but would probably require more setup work for the user.

@daviwil
Copy link
Contributor Author

daviwil commented Feb 8, 2016

Unfortunately this needs to be moved to 0.5.0 as I ran out of time to get it done.

@daviwil daviwil modified the milestones: 0.5.0, 0.4.0 Feb 8, 2016
@daviwil daviwil modified the milestones: 0.6.0, 0.5.0 Mar 8, 2016
@daviwil daviwil modified the milestones: 0.7.0, 0.6.0 Apr 25, 2016
@daviwil daviwil modified the milestones: 0.7.0, Backlog Sep 2, 2016
@daviwil daviwil modified the milestones: 0.9.0, Backlog Dec 6, 2016
@daviwil daviwil modified the milestones: 0.9.0, 0.10.0 Jan 18, 2017
@kylehammond
Copy link

For what it's worth - if you try to do the same thing in Visual Studio 2013 with Powershell Tools installed it does prompt you for secure and even non-secure things in a modal as you've described while debugging. It's not a terrible solution all things considered. Thanks! ..looking forward to this one so I can switch to VS Code.

@daviwil
Copy link
Contributor Author

daviwil commented Jan 27, 2017

Yep, I've considered using a similar approach, but the upcoming interactive terminal experience for VS Code should hopefully circumvent the need for that. If that doesn't pan out then I'll definitely go for the modal dialog experience.

@kylehammond
Copy link

Are there any timelines for the upcoming interactive terminal experience?

@daviwil
Copy link
Contributor Author

daviwil commented Jan 27, 2017

Current goal is to have a first release of it out by the end of February, I'll be starting on it next week.

@daviwil
Copy link
Contributor Author

daviwil commented Mar 14, 2017

This has been implemented, release should happen tomorrow!

@daviwil daviwil closed this as completed Mar 14, 2017
TylerLeonhardt pushed a commit to TylerLeonhardt/PowerShellEditorServices that referenced this issue Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

No branches or pull requests

3 participants