open-vault/http
Chris Capurso bbb4ab4a41
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
..
assets.go Replace go-bindata-assetfs build dependency with native go:embed (#11208) 2021-08-18 11:05:11 -04:00
assets_stub.go Replace go-bindata-assetfs build dependency with native go:embed (#11208) 2021-08-18 11:05:11 -04:00
auth_token_test.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
cors.go Migrate to sdk/internalshared libs in go-secure-stdlib (#12090) 2021-07-15 20:17:31 -04:00
custom_header_test.go Customizing HTTP headers in the config file (#12485) 2021-10-13 11:06:33 -04:00
forwarded_for_test.go Revert "Migrate internalshared out (#9727)" (#10141) 2020-10-13 16:38:21 -07:00
forwarding_bench_test.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
forwarding_test.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
handler.go Customizing HTTP headers in the config file (#12485) 2021-10-13 11:06:33 -04:00
handler_test.go Add HTTP PATCH support to KV (#12687) 2021-10-13 15:24:31 -04:00
help.go Reorganize request handling code so that we don't touch storage until we have the stateLock. (#11835) 2021-06-11 13:18:16 -04:00
help_test.go Reorganize request handling code so that we don't touch storage until we have the stateLock. (#11835) 2021-06-11 13:18:16 -04:00
http_test.go Customizing HTTP headers in the config file (#12485) 2021-10-13 11:06:33 -04:00
logical.go Add HTTP PATCH support to KV (#12687) 2021-10-13 15:24:31 -04:00
logical_test.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
plugin_test.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
sys_audit_test.go Re-add injecting into top routes (#5244) 2018-09-05 11:45:17 -04:00
sys_auth_test.go Add missed description field for GET /sys/auth/:path/tune endpoint (#8193) 2020-02-15 10:32:47 -08:00
sys_config_cors_test.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
sys_config_state_test.go Add HTTP response headers for hostname and raft node ID (if applicable) (#11289) 2021-04-20 15:25:04 -07:00
sys_feature_flags.go Feature flags API (#10613) 2021-01-06 16:05:00 -06:00
sys_generate_root.go Migrate to sdk/internalshared libs in go-secure-stdlib (#12090) 2021-07-15 20:17:31 -04:00
sys_generate_root_test.go Audit generate root requests and responses. (#8301) 2020-02-06 11:56:37 -05:00
sys_health.go Migrate to sdk/internalshared libs in go-secure-stdlib (#12090) 2021-07-15 20:17:31 -04:00
sys_health_test.go OSS parts of #1891 (sys/health license addition) (#11676) 2021-05-20 13:32:15 -04:00
sys_hostinfo_test.go sys: add host-info endpoint (#7330) 2019-10-03 09:43:52 -07:00
sys_init.go Support processing parameters sent as a URL-encoded form (#8325) 2020-02-12 14:20:22 -08:00
sys_init_test.go Tackle #4929 a different way (#4932) 2018-07-24 13:57:25 -07:00
sys_internal_test.go Kv preflight (#4430) 2018-04-23 15:00:02 -07:00
sys_leader.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
sys_leader_test.go core: Record the time a node became active (#10489) 2020-12-11 16:50:19 -08:00
sys_lease_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
sys_metrics.go Customizing HTTP headers in the config file (#12485) 2021-10-13 11:06:33 -04:00
sys_metrics_test.go Add support for unauthenticated pprof access on a per-listener basis,… (#11324) 2021-04-19 14:30:59 -04:00
sys_monitor_test.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
sys_mount_test.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
sys_mounts_test.go Rename "generic" secret backend to "kv" (#3292) 2017-09-15 09:02:29 -04:00
sys_policy_test.go Re-add injecting into top routes (#5244) 2018-09-05 11:45:17 -04:00
sys_raft.go Migrate to sdk/internalshared libs in go-secure-stdlib (#12090) 2021-07-15 20:17:31 -04:00
sys_rekey.go Support processing parameters sent as a URL-encoded form (#8325) 2020-02-12 14:20:22 -08:00
sys_rekey_test.go The big one (#5346) 2018-09-17 23:03:00 -04:00
sys_rotate_test.go OSS side barrier encryption tracking and automatic rotation (#11007) 2021-02-25 14:27:25 -06:00
sys_seal.go Implement sys/seal-status and sys/leader in system backend (#10725) 2021-01-20 14:04:24 -06:00
sys_seal_test.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
sys_wrapping_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
testing.go Customizing HTTP headers in the config file (#12485) 2021-10-13 11:06:33 -04:00
unwrapping_raw_body_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
util.go Upgrade go-limiter to fix building on 1.17 (#12358) 2021-09-01 16:28:47 -05:00