open-vault/command
VAL a44505dd06
Native Login method for Go client (#12796)
* Native Login method, userpass and approle interfaces to implement it

* Add AWS auth interface for Login, unexported struct fields for now

* Add Kubernetes client login

* Add changelog

* Add a test for approle client login

* Return errors from LoginOptions, use limited reader for secret ID

* Fix auth comment length

* Return actual type not interface, check for client token in tests

* Require specification of secret ID location using SecretID struct as AppRole arg

* Allow password from env, file, or plaintext

* Add flexibility in how to fetch k8s service token, but still with default

* Avoid passing strings that need to be validated by just having different login options

* Try a couple real tests with approle and userpass login

* Fix method name in comment

* Add context to Login methods, remove comments about certain sources being inherently insecure

* Perform read of secret ID at login time

* Read password from file at login time

* Pass context in integ tests

* Read env var values in at login time, add extra tests

* Update api version

* Revert "Update api version"

This reverts commit 1ef3949497dcf878c47e0e5ffcbc8cac1c3c1679.

* Update api version in all go.mod files
2021-10-26 16:48:48 -07:00
..
agent agent: Use an in-process listener with cache (#12762) 2021-10-15 17:22:19 -07:00
config fix build tag (#12588) 2021-09-20 17:10:54 -04:00
server Fix TestParseSockaddrTemplate to take into account CustomResponseHeaders. (#12902) 2021-10-22 08:50:12 -04:00
test-fixtures Remove config from Meta; it's only used right now with the token helper. 2016-04-01 16:02:18 -04:00
token command: deprecate errwrap.Wrapf() (#11744) 2021-06-02 09:22:31 -04:00
agent.go agent: Use an in-process listener with cache (#12762) 2021-10-15 17:22:19 -07:00
agent_test.go cleanup unused code and fix t.Fatal usage in goroutine in testing (#11694) 2021-09-30 07:33:14 -04:00
approle_concurrency_integ_test.go Native Login method for Go client (#12796) 2021-10-26 16:48:48 -07:00
audit.go fix typo (#6469) 2019-03-25 10:56:04 -07: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 Make audit a subcommand 2017-10-24 09:30:47 -04:00
audit_enable.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
audit_enable_test.go Send a test message before committing a new audit device. (#10520) 2020-12-16 16:00:32 -06: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 Update audit-list command 2017-10-24 09:28:06 -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 Always use a local test server (#4207) 2018-03-28 10:34:37 -04:00
auth_enable.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
auth_enable_test.go VAULT-2285 adding capability to accept comma separated entries for au… (#12126) 2021-08-09 15:37:03 -04: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 Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
auth_list_test.go Add new auth-list command 2017-10-24 09:28:06 -04:00
auth_test.go Remove deprecated CLI commands (#6112) 2019-02-14 11:54:47 -08:00
auth_tune.go VAULT-2285 adding capability to accept comma separated entries for au… (#12126) 2021-08-09 15:37:03 -04:00
auth_tune_test.go VAULT-2285 adding capability to accept comma separated entries for au… (#12126) 2021-08-09 15:37:03 -04:00
base.go oss components of vault-3372 (#12898) 2021-10-22 14:22:49 -06:00
base_flags.go Fix some linting errors (#12860) 2021-10-18 17:29:47 -07: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 cleanup unused code and fix t.Fatal usage in goroutine in testing (#11694) 2021-09-30 07:33:14 -04:00
base_helpers_test.go cleanup unused code and fix t.Fatal usage in goroutine in testing (#11694) 2021-09-30 07:33:14 -04:00
base_predict.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
base_predict_test.go Migrate to sdk/internalshared libs in go-secure-stdlib (#12090) 2021-07-15 20:17:31 -04:00
command_test.go Shutdown Test Cores when Tests Complete (#10912) 2021-02-12 13:04:48 -07:00
commands.go API Lock CLI OSS port (#12925) 2021-10-26 10:52:29 -06:00
commands_nonwindows.go Fix windows build by moving references to SIGUSR2 into a file not built (#6422) 2019-03-15 10:12:48 -07:00
commands_windows.go Fix windows build by moving references to SIGUSR2 into a file not built (#6422) 2019-03-15 10:12:48 -07: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 Fix `vault debug` so that captured logs include newlines. (#12175) 2021-07-27 09:15:24 -04:00
debug_test.go command: fix dropped test error (#12474) 2021-09-01 16:05:14 -07: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 logical: add support for passing data to delete (#7139) 2019-07-18 10:42:36 -07:00
format.go cleanup unused code and fix t.Fatal usage in goroutine in testing (#11694) 2021-09-30 07:33:14 -04:00
format_test.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
kv.go command/kv: Add a "kv" subcommand for using the key-value store (#4168) 2018-03-21 15:02:41 -07:00
kv_delete.go `vault delete` should allow the same output options as `vault write`,… (#11992) 2021-07-06 10:36:07 -04:00
kv_destroy.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07: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 Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
kv_helpers.go fixing a bug for cli when namespace is in both arg and path (#12911) 2021-10-22 17:47:16 -04:00
kv_list.go Make the `list` and `kv list` commands work with wrapping, e.g. for controlgroups (#12031) 2021-07-09 12:08:58 -04:00
kv_metadata.go Add delete-version-after to kv CLI subcommands 2019-06-27 14:17:46 -04:00
kv_metadata_delete.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
kv_metadata_get.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
kv_metadata_put.go Add kv custom key metadata (#12218) 2021-08-23 15:49:09 -04:00
kv_metadata_put_test.go Add kv custom key metadata (#12218) 2021-08-23 15:49:09 -04:00
kv_patch.go Add HTTP PATCH support to KV (#12687) 2021-10-13 15:24:31 -04:00
kv_put.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
kv_rollback.go cleanup unused code and fix t.Fatal usage in goroutine in testing (#11694) 2021-09-30 07:33:14 -04:00
kv_test.go Extend kv metadata to get, put, and patch (#12907) 2021-10-26 15:38:56 -04:00
kv_undelete.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -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 Add command to look up a lease by ID (#11129) 2021-03-18 11:11:09 -05: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 CLI Enhancements (#3897) 2018-02-12 18:12:16 -05: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 Fix tests 2018-07-12 10:18:50 -04:00
list.go Make the `list` and `kv list` commands work with wrapping, e.g. for controlgroups (#12031) 2021-07-09 12:08:58 -04:00
list_test.go Fix KV list command with whitespaces (#8017) 2020-11-23 12:38:14 -07:00
login.go Fixed github-prod path (#7516) 2019-09-26 08:46:41 -04:00
login_test.go Ignore any existing token during CLI login (#7508) 2019-09-25 10:59:42 -07:00
main.go add a reader that takes stdin (#7074) 2019-07-05 13:36:44 -07:00
monitor.go Migrate to sdk/internalshared libs in go-secure-stdlib (#12090) 2021-07-15 20:17:31 -04:00
monitor_test.go cleanup unused code and fix t.Fatal usage in goroutine in testing (#11694) 2021-09-30 07:33:14 -04:00
namespace.go API Lock CLI OSS port (#12925) 2021-10-26 10:52:29 -06: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 Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07: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
operator.go Add "operator" subcommand 2017-10-24 09:30:48 -04:00
operator_diagnose.go Diagnose partial/missing telemetry configuration (#12802) 2021-10-20 16:47:59 -05:00
operator_diagnose_test.go Diagnose partial/missing telemetry configuration (#12802) 2021-10-20 16:47:59 -05:00
operator_generate_root.go operator generate-root -decode: allow token from stdin (#12881) 2021-10-20 12:29:17 -04:00
operator_generate_root_test.go operator generate-root -decode: allow token from stdin (#12881) 2021-10-20 12:29:17 -04:00
operator_init.go fix typo in vault operator init cmd (#11792) 2021-06-10 10:39:53 -04:00
operator_init_test.go Shamir seals now come in two varieties: legacy and new-style. (#7694) 2019-10-18 14:46:00 -04: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_migrate.go command: deprecate errwrap.Wrapf() (#11744) 2021-06-02 09:22:31 -04:00
operator_migrate_test.go Migrate to sdk/internalshared libs in go-secure-stdlib (#12090) 2021-07-15 20:17:31 -04:00
operator_raft.go Raft cli docs (#8548) 2020-03-17 09:46:44 -04:00
operator_raft_autopilot_get_config.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
operator_raft_autopilot_set_config.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07: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 Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07: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 Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
operator_rekey.go cleanup unused code and fix t.Fatal usage in goroutine in testing (#11694) 2021-09-30 07:33:14 -04:00
operator_rekey_test.go Update tests to reflect new HC public pgp keys. (#11446) 2021-04-23 12:32:46 -04:00
operator_seal.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
operator_seal_test.go Add "operator" subcommand 2017-10-24 09:30:48 -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 Migrate to sdk/internalshared libs in go-secure-stdlib (#12090) 2021-07-15 20:17:31 -04:00
operator_unseal_test.go fixing operator unseal test (#6241) 2019-02-15 09:06:37 -08:00
operator_usage.go Port: add client ID to TWEs in activity log [vault-3136] (#12820) 2021-10-14 09:10:59 -07: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
path_map_upgrade_api_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
pgp_test.go cleanup unused code and fix t.Fatal usage in goroutine in testing (#11694) 2021-09-30 07:33:14 -04:00
plugin.go Run all builtins as plugins (#5536) 2018-11-06 17:21:24 -08:00
plugin_deregister.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
plugin_deregister_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
plugin_info.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
plugin_info_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
plugin_list.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
plugin_list_test.go Run all builtins as plugins (#5536) 2018-11-06 17:21:24 -08:00
plugin_register.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
plugin_register_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04: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 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
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 Always use a local test server (#4207) 2018-03-28 10:34:37 -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 Add "policy" subcommand 2017-10-24 09:30:48 -04:00
policy_write.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
policy_write_test.go Update policy-write command 2017-10-24 09:29:37 -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 Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
read_test.go Fix read test 2018-08-14 14:20:49 -04:00
rotate.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
rotate_test.go Always use a local test server (#4207) 2018-03-28 10:34:37 -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 Rename mounts to secrets engines and add the subcommand 2017-10-24 09:30:48 -04:00
secrets_enable.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
secrets_enable_test.go VAULT-2285 adding capability to accept comma separated entries for au… (#12126) 2021-08-09 15:37:03 -04:00
secrets_list.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
secrets_list_test.go Rename mounts to secrets engines and add the subcommand 2017-10-24 09:30:48 -04:00
secrets_move.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
secrets_move_test.go Always use a local test server (#4207) 2018-03-28 10:34:37 -04:00
secrets_tune.go VAULT-2285 adding capability to accept comma separated entries for au… (#12126) 2021-08-09 15:37:03 -04:00
secrets_tune_test.go VAULT-2285 adding capability to accept comma separated entries for au… (#12126) 2021-08-09 15:37:03 -04:00
server.go Customizing HTTP headers in the config file (#12485) 2021-10-13 11:06:33 -04:00
server_noprofile.go Add memory profiling for custom builds (#5584) 2018-10-31 11:11:45 -07:00
server_profile.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
server_test.go Vault-2840 Add no-op check for HTTP listener validity (#12421) 2021-09-07 18:36:58 -04:00
server_util.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07: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 Fix panic when running capabilities CLI command with multiple paths (#4553) 2018-05-11 11:58:12 -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 CLI Enhancements (#3897) 2018-02-12 18:12:16 -05: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 Add ability to renew by accessor (#7817) 2019-11-08 11:32:01 -05: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 Always use a local test server (#4207) 2018-03-28 10:34:37 -04:00
unwrap.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
unwrap_test.go Spelling (#4119) 2018-03-20 14:54:10 -04:00
util.go cleanup unused code and fix t.Fatal usage in goroutine in testing (#11694) 2021-09-30 07:33:14 -04:00
version.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
version_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
write.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
write_test.go Update write command 2017-10-24 09:30:48 -04:00