-
Notifications
You must be signed in to change notification settings - Fork 40.6k
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
Refer to Spring Cloud Vault in documentation for property encryption #13618
Comments
Could you please provide a sample application that shows the problem. It's a little hard to tell what the actual values you're using are from the GitHub comment. It looks like you need UTF-8 encoded properties. I wonder if we might be able to make the existing |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
Hello, @spring-issuemaster I am also getting this issue as well. I have it isolated down to a simple project here: https://github.com/ryber/spring-props/ Note:
|
@ryber The We should probably guard against that, or at least improve the Javadoc. You might want to look into the |
thanks @philwebb, now that I'm looking at EnvironmentPostProcessor I totally remember doing it this way before. (I was sure I never did one of those old school META-INF factories before) In any case, just FYI I went down the PropertySourceLoader path because googling lead to some blogs and SO questions implying that was the right way. So you may get more of those from time to time without maybe some official Spring documentation or logging that points in a better direction. FYI, in my case I couldn't just use the jasypt-spring-boot-starter because we are using KMS in this project. |
@ryber thanks for the feedback. There are 3 somewhat-related reference to What am I missing? Do you have something else in mind to avoid users choosing the wrong path? |
I think the main issue is that If you google for "Encrypt Spring Boot properties" the Spring documentation is nowhere in the entire first page. and even the description of I would encourage Spring Boot to include a first line support of encrypted properties and some clear documentation for people to do it on day 1. I would hope that such a feature might have 1 that works out of the box (possibly jasypt) and also the ability to override for those who want other decryptors like KMS, Vault, etc. |
Some discussion on encrypted property source is in #1312. My current feeling is that providing good encryption support is hard and we should leave it to Spring Cloud Vault (although I agree that the lack of documentation is problematic). |
By this I mean that it seems like encryption is a common issue so it would be nice if we mention it in the docs, even if it's just a link to Spring Cloud Vault. |
Hello,
The following code snippet running on Spring Boot 1.5.12 RELEASE:
Has to be migrated for Spring Boot 2.0.3 RELEASE:
After and before the migration, debugging the load method, the properties are loaded just fine for encoded rows, like:
But when you load the property using:
The property becomes wrong for the new version of Spring Boot:
My
spring.factories
under META-INF is set to:I know that my class
UnicodePropertiesPropertySourceLoader
is loaded just fine with all the properties encoded to UTF-8, but the problem is when I try to obtain each property with the@Value
annotation, this happen for the version of SpringBoot 2.0.3.ReleaseThe text was updated successfully, but these errors were encountered: