-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
VaultConfigSource in quarkus-vault cannot be configured with properties requiring property expansion #10390
Comments
CC @vsevel @radcortez (Roberto, may be you can suggest some latest config feature) |
Yes, we just added a feature in SmallRye Config that allows a ConfigSource to configure itself: This allows you to create the |
This is not released yet, so we may need a few more days to release and update Quarkus. |
That sounds interesting. Certainly something we could also use in a custom |
@radcortez Super |
smallrye/smallrye-config#196 was fixed by smallrye/smallrye-config#313 as part of milestone 1.9.0. waiting for the release. |
We are finally here :) Sorry for taking so much time, we were working on another big feature that took longer to complete. PR is opened for 1.9.0. When we are done with that, you can configure ConfigSources in this way: Or if you prefer to see some code, I've updated the ZooKeeper source to use this: |
Very cool! |
@radcortez hello. I have started to look at the new feature. I am missing the capability to list all properties given a particular prefix (e.g. |
We already have that, is just not exposed in the Yes, the Factory will handle the init code. I haven't tried to use it as a build step, but we should be able to record it as a ServiceProvider. We need to try that. |
@vsevel let me know if this works for you: smallrye/smallrye-config#402 |
Describe the bug
The
VaultConfigSource
code doesn't use theConfig#getValue()
API to read its own config properties. Instead it usesConfig#getConfigSources()
and manually extracts the config values from theseConfigSource
s. (Presumably this is because there would otherwise be an endless recursion which would have to be addressed.) As a consequence, however, the corresponding config properties can not be configured with values which require property expansion, sinceVaultConfigSource
doesn't contain the logic to do the property expansion.I think that
VaultConfigSource
should try to directly useConfig#getValue()
. That would probably require logic to detect and avoid an endless recursion inVaultConfigSource#getValue(String)
. Or canSmallRyeConfigBuilder
be used (subclassed?) somehow to avoid the recursion?Expected behavior
VaultConfigSource
should also be configurable with property values requiring property expansion. E.g.Actual behavior
Specifying config values which require expansion doesn't work.
To Reproduce
See above.
Configuration
See above.
The text was updated successfully, but these errors were encountered: