Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting user key via incorrect API? #301

Open
veetow opened this issue Feb 6, 2018 · 1 comment
Open

Getting user key via incorrect API? #301

veetow opened this issue Feb 6, 2018 · 1 comment

Comments

@veetow
Copy link

veetow commented Feb 6, 2018

Based on the API documentation for retrieving user keys:
https://docs.chef.io/api_chef_server.html#id12

It would seem to me that get_key should be using the root-scoped v1 API instead of the org-scoped one that's being used here:

api.org_scoped_rest_v1.get("#{request_actor_type}/#{name}/keys/default").fetch("public_key")

Am I understanding correctly or is the Chef API documentation incorrect?

@kamaradclimber
Copy link
Contributor

Hello @veetow ,

thanks for reporting this inconsistency.
Indeed at the moment, chef server api documents user api outside of the org specific endpoint.

My opinion is that chef server api is not very consistent since users are most likely scoped to org. I'll let @thommay gives the "chef" voice on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants