Skip to content

Add encryption support for PropertyPlaceholderConfigurer [SPR-10666] #15294

Closed
@spring-projects-issues

Description

@spring-projects-issues

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:

2 votes, 11 watchers

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: bulk-closedAn outdated, unresolved issue that's closed in bulk as part of a cleaning process

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions