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

Check if sys view is missing in GRPC sys view #18210

Merged
merged 2 commits into from
Dec 2, 2022
Merged

Check if sys view is missing in GRPC sys view #18210

merged 2 commits into from
Dec 2, 2022

Conversation

swenson
Copy link
Contributor

@swenson swenson commented Dec 1, 2022

And return an error instead of panicking.

This situation can occur if a plugin attempts to access the system view during setup when Vault is checking the plugin metadata.

Fixes #17878.

And return an error instead of panicking.

This situation can occur if a plugin attempts to access the system
view during setup when Vault is checking the plugin metadata.

Fixes #17878.
Copy link
Contributor

@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, although should we do the same for GRPCStorageServer too?

sdk/plugin/grpc_system.go Outdated Show resolved Hide resolved
@tomhjp
Copy link
Contributor

tomhjp commented Dec 1, 2022

Also, probably warrants a bug changelog, as plugins shouldn't be able to trigger server panics, even if they do misbehave

@swenson
Copy link
Contributor Author

swenson commented Dec 2, 2022

Added the same checks in GRPCStorageServer, and added a changelog.

Copy link
Contributor

@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!

@swenson
Copy link
Contributor Author

swenson commented Dec 2, 2022

Thanks!

@swenson swenson merged commit eabc486 into main Dec 2, 2022
@swenson swenson deleted the register-panic branch December 2, 2022 18:12
AnPucel pushed a commit that referenced this pull request Jan 14, 2023
And return an error instead of panicking.

This situation can occur if a plugin attempts to access the system
view during setup when Vault is checking the plugin metadata.

Fixes #17878.
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.

panic: runtime error: invalid memory address or nil pointer dereference when register custom secret plugin
3 participants