mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-18 18:38:08 -05:00
approle: convert Callbacks to Operations (#11893)
* approle: convert Callbacks to Operations The usage of oldstyle "Callbacks" is causing the `cannot write to readonly storage` error message when `login` is attempted against a performance standby. Use the newstyle "Operations" and additionally set the Forward parameters to forward the request to the Active vault node. * add changelog * do not forward for alias lookahead operation * remove forward fields and remove changelog - Because this request is an UpdateOperation, it should have automatically been routed to the primary/active by the router before it reaches the backend. - changelog should not be needed as this change is only a refactor with no user-facing behavior changes.
This commit is contained in:
parent
625bf466f1
commit
f42070ac6c
1 changed files with 7 additions and 3 deletions
|
|
@ -26,9 +26,13 @@ func pathLogin(b *backend) *framework.Path {
|
|||
Description: "SecretID belong to the App role",
|
||||
},
|
||||
},
|
||||
Callbacks: map[logical.Operation]framework.OperationFunc{
|
||||
logical.UpdateOperation: b.pathLoginUpdate,
|
||||
logical.AliasLookaheadOperation: b.pathLoginUpdateAliasLookahead,
|
||||
Operations: map[logical.Operation]framework.OperationHandler{
|
||||
logical.UpdateOperation: &framework.PathOperation{
|
||||
Callback: b.pathLoginUpdate,
|
||||
},
|
||||
logical.AliasLookaheadOperation: &framework.PathOperation{
|
||||
Callback: b.pathLoginUpdateAliasLookahead,
|
||||
},
|
||||
},
|
||||
HelpSynopsis: pathLoginHelpSys,
|
||||
HelpDescription: pathLoginHelpDesc,
|
||||
|
|
|
|||
Loading…
Reference in a new issue