vault/sdk/framework
Chris Capurso 6f65a4addc
Add HTTP PATCH support to KV (#12687)
* handle HTTP PATCH requests as logical.PatchOperation

* update go.mod, go.sum

* a nil response for logical.PatchOperation should result in 404

* respond with 415 for incorrect MIME type in PATCH Content-Type header

* add abstraction to handle PatchOperation requests

* add ACLs for patch

* Adding JSON Merge support to the API client

* add HTTP PATCH tests to check high level response logic

* add permission-based 'kv patch' tests in prep to add HTTP PATCH

* adding more 'kv patch' CLI command tests

* fix TestHandler_Patch_NotFound

* Fix TestKvPatchCommand_StdinValue

* add audit log test for HTTP PATCH

* patch CLI changes

* add patch CLI tests

* change JSONMergePatch func to accept a ctx

* fix TestKVPatchCommand_RWMethodNotExists and TestKVPatchCommand_RWMethodSucceeds to specify -method flag

* go fmt

* add a test to verify patching works by default with the root token

* add changelog entry

* get vault-plugin-secrets-kv@add-patch-support

* PR feedback

* reorder some imports; go fmt

* add doc comment for HandlePatchOperation

* add json-patch@v5.5.0 to go.mod

* remove unnecessary cancelFunc for WriteBytes

* remove default for -method

* use stable version of json-patch; go mod tidy

* more PR feedback

* temp go get vault-plugin-secrets-kv@master until official release

Co-authored-by: Josh Black <raskchanky@users.noreply.github.com>
2021-10-13 15:24:31 -04:00
..
testdata update OpenAPI output to use DisplayAttributes struct (#6928) 2019-06-21 11:08:08 -04:00
backend.go Add HTTP PATCH support to KV (#12687) 2021-10-13 15:24:31 -04:00
backend_test.go [VAULT-2825] Fix erroneous 500 resp for field validation errors (#12042) 2021-07-12 13:39:28 -04:00
field_data.go Migrate to sdk/internalshared libs in go-secure-stdlib (#12090) 2021-07-15 20:17:31 -04:00
field_data_test.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
field_type.go Fix barrier key autoration config edge cases (#11541) 2021-05-05 14:39:04 -05:00
filter.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
identity.go Add identity templating helper to sdk/framework (#8088) 2020-01-06 10:16:52 -08:00
identity_test.go Add identity templating helper to sdk/framework (#8088) 2020-01-06 10:16:52 -08:00
lease.go Patch expiration fix over from ENT (#11650) 2021-05-18 14:55:38 -07:00
lease_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
openapi.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
openapi_test.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
path.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
path_map.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
path_map_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
path_struct.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
path_struct_test.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
path_test.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
policy_map.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
policy_map_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
secret.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
secret_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
template.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
testing.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
wal.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
wal_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00