From fc6b89630f9fb637e60188ca0be45dca57c251fc Mon Sep 17 00:00:00 2001 From: Clint Date: Wed, 20 May 2020 15:22:59 -0500 Subject: [PATCH] Forward rotation requests from standbys (#66) (#67) --- 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,