chef / chef/chef-server

Create user by supplying a public key

Open
#1,481 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Aspect: UX Component: chef-server-ctl Status: Good First Issue Status: To be prioritized Triage: Feature Request Type: Enhancement
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:

  1. Create user
  2. Add public key to user
  3. Delete the default key from the user

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.