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

extends server variables substitutions with mpConfig #30645

Open
andre-doherty opened this issue Jan 27, 2025 · 5 comments
Open

extends server variables substitutions with mpConfig #30645

andre-doherty opened this issue Jan 27, 2025 · 5 comments
Labels
Feature Request: External A feature request opened by an external contributor. Should not be used by Open Liberty developers. Needs member attention

Comments

@andre-doherty
Copy link

Describe the use case that you want to enable:
Server variables substitution takes several sources as listed here : https://openliberty.io/docs/latest/reference/config/server-configuration-overview.html

  1. variable default values in the server.xml file
  2. environment variables
  3. bootstrap.properties
  4. Java system properties
  5. Variables loaded from files in the ${server.config.dir}/variables directory or other directories as specified by the VARIABLE_SOURCE_DIRS environment variable
  6. variable values declared in the server.xml file
  7. variables declared on the command line

FMU, most of the sources are static, except for xml ones that are reloaded by the application server.
However those require that the configuration files are added / altered at runtime.

It would be a great improvement to adding a hook and take mpconfig source as an extra server variable sources.

Describe why this is important to you:
This would help to solve some tricky use cases such as loading secrets from a vault, when secret might change during the application lifetime.
Eg : unless i am mistaken, to reload at runtime credentials for a database the current choices are :

  • one has to be able to change variables refered in authentication alias,
  • make use of the kerberos ticketing systems (which is not always available)
  • or more complex, implement a dedicated login module that would talk to the vault.

Offering this possibility would also help solving similar issues with container initialized resources.

André

@andre-doherty andre-doherty added the Feature Request: External A feature request opened by an external contributor. Should not be used by Open Liberty developers. label Jan 27, 2025
@andre-doherty
Copy link
Author

@gcharters : FYI

@jhanders34
Copy link
Member

Server variables are a config source for MP Config values as described here. We can get into some interesting circular logic that would need to be worked out if adding MP config as a config source for server variables.

@Emily-Jiang
Copy link
Member

Have you tried the variable replacement provided by MP Config?

@andre-doherty
Copy link
Author

hello @Emily-Jiang,

well no, i am a bit confused on how could this mecanism help solving that issue ?
Could you please be more specific ?

André

@Emily-Jiang
Copy link
Member

In MP Config, you can add custom dynamic config sources. If you update any properties in the config sources, the values will be looked up in the real time. See here for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request: External A feature request opened by an external contributor. Should not be used by Open Liberty developers. Needs member attention
Projects
None yet
Development

No branches or pull requests

4 participants