-
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
feature: secrets/auth plugin multiplexing #14946
Conversation
fe26e7f
to
cd229a1
Compare
cd229a1
to
3adb1c0
Compare
9311683
to
b179ad4
Compare
cleanup instance map and ensure we don't deadlock
move GetMultiplexIDFromContext to pluginutil package fix pluginutil test fix dbplugin ut
update comments
if err != nil { | ||
return err | ||
} | ||
b.Backend = nb |
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.
🤔 Do we need to call initialize here too?
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.
No, that gets called in the respective auth.go and mount.go
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.
But in the case where a plugin crashes and is restarted i think we'd need to re-initialize, right?
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.
Left a few more suggestions / questions. Everything else LGTM. Will approve after 👍
- update comments - make use of multiplexing boolean and single implementation ID const
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.
LGTM. Nice job on this, @fairclothjm!
@@ -0,0 +1,3 @@ | |||
```release-note:feature | |||
**Secrets/auth plugin multiplexing**: manage multiple plugin configurations with a single plugin process |
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.
I was reviewing the changelog for 1.12 features, and wasn't sure if the formatting of just:
Plugin Multiplexing:
would be more consistent with other new feature entries from older releases?
Description
This PR adds multiplexing support for secrets/auth plugins.
When multiplexed secrets/auth plugins are configured in Vault, each plugin will only have a single process managing all configurations for that plugin type. This single process will be multiplexed across all Vault namespaces for mounts of this type.
Some changes for the new v5 plugin set:
To test multiplexing
feat/mux-secrets-auth
branchServe
toServeMultiplex
in the plugin's main.go filefeat/mux-secrets-auth