98ad431d6d
* Add helper for checking if an error is a fatal error The double-double negative was really confusing, and this pattern is used a few places in Vault. This negates the double negative, making the devx a bit easier to follow. * Check return value of UnsealWithStoredKeys in sys/init * Return proper error types when attempting unseal with stored key Prior to this commit, "nil" could have meant unsupported auto-unseal, a transient error, or success. This updates the function to return the correct error type, signaling to the caller whether they should retry or fail. * Continuously attempt to unseal if sealed keys are supported This fixes a bug that occurs on bootstrapping an initial cluster. Given a collection of Vault nodes and an initialized storage backend, they will all go into standby waiting for initialization. After one node is initialized, the other nodes had no mechanism by which they "re-check" to see if unseal keys are present. This adds a goroutine to the server command which continually waits for unseal keys to exist. It exits in the following conditions: - the node is unsealed - the node does not support stored keys - a fatal error occurs (as defined by Vault) - the server is shutting down In all other situations, the routine wakes up at the specified interval and attempts to unseal with the stored keys. |
||
---|---|---|
.. | ||
auth_token_test.go | ||
cors.go | ||
forwarded_for_test.go | ||
forwarding_bench_test.go | ||
forwarding_test.go | ||
handler.go | ||
handler_test.go | ||
help.go | ||
help_test.go | ||
http_test.go | ||
logical.go | ||
logical_test.go | ||
plugin_test.go | ||
stub_assets.go | ||
sys_audit_test.go | ||
sys_auth_test.go | ||
sys_config_cors_test.go | ||
sys_generate_root.go | ||
sys_generate_root_test.go | ||
sys_health.go | ||
sys_health_test.go | ||
sys_init.go | ||
sys_init_test.go | ||
sys_internal_test.go | ||
sys_leader.go | ||
sys_leader_test.go | ||
sys_lease_test.go | ||
sys_mount_test.go | ||
sys_mounts_test.go | ||
sys_policy_test.go | ||
sys_rekey.go | ||
sys_rekey_test.go | ||
sys_rotate_test.go | ||
sys_seal.go | ||
sys_seal_test.go | ||
sys_wrapping_test.go | ||
testing.go | ||
unwrapping_raw_body_test.go | ||
util.go |