summaryrefslogtreecommitdiff
path: root/lib/chef_zero/endpoints
Commit message (Collapse)AuthorAgeFilesLines
* Update http -> https links in tests / commmentshttpsTim Smith2021-09-071-1/+1
| | | | | | | We have to update our test link to get chef-server to pass. I updated all the comments while I was there. Signed-off-by: Tim Smith <tsmith@chef.io>
* Optimize requires for non-omnibus installsTim Smith2020-08-1252-52/+52
| | | | | | require is quite slow in Ruby and doing requires for things you've already required is also slow. We've used this simple hack in Chef to speed up our requires. In the omnibus installs we patch how rubygems works to make this somewhat pointless, but this will help non-omnibus installs Signed-off-by: Tim Smith <tsmith@chef.io>
* Substitute require for require_relativeTim Smith2019-12-2971-104/+104
| | | | | | require_relative is significantly faster and should be used when available. Signed-off-by: Tim Smith <tsmith@chef.io>
* Apply ChefstyleTim Smith2019-12-2922-26/+42
| | | | | | Autocorrect with the latest chefstyle Signed-off-by: Tim Smith <tsmith@chef.io>
* Initial brand refactoringTensibai2019-04-252-3/+5
| | | | Signed-off-by: Tensibai <tensibai@iabis.net>
* Better indentation fixTim Smith2019-03-191-2/+2
| | | | | | Rubocop made it worse Signed-off-by: Tim Smith <tsmith@chef.io>
* Chefstyle fixesTim Smith2019-03-182-5/+5
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* fixes for new chefstyleLamont Granquist2018-07-0310-14/+14
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* remove hashrocket syntaxlcg/remove-hashrocketsLamont Granquist2018-06-2620-42/+42
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* chefstyle 0.6Thom May2018-02-1517-48/+43
| | | | Signed-off-by: Thom May <thom@chef.io>
* Fix default perms on cookbook_artifact objectsSUSTAIN-728/cb-artifact-acl-endpointsNolan Davidson2017-10-271-1/+1
| | | | | | | | | | The ACLs for `cookbook_artifact` objects currently do not include the creator of the object. Adding the `:create` option to the `set_data` call (which forwards it on to the `set` method on the data store), allows the `cookbook_artifact` object to have the creator added to its ACL. Signed-off-by: Nolan Davidson <ndavidson@chef.io>
* remove debuggingLamont Granquist2017-07-141-2/+0
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add the universe endpointLamont Granquist2017-07-142-0/+33
| | | | | | | | | because it makes sense for chef-zero i need it for integration testing against berks to kill off the uses of the berkshelf-api gem. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* GET /users?email=ME@MINE.COM -- compare emails ignoring casesr/pool-608/search-users-by-case-insensitive-emailStephan Renatus2017-05-311-3/+7
| | | | | | | | | | | | As of POOL-608, the query will return users with the mail `me@mine.com`, too. While this is technically a little incorrect (only the host part is case insensitive), most mail providers treat the user part as case insensitive as well. Note that this implies that the response may involve more than one user. But chef-zero behaves like chef-server does, returning them all. Signed-off-by: Stephan Renatus <srenatus@chef.io>
* implement rfc090 for named nodes endpoint (#264)Jeremy Miller2017-05-251-0/+4
| | | | | * implement rfc090 for named nodes endpoint Signed-off-by: Jeremy J. Miller <jm@chef.io>
* Remove cookbook segmentsThom May2017-03-295-21/+22
| | | | | | | | This implements RFC 67, Cookbook Segment Deprecation, for the default backend of Chef Zero. It also does a little bit of work to make API versions more ergonomic. Signed-off-by: Thom May <thom@may.lt>
* Fix pagination with start parametersnls/fix-start-paginationNathan L Smith2016-12-051-21/+13
| | | | | | | | | | | This builds on fixes added in #247 and additional tests added in chef/chef-server#1028. Handle the query parameters in the search method instead of the get method to make them more consistent and work properly when start values are given. Signed-off-by: Nathan L Smith <smith@chef.io>
* Handle the start and rows parameters correctlynls/SPOOL-436/toomanyrowsNathan L Smith2016-12-041-0/+12
| | | | | | | | | | | | | | | | | Chef Zero would, on a search request using the "start" or "rows" parameters, always return all rows. This change makes it so only the correct number of rows are returned or the results start at the correct index. This change will make the tests added in oc-chef-pedant in chef/chef-server#1028 pass. Also update the Gemfile to use HTTPS URLs for Git sources, remove unused comments, and use the Chef Gem from RubyGems as the previous comment suggested. Signed-off-by: Nathan L Smith <smith@chef.io>
* remove create additions flaglcg/remove-create-additionsLamont Granquist2016-09-0238-57/+57
| | | | | | FFI_Yajl has never implemented this flag Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Revert "remove create additions flag"Lamont Granquist2016-09-0238-57/+57
| | | | This reverts commit c674dfeacf773579a2eb56cb3c02428268452b50.
* remove create additions flagLamont Granquist2016-09-0238-57/+57
| | | | | | FFI_Yajl has never implemented this flag Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* store ACEs by client/usermp/SPOOL-340Marc Paradise2016-08-261-0/+11
| | | | | | | | | | | Chef Server has the ability to return users and clients separately within an GET ACL request when `detail=granular`. To support that, we need to store them separately and determine if we want to present `actors` or `users` and `clients` at the time of the request. This change makes a reasonable best effort at capturing the creator type (user v client) correctly and uses that for determining its assignment in acls.
* Ensure that the cookbook version endpoint doesn't trip over itselfThom May2016-08-011-3/+7
| | | | Signed-off-by: Thom May <thom@may.lt>
* ChefStyletm/styleThom May2016-07-2971-431/+426
| | | | Signed-off-by: Thom May <thom@may.lt>
* Return HTTP 400 Bad Request on Solr parse errorlcg/rebase-101Steven Danna2016-07-191-0/+10
| | | | | | | | | | | | | | | | | | Previously, chef-zero would return an HTTP 500 Internal Server Error when the Solr parser failed. Now, we return HTTP 400 with an error message identical to that of the Erchef server. Returning HTTP 400 also improves the end-user experience since knife returns more sensible error messages. Before this patch: > knife search nodes 'recipes:bar::bar' ERROR: Server returned error 500 for http://127.0.0.1:8889/search... After: > knife search nodes 'recipes:bar::bar' ERROR: knife search failed: invalid search query: 'recipes:bar::bar'
* Add external_authentication_uid to actors endpoint for queryingsaml/et-205kmacgugan2016-06-091-11/+21
|
* Actually merge key data in user PUT responsejk/merge_more_betterJohn Keiser2016-04-141-1/+1
|
* Fix users endpoint in OSC compat mode to use a data store URLJohn Keiser2016-04-141-11/+12
| | | | under /organizations (otherwise ChefFS will not understand it)
* Implemented GET /orgs/ORG/users/USER/keys(/key) endpoint recently added to ↵tc/org-scoped-user-keys-getTyler Cloke2016-03-154-6/+57
| | | | server.
* Use json helpers instead of calling FFI_Yajl directlyapi-v1danielsdeleo2016-02-252-13/+13
|
* Implement APIv1 behaviorsdanielsdeleo2016-02-254-6/+58
|
* Move default keys logic into ActorDefaultKeyEndpoint; fix #putjr/pedant-keys-2Jordan Running2016-02-245-69/+106
|
* Make user and client keys endpoints pass Pedant specsJordan Running2016-02-245-23/+339
| | | | | | | | | | | | | | | | | | | | | | | | | - Implement ActorKeyEndpoint, ActorKeysEndpoint. - Implement user, client keys in `ActorEndpoint#delete`, `#put`. - RestBase - Fix RestErrorResponse exceptions to report actual `rest_path` instead associated with the failed data store operation instead of `request.rest_path`. - Move `json_response`, `already_json_response` args `request_version` and `response_version` into options hash; add docs. - DataError, RestErrorResponse: Pass useful message text to `super`. - RestRouter: Clean up logging - Print request methods, paths and bodies more readably for log_level >= INFO. - Pretty-print RestRequest objects (only printed when log_level == DEBUG). - Server: Change default log_level to `:warn` (to enable logging cleanup above). - `Rakefile`, `spec/run_oc_pedant.rb` - Consume RSpec, Pedant options from `ENV['RSPEC_OPTS']`, `ENV['PEDANT_OPTS']` (see `rake -D`). - Consume `ENV['LOG_LEVEL'` (see `rake -D`). - Clean up ChefZero::Server default opts and move duplicated logic to `start_chef_server` method.
* Fix container creation (was using wrong path)cd/run-acl-specsJohn Keiser2016-01-281-2/+1
|
* Restore creator into policy_group ACLJohn Keiser2016-01-271-1/+1
|
* Return 410 on /controls so we stop skipping that pedant spec.cd/run-controls-specsChris Doherty2016-01-251-0/+15
|
* Implement POST /containers to create a container with the given 'id' or ↵Chris Doherty2016-01-211-0/+13
| | | | 'container_name'.
* Support Chef versions that don't support cookbook_artifactsjk/cookbook-artifacts-hooverJohn Keiser2016-01-151-1/+8
|
* Rename cookbook artifactsJohn Keiser2016-01-152-5/+6
|
* Make hoovering and deleting parent dir work everywhere for cookbook_artifactsJohn Keiser2016-01-152-8/+10
|
* Implement /cookbook_artifacts endpoints.Chris Doherty2015-12-104-4/+129
|
* Split policy endpoints into separate endpointsJohn Keiser2015-12-079-369/+256
|
* Make policy groups and policies bettererJohn Keiser2015-12-073-158/+14
|
* principal_endpoint.rb: comments.Chris Doherty2015-11-131-0/+4
|
* Add a dummy GET that returns meaningful values, due to pedant making ↵Chris Doherty2015-11-101-0/+31
| | | | Solr-related calls.
* Implement oc_pedant's REST routes for policyfiles.Chris Doherty2015-11-104-0/+411
|
* Merge pull request #140 from terceiro/remove-chef-depChris Doherty2015-08-241-5/+2
|\ | | | | Remove dependency on chef
| * Remove implicit dependency on chefAntonio Terceiro2015-06-141-5/+2
| | | | | | | | | | | | | | You don't want chef-zero depending on chef, since chef already depends on chef-zero and circular dependencies are a pain to deal with. This closes issue #136
* | Adding back logic to delete the association request when adding a user to an ↵tball/add_user_to_orgtyler-ball2015-08-193-16/+37
| | | | | | | | org (as well as adding the user to the groups)
* | Use new json_response API for /server_api_versionAndrew Brown2015-08-141-1/+3
| | | | | | | | | | We should be using the new API for json_response, since this is a new endpoint.