From 454a4416e4ab035cd30fdf8fa6ade777badc8a5b Mon Sep 17 00:00:00 2001 From: catsby Date: Thu, 14 May 2020 16:13:59 -0500 Subject: [PATCH] Forward rotation requests from standbys --- plugin/path_rotate_root_creds.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/plugin/path_rotate_root_creds.go b/plugin/path_rotate_root_creds.go index a7b4448c..402a0aa7 100644 --- a/plugin/path_rotate_root_creds.go +++ b/plugin/path_rotate_root_creds.go @@ -4,19 +4,24 @@ import ( "context" "errors" "fmt" - "github.com/hashicorp/vault-plugin-secrets-ad/plugin/util" - "github.com/hashicorp/vault/sdk/framework" - "github.com/hashicorp/vault/sdk/logical" "math" "sync/atomic" "time" + + "github.com/hashicorp/vault-plugin-secrets-ad/plugin/util" + "github.com/hashicorp/vault/sdk/framework" + "github.com/hashicorp/vault/sdk/logical" ) func (b *backend) pathRotateCredentials() *framework.Path { return &framework.Path{ Pattern: "rotate-root", - Callbacks: map[logical.Operation]framework.OperationFunc{ - logical.ReadOperation: b.pathRotateCredentialsUpdate, + Operations: map[logical.Operation]framework.OperationHandler{ + logical.ReadOperation: &framework.PathOperation{ + Callback: b.pathRotateCredentialsUpdate, + ForwardPerformanceStandby: true, + ForwardPerformanceSecondary: true, + }, }, HelpSynopsis: pathRotateCredentialsUpdateHelpSyn,