CipherEnvironmentEncryptor doesn't work with complex types on Spring Boot 1.4
See original GitHub issueGiven a config like this:
mine[0].someValue=Foo
mine[0].someKey={cipher}XXXX
mine[1].someValue=Bar
mine[1].someKey={cipher}XXXX
Only the ciphered values get bound to the @ConfigurationProperties
. I think that the root cause is the way that CipherEnvironmentEncryptor creates new property sources combined with Spring Boot issue 4313 which is much stricter in the way that it merges properties from different sources.
If I’m reading the code correctly ciphered values are extracted to a new property source that’s added above the original source. If CipherEnvironmentEncryptor
could create a new source that includes all the old values I believe the problem would go away.
Issue Analytics
- State:
- Created 7 years ago
- Comments:20 (13 by maintainers)
Top Results From Across the Web
Revisit complex type merge logic · Issue #6620 - GitHub
CipherEnvironmentEncryptor doesn't work with complex types on Spring Boot 1.4 spring-cloud/spring-cloud-config#466. Closed. @marcellodesales.
Read more >Spring Cloud Config not decrypting the config server password
I've been working on Spring Cloud Config for a while. I have a requirement of securing the config data. As per Spring Cloud...
Read more >Spring Boot Reference Documentation
All of Spring Boot is open source, including the documentation. If you find problems with the docs or if you want to improve...
Read more >Core Features - Spring
Spring Boot lets you externalize your configuration so that you can work with the same application code in different environments.
Read more >Testing improvements in Spring Boot 1.4
If we want to load a specific configuration, we can use the classes attribute of @SpringBootTest . In this example, we've omitted classes...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@spencergibb @ryanjbaxter @dsyer @philwebb We finally verified the patch from #130 … Worked beautifully! Thank you guys!
There’s not an easy way to fix this in Boot without causing regressions. If EnvironmentDecryptApplicationInitializer could be changed to add both the decrypted values, and any original values as well (i.e. so there’s not a split across sources) then I think things will work again.