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

KeyValueDelegate mountInfo caching issue with empty path during Vault unavailability #889

Open
t1000robot opened this issue Dec 16, 2024 · 0 comments

Comments

@t1000robot
Copy link

t1000robot commented Dec 16, 2024

Description:
I'm using spring-vault-core version 3.1.1 with spring-boot version 3.2.6. I encountered an issue related to the KeyValueDelegate class when interacting with Vault.

Steps to reproduce:
Start the service, which accesses Vault during initialization to fetch some entities.
Simulate Vault unavailability during the first gRPC request to the service.
Observe that KeyValueDelegate caches an empty path ("") in its mountInfo property.
When Vault becomes available again, the service continues to use the cached empty path, causing failures.

Observed behavior:
The service throws an IllegalArgumentException with the message:
"Path must not be empty".
The issue persists until the service is restarted, as the cached empty path is not refreshed.

Expected behavior:
When Vault becomes available again, the mountInfo cache should refresh and fetch the correct path.

Workarounds attempted:
Overriding getMountInfo() — Not feasible due to multiple final/private/default.
Configuration options — No existing configurations seem to control the cache behavior for mountInfo.

Current solution:
Restarting pods when health probes fail due to Vault unavailability. However, this approach risks failed requests during the graceful shutdown process.

Questions:
Is there an existing way to avoid caching the empty path or to refresh mountInfo dynamically?
Are there plans to address this issue in future versions?

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

No branches or pull requests

1 participant