Have step-down request forward.

Unlike seal, this command has no meaning other than on the active node,
so when issuing it the expected behavior would be for whichever node is
currently active to step down.
This commit is contained in:
Jeff Mitchell 2017-05-25 11:55:40 -04:00
parent cb05f85280
commit 20eadd350b
2 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,10 @@
## Next (Unreleased) ## Next (Unreleased)
DEPRECATIONS/CHANGES:
* Step-Down is Forwarded: When a step-down is issued against a non-active node
in an HA cluster, it will now forward the request to the active node.
IMPROVEMENTS: IMPROVEMENTS:
* plugins/databases: Add MongoDB as an internal database plugin. [GH-2698] * plugins/databases: Add MongoDB as an internal database plugin. [GH-2698]

View File

@ -46,7 +46,7 @@ func Handler(core *vault.Core) http.Handler {
mux.Handle("/v1/sys/init", handleSysInit(core)) mux.Handle("/v1/sys/init", handleSysInit(core))
mux.Handle("/v1/sys/seal-status", handleSysSealStatus(core)) mux.Handle("/v1/sys/seal-status", handleSysSealStatus(core))
mux.Handle("/v1/sys/seal", handleSysSeal(core)) mux.Handle("/v1/sys/seal", handleSysSeal(core))
mux.Handle("/v1/sys/step-down", handleSysStepDown(core)) mux.Handle("/v1/sys/step-down", handleRequestForwarding(core, handleSysStepDown(core)))
mux.Handle("/v1/sys/unseal", handleSysUnseal(core)) mux.Handle("/v1/sys/unseal", handleSysUnseal(core))
mux.Handle("/v1/sys/renew", handleRequestForwarding(core, handleLogical(core, false, nil))) mux.Handle("/v1/sys/renew", handleRequestForwarding(core, handleLogical(core, false, nil)))
mux.Handle("/v1/sys/renew/", handleRequestForwarding(core, handleLogical(core, false, nil))) mux.Handle("/v1/sys/renew/", handleRequestForwarding(core, handleLogical(core, false, nil)))