Repository navigation
Password Protect OAuth Token Related Methods #2378
Replies: 10 comments
|
Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments. |
|
This issue has been linked to a new work item: W-10023371 |
|
Where does the password come from? We don't put secrets in flags (they'll end up in shell history!), so there are commands that prompt a user to enter a credential. We typically store those, encrypted locally. Without locally storing it, users would have to enter the password on every command that interacts with any org (which would block scripting use cases). Do you have some examples of some commands that you'd want to have a password option, and drafts of their usage? |
|
@mshanemc, you are correct that each method would need the password parameter, but the parameter can be set via environment variable and/or passed from the parent Application, like VS Code. From a shell sfdx auth:list --json --password Mypassw1234From a script: ## set the password parameter
$password = "Mypassw1234"
# retrieve the password for use
sfdx auth:list --json --password + &password
sfdx force:apex:execute -u testusername@salesforce.org -f ~/test.apex --password + &password VS Code Extensions support using environment variables like this:
# retrieve the password from the environment variable
sfdx auth:list --json --password + process.env.SFDX_PWD |
|
Bravo! |
|
I just thought about it again. It will never be secure. If a hacker access your computer he is able to retrieve any ENV variables you have there. He would still be able to get access to your orgs through sfdx. That was the reason I also closed that feature that request access to the refresh token. |
|
@allan we need to figure out credentials management. Sharing OAuth tokens is a fail for the IAM Designer exam. This vulnerability affects AWS and Azure CLI too. The CLI is gonna get banned once CISO leadership realizes the vulnerabilities it introduces. Some options are:
|
|
there should not be secrets (ex: passwords) in flags. That's too easy to end up in shell history, and is inviting people to use them in scripts. prompting the user for some sort of password interactively would be possible. It would make commands unscriptable. |
Uh oh!
There was an error while loading. Please reload this page.
Can we get a
passwordparameter added to all of the http related call that use OAuth related tokens?The
key.jsonand/or local keychain concept it too easy to exploit.Adding a
passwordparameter to the various CLI methods would allow for the use of local encryption without exposing an org to a hacked Admin/Dev machine.Yes, it would be possible to grab the password via a key logger, but simple password protection would be a significant security improvement over the current CLI.
All reactions