-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check ErrPluginStaticUnsupported for fallback to RotateRootCredentials #11585
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! I think we'll want to update the conditional here as well? rollback.go#L107
I remember hitting codes.Unimplemented
for SetCredentials
when I tested this a while ago. Interested in knowing what (if anything at all) changed. Thanks for doing this 👍
@austingebauer and I talked about this offline, but we think this issue came up because the plugin in question was an external plugin. The external plugin goes through the gRPC layer which was converting the gRPC status to the |
…o RotateRootCredentials (#11631)
…o RotateRootCredentials (#11632)
When using the V4 DB engine and the user wants to rotate the root credentials, the
SetCredentials
call is attempted. IfSetCredentials
comes back with an "unimplemented" error, the DB engine should fall back to runningRotateRootCredentials
. Previously, it was making the check to determine if it should fall back by checking for anUnimplemented
gRPC status code. This is never being hit becauseErrPluginStaticUnsupported
is returned instead: https://github.com/hashicorp/vault/blob/master/sdk/database/dbplugin/grpc_transport.go#L341-L345This PR fixes this by adding
ErrPluginStaticUnsupported
as an additional check to determine if it should fall back toRotateRootCredentials
.