chef-server icon indicating copy to clipboard operation
chef-server copied to clipboard

sudo chef-server-ctl user-create shouldn't show the key in the terminal

Open tas50 opened this issue 7 years ago • 1 comments

Chef Server Version

13.0

Platform Details

Ubuntu 18.04

Configuration

Standalone

Scenario:

When the user runs 'sudo chef-server-ctl user-create ...' it currently creates the private key in the terminal. This means the private key is available in terminal scrollback which can be infinite for a lot of users. This seems like a bad security setup. We should just write the key to disk and then tell the user where to find it. That's how a lot of similar CLI tools handle key generation so they don't save secrets into insecure mediums.

tas50 avatar Oct 25 '19 20:10 tas50

Probably worth mentioning that chef-server-ctl actually wraps knife-opc to provide most of its organizational management functionality. It also wraps it pretty closely (see: wrap-knife-opc.rb), so there's not really much room to override this functionality in chef-server-ctl. You may want to move this issue over to knife-opc.

nnhanndakara avatar Apr 24 '20 01:04 nnhanndakara