Closed
Description
Michael Isvy opened SPR-10666 and commented
At this stage, Spring does not provide support for encrypted property values.
For instance, if I externalize my values in a properties file using a property-placeholder, I can only have the following inside my properties file:
jdbc.username=admin
jdbc.password=secret
I would like to be able to use the following instead:
jdbc.username=admin
jdbc.password={md5}bface9aa8e675d3a1757f143893793db
(syntax is just a draft, you might find something more appropriate)
We could have a new class that inherits from PropertyPlaceholderConfigurer and adds the encryption features.
And we could add a property to the namespace as follows:
<context:property-placeholder useEncryption="true" location="classpath:spring/data-access.properties"/>
( 'useEncryption' could default to true or false depending on what you find more appropriate).
Issue Links:
- PropertySourcesPlaceholderConfigurer never calls "convertProperties" on merged properties [SPR-8928] #13568 PropertySourcesPlaceholderConfigurer never calls "convertProperties" on merged properties
- Allow the use of custom PropertySource annotations in @Configuration classes [SPR-8963] #13603 Allow the use of custom PropertySource annotations in
@Configuration
classes - SEC-3123 Encrypted property value support
- Backport encrypted property functionality from spring-cloud-config environment work [SPR-12635] #17236 Backport encrypted property functionality from spring-cloud-config environment work
2 votes, 11 watchers