Create user by supplying a public key
Nobody has claimed this yet.
- Dominant language
- Erlang
- Stars
- 303
- Forks
- 211
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 5
Description
The ability to create a user by only supplying a public key would be a great feature. Currently chef-server-ctl user-create either spits out the private key to STDOUT or to a file with -f, --filename. Since the server never stores the private key anyway, I think it makes sense to support a public key as an input.
Expected Behavior
Unfortunately -p is already used by the password option, so the flag would not be able to match the same one that exists in chef-server-ctl add-user-key
Something like this would work:
chef-server-ctl user-create myuser First Last myuser@domain.local --public-key-path /path/to/key.pub -p
Current Behavior
User can only be created by exporting a key generated at execution. The only way to end up in a state that does not contain that generated key is by these steps:
- Create user
- Add public key to user
- Delete the default key from the user
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the chef-server-ctl user-create and add-user-key entry points, comparing their option handling and public-key behavior. Trace how user creation currently generates or writes the private key. Done means user-create accepts --public-key-path and creates the user without generating or exporting a new private key.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- erlang
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100