question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CipherEnvironmentEncryptor doesn't work with complex types on Spring Boot 1.4

See original GitHub issue

Given 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:closed
  • Created 7 years ago
  • Comments:20 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
marcellodesalescommented, Nov 9, 2016

@spencergibb @ryanjbaxter @dsyer @philwebb We finally verified the patch from #130 … Worked beautifully! Thank you guys!

1reaction
philwebbcommented, Sep 9, 2016

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found