chef / chef/chef-server

Can not create any user on the chef server after deleting pivotal

Open
#544 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: chef-server-ctl Status: move to jira Status: To be prioritized Triage: Confirmed Type: Bug
Dominant language
Erlang
Stars
303
Forks
211
Avg merge
1d 8h
Merged PRs (30d)
5

Description

Hello,

I've created users with the admin rights using:
chef-server# chef-server-ctl user-create
chef-server# chef-server-ctl user-create myadmin My Admin myadmin@test.com mypassword -f myadmin.pem
chef-server# chef-server-ctl org-user-add myorg myadmin --admin

and then deleted the original pivotal user as I did not think this was needed anymore:

chef-server# chef-server-ctl user-delete pivotal

BUT now I can't create any user:

chef-server# chef-server-ctl user-create myotheradmin My OtherAdmin myotheradmin@test.com mypassword -f myotheradmin.pem -o myorg
ERROR: Failed to authenticate to https://127.0.0.1:443 as pivotal with key /etc/opscode/pivotal.pem
Response: Failed to authenticate as 'pivotal'. Ensure that your node_name and client key are correct.

OK expected. But it fails also with my previous admin user:

root@chef-server:~# chef-server-ctl user-create myotheradmin My OtherAdmin myotheradmin@test.com mypassword -f myotheradmin.pem -o vidm -u myadmin -k myadmin.pem
ERROR: You authenticated successfully to https://127.0.0.1:443 as myadmin but you are not authorized for this action
Response: missing create permission

How do I set the "create" permission for users ?
Looks like knife acl does not do that ?

Thanks
Fanny

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 user-delete commands and the reported authentication and missing-create-permission responses; compare them with the org-user-add and knife acl entry points mentioned in the issue. Reproduce the sequence after deleting pivotal, then determine whether the failure is expected permission behavior or a defect. Done means the supported recovery or permission-management path is identified and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
erlang
Domain
authorization, backend, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.