chef-boneyard / knife-acl

knife plugin for working with ACLs on Chef Server
http://www.chef.io
Apache License 2.0
81 stars 15 forks source link

'acl add' request fails with 400 Bad Request #21

Closed mstyne closed 9 years ago

mstyne commented 9 years ago

I'm attempting to update the ACLs for some nodes that were migrated from a Chef 11 Server, but it's either not going well, or I don't know what I'm doing.

$ knife acl add nodes some.host.com update client some.host.com
ERROR: The data in your request was invalid
Response: <html><head><title>400 Bad Request</title></head><body><h1>Bad Request</h1>Bad Request<p><hr><address>mochiweb+webmachine web server</address></body></html>

The end game I'm hoping for is for the node to be able to update its own data; post migration to Chef Server 12 every node gets a 403 Forbidden error when trying to do so.

mstyne commented 9 years ago

It would appear this happens when the client doesn't exist ... so this isn't an issue with knife-acl per se, just with the feedback returned to the user.

stevendanna commented 9 years ago

@mstyne Thanks for reporting this bug. We recently fixed oc_erchef to return better error messages:

https://github.com/chef/oc_erchef/pull/77

That should be in the latest version of Chef Server (12.0.4).

mstyne commented 9 years ago

@stevendanna Thanks!

INFO: HTTP Request Returned 400 Bad Request: Invalid/missing actor in request body

Much improved! Have a good week.