sassoftware / vscode-sas-extension

This SAS Extension for Visual Studio Code provides support for the SAS language, including features such as SAS syntax highlighting, code completion, hover help, code folding, outline, SAS code snippets and run SAS code.
https://sassoftware.github.io/vscode-sas-extension/
Apache License 2.0
116 stars 47 forks source link

[SSH connection] Add password authentication #294

Open shenzj1994 opened 1 year ago

shenzj1994 commented 1 year ago

Is your feature request related to a problem? Please describe. While the extension supports private key authentication, many SAS environments still use username and password authentication for SSH.

Describe the solution you'd like Add password authentication capability

Describe alternatives you've considered Technically, key pairs can be added to SAS host but this requires IT changes and significant effort. Also it may involve other security concerns.

Additional context Suggested by @smorrisj to submit this as a new feature request. See #61

Environment Remote SAS 9.4

smorrisj commented 1 year ago

For this issue, it would be beneficial to look into the secrets storage api to house the credentials. I'm thinking of an auth flow similar to what we do for viya connections. The user would be prompted once to set the credentials, and the extension should store these in a secret.

The shh connection profile model should be augmented to discriminate between the two supported auth types for sas 9.4 remote, so that the ssh client can be built up using either the agent socket or the credentials in the secret. The username should be completely removed from the ssh profile model. For the ssh agent based auth, it can be placed in $HOME/.ssh/config as is currently done with the private key file path.

chunky commented 2 months ago

Using VS Code secrets storage would be much preferable, in a big-picture sense, but a rapid/tactical solution for "authentication methods involving passwords" would be immensely useful.

If there's a path by which something can be done quickly while still being adequately secure [eg, users enter password just-in-time, without a storage option], that would greatly help us.