Commit Graph
46 Commits
Author SHA1 Message Date
Jim 25e657fa51 Ongoing OIDC: support to request additional OIDC scopes from the IdP (#1175) 2021-04-28 06:53:13 -04:00
Jeff Mitchell 4690225c1e Update delete action behavior and JSON format output (#1155)
This PR changes delete behavior:

* On success, a 204 is returned rather than a 200 with an empty JSON object
* The CLI now passes through the 404 error if encountered instead of swallowing it

It also updates formatting for JSON to use the response body, which means that the item (or items) in the JSON format are actually the format across the wire, instead of being reinterpreted by unmarshaling into the Go SDK and then remarshaling.
2021-04-26 20:38:55 -04:00
Todd Knight 14c222709c Make oidc auth callback redirect on most errors (#1105) 2021-04-13 09:21:26 -07:00
Todd Knight 71673ea161 Pass disable_discovered_config_validation in the API change-state call (#1100) 2021-04-12 08:49:22 -07:00
Jeff Mitchell f05f37d0fa Fix panic in non-generated API calls when printing as JSON (#1095)
Fixes #992
2021-04-09 13:09:51 -04:00
dd0f34bc35 Add new OIDC auth method. (#1090)
Co-authored-by: Todd Knight <T.Alan.Knight@gmail.com>
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
2021-04-08 20:54:32 -04:00
Jeff Mitchell 6605b4c9f8 Revamp authenticate (#1025) 2021-03-24 16:07:43 -04:00
Jeff Mitchell ea23737258 Port over API bits from #962 (#965) 2021-02-25 12:39:51 -05:00
Todd Knight cac1e60e11 Add filters to listing different resources in the go sdk. (#957) 2021-02-22 13:31:17 -07:00
Jeff Mitchell 6cd97a4a6e Add support for recursive listing (#885) 2021-01-25 19:37:40 -05:00
Jeff Mitchell dcb15cffbd Add authorized actions output on resources (#870) 2021-01-20 10:53:01 -05:00
Jeff Mitchell 9de928318d Skip curl output when using automatic versioning and reading (#858)
This makes it so that the actual output is the update/delete.

Fixes #856
2021-01-08 17:30:41 -05:00
Michael GaffneyandJeff Mitchell 94cb79bbdd See how Boundary would look with gofumpt applied (#853)
* See how Boundary would look with https://github.com/mvdan/gofumpt applied

Results of running `gofumpt -w -s .`

* Update tools file and Makefile for gofumpt

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2021-01-07 10:02:32 -05:00
Todd Knight aa4157639c Change Format of API Error (#784)
This is a wire breaking change for json errors since we have removed and renamed a few fields, and changed part of the structure of the returned json error.

* Remove redundant fields in Status, details.error_id, details.TraceId and details.request_id from API errors.

* Added wrapped errors and "ops" field to indicate the internal operation of the errors returned by the API.

* Added error cli error reporting of Op and wrapped errors.
2020-12-07 14:25:16 -07:00
Jeff Mitchell 5cbfcf8eb6 Shuffle things around out of new modules 2020-10-07 14:03:42 -04:00
Todd Knight fd0da998e8 SDK error revamp (#432)
SDK methods now return 1 error.  To differentiate between Client errors and Server errors I've also implemented the AsServerError function which returns an *api.Error if it is an error originating from the remote server or nil otherwise.
2020-09-24 14:34:58 -07:00
Jeff Mitchell a660e56ee7 Fix whitespace typo in generated API 2020-09-16 10:49:38 -04:00
Jeff Mitchell a00ee7a948 Add Result types to Go SDK and properly populate body/map fields (#358) 2020-09-15 01:08:21 -04:00
Jeff Mitchell b7524f8cfb Decode to both the struct and a map and add access (#349)
This will allow for better TF integration.
2020-09-11 00:51:55 -04:00
Jeff Mitchell 535bca5a7a Make Authenticate less misleading
Because clients clone in the API now, setting the token on the
authtokens client may mislead the user into thinking it's setting it on
the base client. Remove that set call.
2020-09-09 10:33:23 -04:00
Jeff Mitchell f94f21fd97 Update API codes (#336) 2020-09-08 23:57:26 -04:00
Todd Knight c3ecea172d Generate new version of SDK resources and Add Tests (#331) 2020-09-08 16:27:51 -04:00
Todd Knight 37e56ab46b Pathing updated to support new and old styles (#323) 2020-09-02 19:43:41 -07:00
Jeff Mitchell 17ecb6f2ce Separate accounts/host catalogs/host sets into their own packages (#311) 2020-08-27 20:43:33 -04:00
Jeff Mitchell 490be8a7e4 Add ability to skip role creation on scope create (#308)
* Initial work on scope creation skipping

* Fix things
2020-08-26 23:27:25 -04:00
Jeff Mitchell 8f579c75c3 paum -> ampw (#303) 2020-08-25 00:21:08 -04:00
Jeff Mitchell 627a353ccb Don't return an empty resource if there was an apiErr (#294) 2020-08-20 17:31:38 -04: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 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 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 4cfab04307 Migrate user name to login name (#255) 2020-08-11 17:25:00 -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 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