Commit Graph
73 Commits
Author SHA1 Message Date
Todd Knight c4d3414016 Add Host Set CUDLR handler and SDK (#290) 2020-08-21 10:57:30 -07:00
Jeff Mitchell 627a353ccb Don't return an empty resource if there was an apiErr (#294) 2020-08-20 17:31:38 -04:00
Todd Knight d5678c4f80 Handler for Host CRUDL actions (#287) 2020-08-20 08:20:26 -07:00
Todd Knight 7474e956dd List Catalogs for Repo and API Handler (#288) 2020-08-19 21:49:52 -07:00
Jim 9570897032 basic keys mgmt repo (#264) 2020-08-19 16:47:18 -04:00
Todd Knight eaae887bbe Don't require type for children of subtyped resources. (#285) 2020-08-19 10:51:15 -07:00
Todd Knight d86e58476f Version can be passed through request body (#281)
* Scopes inline version into update request body.

* Users inline version into update request body.

* Group inline version into update and add|set|remove member request body.

* Role inline version into update and add|set|remove grant|principal request body.

* Auth method inline version into update request body.

* Auth Account inline version into update request body.

* host catalog version is inlined for update.

* Gen after merge.

* Submitting template changes for version handling.
2020-08-18 17:38:38 -07:00
Jeff Mitchell e20c150617 Fix some tests broken by merge 2020-08-18 19:16:52 -04:00
Jeff Mitchell adfc5681be Auth methods CLI (#277) 2020-08-18 17:46:34 -04:00
Jeff Mitchell 282177afc2 Remove the default org (#270) 2020-08-17 15:38:41 -04:00
Todd Knight e14f968fc3 Account (Set|Change)Passsword (#267) 2020-08-17 09:37:15 -07:00
Jeff Mitchell d3a1cd949b Update password auth method flags to fit current standards 2020-08-13 18:32:58 -04:00
Jeff Mitchell bb6b189513 Create a default role on new scope creation (#265) 2020-08-13 17:39:48 -04:00
Jeff Mitchell e89e9d1349 Add groups CLI command (#266) 2020-08-13 17:35:55 -04:00
Jeff Mitchell f1d69ea1ee Fix breakage from change to api generation 2020-08-12 21:57:44 -04:00
Jeff Mitchell 2c4c991cca Export API clients 2020-08-12 17:34:56 -04:00
Jeff Mitchell 419e2146d4 Revert "Move api tests to internal package to remove issue with external resources depending on internal libs"
This reverts commit 326086e352.
2020-08-12 17:19:21 -04:00
Jeff Mitchell 326086e352 Move api tests to internal package to remove issue with external resources depending on internal libs 2020-08-12 17:06:09 -04:00
Jeff Mitchell c195c4bc9b Remove disabled property and sync up field ordering and numbering (#259) 2020-08-12 13:00:49 -04:00
Jeff Mitchell 203e2b5dc2 Initial worker porting steps (#232) 2020-08-12 00:40:39 -04:00
Jeff Mitchell 4cfab04307 Migrate user name to login name (#255) 2020-08-11 17:25:00 -04:00
Jeff Mitchell 78d7f539c5 Add versioning to host catalogs/sets/hosts and fix up tests (#247)
* Start adding version to host resources and fixing up tests

* Add versioning to host resources and update API tests

* Fix nil in test

* Add missing update
2020-08-11 11:20:06 -04:00
Jeff Mitchell 565059ed63 Add versioning to auth methods and accounts (#249) 2020-08-11 11:19:29 -04:00
Jeff Mitchell 6661117d4c The name. The name. The name! 2020-08-10 17:15:02 -04:00
Jeff Mitchell 0c18e35b9d Fix group service proto for versions 2020-08-08 19:27:49 -04:00
Jeff Mitchell 4e58c55d66 Fix up user API tests 2020-08-08 18:28:08 -04:00
Jeff Mitchell 827d86bef1 Update API role tests and fix the structure of the protos so versioning works 2020-08-08 17:46:41 -04:00
Jeff Mitchell 99ed9d9b0c Fix group api tests 2020-08-07 21:09:52 -04:00
Jeff Mitchell bbd200101f Move update versioning to query parameter, and fix up scope API tests (#244)
* Move update versioning to query parameter, and fix up scope API tests

* Add version checks for update requests in other services
2020-08-07 17:56:55 -04:00
Jeff Mitchell f07bb9dae6 Fix breakage after change to template from previous PR 2020-08-07 15:18:44 -04:00
Jeff Mitchell df4730b1a0 Minor fixes and first API test changeover (#243) 2020-08-07 15:01:18 -04:00
Jeff Mitchell 908a299ea3 Convert SDK to the new options API (#238) 2020-08-07 12:55:02 -04:00
Todd Knight 6de1f7ee16 Auth Token Read/List/Delete handler and Go SDK (#199)
* Creating Auth Token Get List and Delete API.
2020-07-23 09:53:37 -07:00
Todd Knight ed05652729 Add Handlers for Add/Set/Remove Group Members (#209)
* Adding members to groups.

* Adding Group membership handler and API methods.

* Adding custom methods to permision actions list.
2020-07-22 15:10:21 -07:00
Jeff Mitchell 995b76bbc5 Fix error that slipped in during review in #206
A strings.LastIndex call check was meant to be `-1` and got
clumsy-fingered to `-11`. This causes panics with API clients.
2020-07-22 13:29:53 -04:00
Jeff Mitchell 388a13b10d Convert scopes to the new paradigm (#206) 2020-07-22 00:14:28 -04:00
Todd Knight 5bb13e71fe Include Principals and Grants on Roles When Updating the Role. (#203) 2020-07-17 09:31:10 -07:00
Jeff Mitchell 99653727bb Migrate grants to more structured output (#194) 2020-07-16 22:18:27 -04:00
Todd Knight 5826bf42fd Fixing api test cases. (#201) 2020-07-16 10:54:24 -07:00
Todd Knight 28dbcd84bd Authenticate Handler API and SDK, and much more (#183) 2020-07-14 17:32:47 -04:00
Jeff Mitchell acce195dcb Organizations -> orgs consistency (#189)
* Organizations -> orgs consistency

* Fix up some tests and some mistaken substitutions
2020-07-11 12:00:49 -04:00
Todd KnightandJeff Mitchell 847ca1cc78 Grant management added to Roles API and SDK (#185)
* Adding grants related methods to Roles.

* Adding grants back after the merge of Principals.

* Adding tests for Grant related custom methods.

* Improving api handler methods.

* Fixing tests and sdk field.

* Adding todos for adding principals and grants to List and Update Role responses.

* Fix up Set* tests and fix SetPrincipals bug.

* Making AddPrincipals and RemovePrincipals similar to the tests for AddGrants and RemoveGrants.

* Add JSON grants to output (#187)

I also changed canonical_grants to grants_canonical and used
grants_json. I believe that when members are simply different formats of
other members this is the preferred way to have it in the API. Let me
know if you disagree and we can dig in more.

* Regenerate the API role resource.

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2020-07-10 17:42:47 -07:00
bcdcaffa6f Port over 162 and 165 to master (#176)
Co-authored-by: Jim Lambert <jlambert@hashicorp.com>
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
2020-07-10 15:46:26 -04:00
Todd KnightandJeff Mitchell 1ddc59f81e Adding principal custom methods to roles handler. (#180)
* Adding Add/Set/Remove principals API calls.

* Add SDK custom methods.

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2020-07-10 11:21:11 -07:00
Todd Knight 2727917b2a Adding List to go SDK (#164) 2020-07-02 10:26:31 -07:00
Todd Knight 9a1539867e Adding SDK ability to do CRUD operations on groups and roles under the project scope. (#157) 2020-06-30 10:25:58 -07:00
Todd Knight 5b1e4a680d Create Role CUDLR API and SDK (#135)
* Implement the Role CRUD API.

* Implement the Role List API.

* Adding Roles SDK.
2020-06-22 06:56:27 -07:00
Todd Knight 6ea448a7f3 Adding Groups API endpoint and SDK (#122)
* feat: Add group grpc handler.

* feat: Add group sdk hooks.

* fix:  Adding forgotten generated group sdk file.

* fix:  Fix a copy/paste error in test msg.

* fix:  Correct assert error msg.

* fix: Remove unused proto imports.
2020-06-15 15:22:41 -07:00
Todd Knight df6ca5289f Create User Service Handler and SDK (#106)
* Create user handler stuff.

* Fixing Not Found errors from DB.

* Fixing param names.

* Update the proto's go package generation.

* Generate the user resource.

* Adding SDK methods for users.

* Fix the base type of Users and add tests.

* Connect user service to the controller handler.

* Attach the default org to the Test Controller's client.

* Take into account the provided request paths when the client builds the org/project path prefix.

* Adding comments to the API.

* rename repo function to repoFn.

* Fix typo in update mask errors.

* Clean up tests.

* Remove special checks for request url content in the api client and fix CORS test.
2020-06-09 11:20:59 -07:00
Todd Knight 2c3fbe3024 Invalid Argument errors provide per field details. (#110)
* Invalid Argument errors now return a per field error message.

* Creating an API error struct.

* SDK uses field error details proto.

* Adding tests specifically for handler helper error messages resulting in expected API output.

* Inlining the error checks into the table driven tests.  Use protocmp for assertions to make printing out diffs easier to parse.

* Aggregate the invalid argument fields detected to be wrong.

* Make the returned order of fields deterministic in the error details..

* Fixing formatting issue in errors_test.go.

* Test to confirm unimplemented results in a 405 and not 404.
2020-06-09 10:51:50 -07:00