open-vault/command
Steven Clark 9338c22c53
Trap errors related to vault pki list-intermediate issuer reading (#19165)
* Rename files to match test suite and existing pattern

* Factor out issuer loading into a dedicated function

 - Add a little more checks/validation when loading the a PKI issuer
 - Factor out the issuer loading into a dedicated function
 - Leverage existing health check code to parse issuer certificates

* Read parent issuer once instead of reloading it for every child

 - Read in our parent issuer once instead of running it for every child
   we want to compare against
 - Provides clearer error message that we have failed reading from which
   path to the end user

* PR Feedback

 - Rename a variable for clarity
 - Use readIssuer in the validation of the parent issuer within
   pkiIssuer
 - Add some missing return 1 statements in error handlers that had been
   missed
2023-02-14 08:51:44 -05:00
..
agent VAULT-8436 remove <-time.After statements in for loops (#18818) 2023-02-06 17:49:01 +01:00
config dev docs: clarify internal and external token helpers (#13014) 2022-08-16 16:48:24 -04:00
healthcheck Trap errors related to vault pki list-intermediate issuer reading (#19165) 2023-02-14 08:51:44 -05:00
server Revert #18683 (#18942) 2023-02-01 13:34:53 -06:00
test-fixtures
token update gofumpt to 0.3.1 and reformat the repo (#17055) 2022-09-07 17:31:20 -07:00
agent.go VAULT-13056 fix leasecache usage, add test coverage (#18922) 2023-02-01 11:40:20 -05:00
agent_test.go VAULT-13056 fix leasecache usage, add test coverage (#18922) 2023-02-01 11:40:20 -05:00
approle_concurrency_integ_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
audit.go command/audit: Recommend multiple audit devices (#18348) 2022-12-13 17:51:03 -05:00
audit_disable.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
audit_disable_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
audit_enable.go command/audit: improve audit enable type missing error message (#16409) 2022-07-21 16:43:50 -04:00
audit_enable_test.go command/audit: improve audit enable type missing error message (#16409) 2022-07-21 16:43:50 -04:00
audit_list.go cleanup unused code and fix t.Fatal usage in goroutine in testing (#11694) 2021-09-30 07:33:14 -04:00
audit_list_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
auth.go Remove deprecated CLI commands (#6112) 2019-02-14 11:54:47 -08:00
auth_disable.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
auth_disable_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
auth_enable.go Make API not depend on SDK (#18962) 2023-02-06 09:41:56 -05:00
auth_enable_test.go Mark deprecated builtins Removed (#18039) 2023-01-09 09:16:35 -05:00
auth_help.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
auth_help_test.go Always use a local test server (#4207) 2018-03-28 10:34:37 -04:00
auth_list.go CLI: Add version info to auth/secrets list -detailed (#17293) 2022-09-23 10:40:42 +01:00
auth_list_test.go
auth_move.go remount cli changes (#14159) 2022-02-18 08:50:05 -08:00
auth_move_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
auth_test.go Remove deprecated CLI commands (#6112) 2019-02-14 11:54:47 -08:00
auth_tune.go Vault 8305 Prevent Brute Forcing in Auth methods : Setting user lockout configuration (#17338) 2022-11-01 11:02:07 -07:00
auth_tune_test.go Make API not depend on SDK (#18962) 2023-02-06 09:41:56 -05:00
base.go Fix raw format for other commands, add to docs! (#17730) 2022-10-28 12:53:23 -04:00
base_flags.go VAULT-12264: Fix log rotation params which require an integer (#18666) 2023-01-11 20:04:57 +00:00
base_flags_test.go cleanup unused code and fix t.Fatal usage in goroutine in testing (#11694) 2021-09-30 07:33:14 -04:00
base_helpers.go Fix raw format for other commands, add to docs! (#17730) 2022-10-28 12:53:23 -04:00
base_helpers_test.go CLI: Fix erroneous warning when reading from stdin (#17252) 2022-09-21 21:04:49 +01:00
base_predict.go Make API not depend on SDK (#18962) 2023-02-06 09:41:56 -05:00
base_predict_test.go Mark deprecated builtins Removed (#18039) 2023-01-09 09:16:35 -05:00
base_test.go CLI: add new -header option to be able to add headers to all cli requests #8754 (#12508) 2021-10-27 11:04:04 -04:00
command_test.go VAULT-12833 Update prompts for the rekey command (#18892) 2023-01-30 16:51:01 +00:00
commands.go Vault 11799 Vault CLI Re-Issue (Templating based on existing certificate) (#18499) 2023-02-10 20:27:36 +00:00
commands_nonwindows.go Convert to Go 1.17 go:build directive (#13579) 2022-01-05 12:02:03 -06:00
commands_windows.go Convert to Go 1.17 go:build directive (#13579) 2022-01-05 12:02:03 -06:00
config.go Move checkHCLKeys into hclutil (#4749) 2018-06-12 12:38:08 -04:00
config_test.go Fix output-related tests (#4288) 2018-04-05 20:43:29 -04:00
debug.go Move version out of SDK. (#14229) 2022-12-07 13:29:51 -05:00
debug_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
delete.go `vault delete` should allow the same output options as `vault write`,… (#11992) 2021-07-06 10:36:07 -04:00
delete_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
events.go events: Add websockets and command (#19057) 2023-02-09 13:18:58 -08:00
events_test.go events: Add websockets and command (#19057) 2023-02-09 13:18:58 -08:00
format.go named Login MFA methods (#18610) 2023-01-23 15:51:22 -05:00
format_test.go Shadow globally defined var to avoid race (#18856) 2023-01-26 16:47:42 +00:00
kv.go Mount flag syntax to mitigate confusion from KV-v2 path discrepancies (#14807) 2022-04-06 13:58:06 -07:00
kv_delete.go Fix kv -mount flag error when mount and secret path are the same (#17679) 2022-11-01 09:57:23 -04:00
kv_destroy.go Fix kv -mount flag error when mount and secret path are the same (#17679) 2022-11-01 09:57:23 -04:00
kv_enable_versioning.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
kv_get.go Fix kv -mount flag error when mount and secret path are the same (#17679) 2022-11-01 09:57:23 -04:00
kv_helpers.go Global flag that outputs minimum policy HCL required for an operation (#14899) 2022-04-27 16:35:18 -07:00
kv_list.go Typo and clarity fixes (#14081) 2022-02-15 10:43:49 -08:00
kv_metadata.go Mount flag syntax to mitigate confusion from KV-v2 path discrepancies (#14807) 2022-04-06 13:58:06 -07:00
kv_metadata_delete.go Fix kv -mount flag error when mount and secret path are the same (#17679) 2022-11-01 09:57:23 -04:00
kv_metadata_get.go Fix kv -mount flag error when mount and secret path are the same (#17679) 2022-11-01 09:57:23 -04:00
kv_metadata_patch.go improve kv CLI to remove data or custom metadata using kv patch (#18067) 2022-11-21 17:11:36 -05:00
kv_metadata_patch_test.go improve kv CLI to remove data or custom metadata using kv patch (#18067) 2022-11-21 17:11:36 -05:00
kv_metadata_put.go Fix kv -mount flag error when mount and secret path are the same (#17679) 2022-11-01 09:57:23 -04:00
kv_metadata_put_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
kv_patch.go Skip Formatting For NIL Secret (#18163) 2022-12-01 13:36:24 -06:00
kv_put.go Fix kv -mount flag error when mount and secret path are the same (#17679) 2022-11-01 09:57:23 -04:00
kv_rollback.go Fix kv -mount flag error when mount and secret path are the same (#17679) 2022-11-01 09:57:23 -04:00
kv_test.go Fix kv -mount flag error when mount and secret path are the same (#17679) 2022-11-01 09:57:23 -04:00
kv_undelete.go Mount flag syntax to mitigate confusion from KV-v2 path discrepancies (#14807) 2022-04-06 13:58:06 -07:00
lease.go Add lease subcommand 2017-10-24 09:30:47 -04:00
lease_lookup.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
lease_lookup_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
lease_renew.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
lease_renew_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
lease_revoke.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
lease_revoke_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
list.go Vault CLI: show detailed information with ListResponseWithInfo (#15417) 2022-05-18 13:00:50 -04:00
list_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
log_flags.go VAULT-12264: Fix log rotation params which require an integer (#18666) 2023-01-11 20:04:57 +00:00
log_flags_test.go VAULT-12264: Fix log rotation params which require an integer (#18666) 2023-01-11 20:04:57 +00:00
login.go fixing a typo in command login (#17996) 2022-11-16 19:21:01 -05:00
login_test.go Shadow globally defined var to avoid race (#18856) 2023-01-26 16:47:42 +00:00
main.go Fix command.RunCustom(...) correctly (#18904) 2023-01-31 08:18:21 -05:00
monitor.go api/monitor: Adding log format to monitor command and debug (#15536) 2022-05-24 13:10:53 -04:00
monitor_test.go Make API not depend on SDK (#18962) 2023-02-06 09:41:56 -05:00
namespace.go VAULT-7256: Add custom_metadata to namespaces (#16640) 2022-08-09 11:38:03 -04:00
namespace_api_lock.go API Lock CLI OSS port (#12925) 2021-10-26 10:52:29 -06:00
namespace_api_unlock.go API Lock CLI OSS port (#12925) 2021-10-26 10:52:29 -06:00
namespace_create.go VAULT-7256: Add custom_metadata to namespaces (#16640) 2022-08-09 11:38:03 -04:00
namespace_delete.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
namespace_list.go cleanup unused code and fix t.Fatal usage in goroutine in testing (#11694) 2021-09-30 07:33:14 -04:00
namespace_lookup.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
namespace_patch.go Fix vault cli namespace patch examples (#18143) 2022-12-01 14:42:40 -06:00
operator.go Add "operator" subcommand 2017-10-24 09:30:48 -04:00
operator_diagnose.go update diagnose command to no longer use docker (#19102) 2023-02-09 11:59:46 -05:00
operator_diagnose_test.go Vault-6037 making filesystem permissions check opt-in (#15452) 2022-05-17 11:34:31 -07:00
operator_generate_root.go Add helper for encoding/decoding root tokens and OTP generation in SDK module (#10504) (#10505) 2021-12-01 08:05:49 -05:00
operator_generate_root_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
operator_init.go Revert #18683 (#18942) 2023-02-01 13:34:53 -06:00
operator_init_test.go Validate parameters for vault operator init (#16379) 2022-07-25 12:45:04 -07:00
operator_key_status.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
operator_key_status_test.go Always use a local test server (#4207) 2018-03-28 10:34:37 -04:00
operator_members.go Add autopilot automated upgrades and redundancy zones (#15521) 2022-05-20 16:49:11 -04:00
operator_migrate.go Parallel migration (#18815) (#18817) 2023-01-25 15:19:45 +00:00
operator_migrate_test.go Parallel migration (#18815) (#18817) 2023-01-25 15:19:45 +00:00
operator_raft.go Raft cli docs (#8548) 2020-03-17 09:46:44 -04:00
operator_raft_autopilot_get_config.go Add autopilot automated upgrades and redundancy zones (#15521) 2022-05-20 16:49:11 -04:00
operator_raft_autopilot_set_config.go Add autopilot automated upgrades and redundancy zones (#15521) 2022-05-20 16:49:11 -04:00
operator_raft_autopilot_state.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
operator_raft_join.go Use %q for quoted strings where appropriate (#15216) 2022-08-03 12:32:45 -06:00
operator_raft_listpeers.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
operator_raft_remove_peer.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
operator_raft_snapshot.go Raft cli docs (#8548) 2020-03-17 09:46:44 -04:00
operator_raft_snapshot_restore.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
operator_raft_snapshot_save.go Fixing excessive unix file permissions (#14791) 2022-04-01 12:57:38 -04:00
operator_rekey.go VAULT-12833 Update prompts for the rekey command (#18892) 2023-01-30 16:51:01 +00:00
operator_rekey_test.go VAULT-12833 Update prompts for the rekey command (#18892) 2023-01-30 16:51:01 +00:00
operator_seal.go Rename master key to root key (#13324) 2021-12-06 17:12:20 -08:00
operator_seal_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
operator_step_down.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
operator_step_down_test.go Add "operator" subcommand 2017-10-24 09:30:48 -04:00
operator_unseal.go Rename master key to root key (#13324) 2021-12-06 17:12:20 -08:00
operator_unseal_test.go Vault CLI: show detailed information with ListResponseWithInfo (#15417) 2022-05-18 13:00:50 -04:00
operator_usage.go Global flag that outputs minimum policy HCL required for an operation (#14899) 2022-04-27 16:35:18 -07:00
patch.go Add PATCH support to Vault CLI (#17650) 2022-10-26 14:30:40 -04:00
patch_test.go Respond with data to all writes in PKI engine (#18222) 2022-12-05 10:40:39 -05:00
path_help.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
path_help_test.go Fix bad rebase 2017-10-24 09:39:34 -04:00
pgp_test.go fix: PGP subkeys support (#16224) 2022-09-22 09:12:41 -04:00
pki.go Add PKI base command (#18512) 2022-12-21 10:01:57 -05:00
pki_health_check.go Stop using title capitalization for PKI help (#19104) 2023-02-09 16:40:26 +00:00
pki_health_check_test.go Fix command.RunCustom(...) correctly (#18904) 2023-01-31 08:18:21 -05:00
pki_issue_intermediate.go Trap errors related to vault pki list-intermediate issuer reading (#19165) 2023-02-14 08:51:44 -05:00
pki_issue_intermediate_test.go Switch ed25519 keytype to ec keytype to make the fips build happy. (#18889) 2023-01-30 09:08:25 -05:00
pki_list_intermediate.go Trap errors related to vault pki list-intermediate issuer reading (#19165) 2023-02-14 08:51:44 -05:00
pki_list_intermediate_test.go Vault 11798 vault cli issue intermediate (#18467) 2023-01-27 16:41:16 -05:00
pki_reissue_intermediate.go Trap errors related to vault pki list-intermediate issuer reading (#19165) 2023-02-14 08:51:44 -05:00
pki_reissue_intermediate_test.go Vault 11799 Vault CLI Re-Issue (Templating based on existing certificate) (#18499) 2023-02-10 20:27:36 +00:00
pki_verify_sign.go Trap errors related to vault pki list-intermediate issuer reading (#19165) 2023-02-14 08:51:44 -05:00
pki_verify_sign_test.go Switch ed25519 keytype to ec keytype to make the fips build happy. (#18889) 2023-01-30 09:08:25 -05:00
plugin.go Run all builtins as plugins (#5536) 2018-11-06 17:21:24 -08:00
plugin_deregister.go Make API not depend on SDK (#18962) 2023-02-06 09:41:56 -05:00
plugin_deregister_test.go Make API not depend on SDK (#18962) 2023-02-06 09:41:56 -05:00
plugin_info.go Make API not depend on SDK (#18962) 2023-02-06 09:41:56 -05:00
plugin_info_test.go Make API not depend on SDK (#18962) 2023-02-06 09:41:56 -05:00
plugin_list.go Make API not depend on SDK (#18962) 2023-02-06 09:41:56 -05:00
plugin_list_test.go cli/api: Update plugin listing to always include version info in the response (#17347) 2022-09-29 18:22:33 +01:00
plugin_register.go Make API not depend on SDK (#18962) 2023-02-06 09:41:56 -05:00
plugin_register_test.go Make API not depend on SDK (#18962) 2023-02-06 09:41:56 -05:00
plugin_reload.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
plugin_reload_status.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
plugin_reload_test.go Make API not depend on SDK (#18962) 2023-02-06 09:41:56 -05:00
plugin_test.go Make API not depend on SDK (#18962) 2023-02-06 09:41:56 -05:00
policy.go Fix minor docs and help text issues (#4184) 2018-03-22 09:29:59 -04:00
policy_delete.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
policy_delete_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
policy_fmt.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
policy_fmt_test.go Fix output-related tests (#4288) 2018-04-05 20:43:29 -04:00
policy_list.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
policy_list_test.go Add "policy" subcommand 2017-10-24 09:30:48 -04:00
policy_read.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
policy_read_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
policy_write.go Warn on upper case in policy name (#14670) 2022-03-24 13:29:11 -07:00
policy_write_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
print.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
print_token.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
read.go Remove timeout logic from ReadRaw functions and add ReadRawWithContext (#18708) 2023-01-17 15:41:59 -05:00
read_test.go Vault 9800 Fix vault read handling for endpoints with no top-level data object (#17913) 2022-11-17 10:51:37 -08:00
rotate.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
rotate_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
secrets.go Rename mounts to secrets engines and add the subcommand 2017-10-24 09:30:48 -04:00
secrets_disable.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
secrets_disable_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
secrets_enable.go Make API not depend on SDK (#18962) 2023-02-06 09:41:56 -05:00
secrets_enable_test.go plugins: Handle mount/enable for shadowed builtins (#17879) 2022-12-14 13:06:33 -05:00
secrets_list.go CLI: Fix secrets list -detailed headings (#17577) 2022-10-18 14:46:11 +01:00
secrets_list_test.go Add deprecation status to auth/secrets list (#16849) 2022-08-31 16:11:14 -04:00
secrets_move.go remount cli changes (#14159) 2022-02-18 08:50:05 -08:00
secrets_move_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
secrets_tune.go CLI: Tune plugin version for auth/secret mounts (#17277) 2022-09-22 20:55:46 +01:00
secrets_tune_test.go Make API not depend on SDK (#18962) 2023-02-06 09:41:56 -05:00
server.go VAULT-8436 remove <-time.After statements in for loops (#18818) 2023-02-06 17:49:01 +01:00
server_noprofile.go Convert to Go 1.17 go:build directive (#13579) 2022-01-05 12:02:03 -06:00
server_profile.go Convert to Go 1.17 go:build directive (#13579) 2022-01-05 12:02:03 -06:00
server_test.go Add HCP connectivity info to `vault server` startup logs (#18315) 2022-12-12 14:01:02 -05:00
server_util.go add noop ent supported storage check (#17883) 2022-11-10 16:46:59 -05:00
ssh.go command: deprecate errwrap.Wrapf() (#11744) 2021-06-02 09:22:31 -04:00
ssh_test.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
status.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
status_test.go Fix bad rebase 2017-10-24 09:39:34 -04:00
token.go Add token as a subcommand 2017-10-24 09:30:47 -04:00
token_capabilities.go cleanup unused code and fix t.Fatal usage in goroutine in testing (#11694) 2021-09-30 07:33:14 -04:00
token_capabilities_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
token_create.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
token_create_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
token_lookup.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
token_lookup_test.go CLI Enhancements (#3897) 2018-02-12 18:12:16 -05:00
token_renew.go Update token renew docs (#12572) 2021-09-16 16:54:46 -07:00
token_renew_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
token_revoke.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
token_revoke_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
transit_import_key.go Transit Import Key CLI functionality (#18887) 2023-01-30 12:46:57 -06:00
transit_import_key_version.go Transit Import Key CLI functionality (#18887) 2023-01-30 12:46:57 -06:00
unwrap.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
unwrap_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
util.go Fix raw format for other commands, add to docs! (#17730) 2022-10-28 12:53:23 -04:00
version.go Move version out of SDK. (#14229) 2022-12-07 13:29:51 -05:00
version_history.go Add build date (#14957) 2022-04-19 14:28:08 -04:00
version_history_test.go Move version out of SDK. (#14229) 2022-12-07 13:29:51 -05:00
version_test.go Move version out of SDK. (#14229) 2022-12-07 13:29:51 -05:00
write.go Store login MFA secret with tokenhelper (#17040) 2022-10-26 17:02:26 -04:00
write_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00