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

Delay PropertySource lookup for VaultPropertySourceRegistrar #776

Closed
mp911de opened this issue Mar 28, 2023 · 1 comment
Closed

Delay PropertySource lookup for VaultPropertySourceRegistrar #776

mp911de opened this issue Mar 28, 2023 · 1 comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Milestone

Comments

@mp911de
Copy link
Member

mp911de commented Mar 28, 2023

VaultPropertySourceRegistrar performs an early bean lookup via beanFactory.getBeansOfType(…) to obtain property sources. While this lookup allows for early initialization of components, it triggers in case of Spring Boot the initialization of VaultAutoConfiguration too early which fails with constructor resolution.

We can delay the initialization but that comes at the cost of vault property sources being activated after running the bean postprocessor.

This issue was originally reported via spring-cloud/spring-cloud-vault#642

@mp911de mp911de added the type: bug A general bug label Mar 28, 2023
@mp911de mp911de added this to the 3.0.3 milestone Mar 28, 2023
@mp911de mp911de added status: declined A suggestion or change that we don't feel we should currently apply and removed type: bug A general bug labels Mar 28, 2023
@mp911de mp911de changed the title Delay PropertySource lookup for @VaultPropertySourceRegistration Delay PropertySource lookup for VaultPropertySourceRegistration Mar 28, 2023
@mp911de mp911de changed the title Delay PropertySource lookup for VaultPropertySourceRegistration Delay PropertySource lookup for VaultPropertySourceRegistrar Mar 28, 2023
@mp911de
Copy link
Member Author

mp911de commented Mar 28, 2023

Delaying the initialization causes the annotation to miss the point to contribute configuration data early on during bean configuration. We recommend using @VaultPropertySource in combination with AbstractVaultConfiguration to provide the required infrastructure separately from potential auto-configuration.

@mp911de mp911de closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

No branches or pull requests

1 participant