Merged
Conversation
|
CI Results: |
b7ed8e7 to
7ced796
Compare
tomhjp
commented
Jan 19, 2024
vault/auth.go
Outdated
Comment on lines
191
to
198
Contributor
Author
There was a problem hiding this comment.
Several chunks of logic similar to this have been consolidated inside c.newCredentialBackend and c.newLogicalBackend.
No HTTP API implementation yet for managing pins, so no user-facing effects yet
7ced796 to
88e76a1
Compare
tomhjp
commented
Jan 19, 2024
| func (b *databaseBackend) getPinnedVersion(ctx context.Context, pluginName string) (string, error) { | ||
| extendedSys, ok := b.System().(logical.ExtendedSystemView) | ||
| if !ok { | ||
| return "", fmt.Errorf("database backend does not support running as an external plugin") |
Contributor
Author
There was a problem hiding this comment.
This was already true because the database plugin uses logical.SystemView methods that are not available over the gRPC implementation of SystemView. In hindsight, those methods (like ListVersionedPlugins) probably should also have been added to logical.ExtendedSystemView instead.
|
Build Results: |
fairclothjm
reviewed
Jan 22, 2024
fairclothjm
reviewed
Jan 22, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements new functionality in the plugin catalog to store pinned versions, and consumes it for database, secrets, and auth plugins. The intention is to allow Vault admins who have access to the plugin catalog to enforce that all sub-namespaces should use a particular version, so that they can safely manage the lifecycle of plugins in the catalog without having to enumerate all child namespaces.
However, to keep the size of this PR reasonable, there's no HTTP API implementation yet for managing pins, so it's not usable in a proper server yet. Without the HTTP API, it's hard to write a good test for the database plugin as it can't reach into the private plugin catalog of the core, so I'll add the integration test for database plugins along with the HTTP API.