Skip to content
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

Update mount table and CLI with plugin version for auth #16856

Merged
merged 15 commits into from Aug 31, 2022

Conversation

swenson
Copy link
Contributor

@swenson swenson commented Aug 23, 2022

This updates the CLI and API to support plugin versions, and specifically targets updating the auth plugin machinery to support versions.

I'm targeting #16688 for now to minimize conflicts, but I can re-target against main if #16688 gets merged.

@swenson swenson requested review from a team and removed request for a team August 23, 2022 22:28
@swenson swenson marked this pull request as draft August 23, 2022 22:30
@swenson swenson marked this pull request as ready for review August 24, 2022 20:43
@swenson swenson changed the title WIP: Update mount table and CLI with plugin version Update mount table and CLI with plugin version for auth Aug 24, 2022
@swenson swenson requested review from tomhjp and tvoran August 24, 2022 20:45
vault/dynamic_system_view.go Outdated Show resolved Hide resolved
vault/testing.go Outdated Show resolved Hide resolved
@swenson swenson force-pushed the vault-7744/mount-table-version branch 2 times, most recently from 644d9f3 to e9d10a4 Compare August 25, 2022 17:22
Base automatically changed from version-aware-plugin-catalog to main August 25, 2022 20:31
Copy link
Collaborator

@tomhjp tomhjp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, mostly just small suggestions, and I'm not sure if there might be a bug somewhere in deregistering versioned plugins

sdk/helper/pluginutil/runner.go Outdated Show resolved Hide resolved
sdk/logical/system_view.go Outdated Show resolved Hide resolved
sdk/logical/system_view.go Outdated Show resolved Hide resolved
vault/logical_system.go Show resolved Hide resolved
command/auth_enable.go Show resolved Hide resolved
http/sys_mount_test.go Show resolved Hide resolved
command/plugin_deregister_test.go Show resolved Hide resolved
vault/auth_external_plugin_test.go Outdated Show resolved Hide resolved
vault/auth_external_plugin_test.go Show resolved Hide resolved
@swenson swenson force-pushed the vault-7744/mount-table-version branch from f63c42a to f699be4 Compare August 26, 2022 18:19
@swenson
Copy link
Contributor Author

swenson commented Aug 26, 2022

I'm hesitant to merge this without approval for the extra commits I've made. But feel free to modify or merge this in my absence (as I'll be out for the next week).

Copy link
Collaborator

@tomhjp tomhjp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one CLI comment and a couple of nits

@@ -33,7 +34,7 @@ Usage: vault plugin deregister [options] TYPE NAME

Deregister the plugin named my-custom-plugin:

$ vault plugin deregister auth my-custom-plugin
$ vault plugin deregister auth my-custom-plugin [version]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use a flag instead of positional arg here for consistency?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Saw you did that in a follow-up commit. I think I was trying to avoid the version / plugin_version confusion, but it's not as relevant here as it is for mounts.

Comment on lines 107 to 109
// Canonicalize the version string.
// Add the 'v' back in, since semantic version strips it out, and we want to be consistent with internal plugins.
pluginVersion = "v" + semanticVersion.String()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there should be any need to canonicalise here - the server should accept it with or without the v

command/plugin_deregister_test.go Show resolved Hide resolved
@tomhjp tomhjp merged commit 9d97dec into main Aug 31, 2022
@tomhjp tomhjp deleted the vault-7744/mount-table-version branch August 31, 2022 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants