spring-cloud / spring-cloud/spring-cloud-config
KeyStoreConfiguration loaded too late in bootstrap
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2k
- Forks
- 1.3k
- Avg merge
- 2d 59m
- Merged PRs (30d)
- 16
Description
After updating to the latest 1.3.2 release we found out our ConfigServer isn't decrypting {cipher} values anymore.
After digging deep into the ConfigServer I noticed that the KeyStoreConfiguration is loaded after the EncryptorConfiguration.
This results in an SingleTextEncryptorLocator (with a NoOpTextEncryptor) being used instead of the desired KeyStoreTextEncryptorLocator.
I've been able to workaround it moving the encrypt.key-store.location property from the application.ym to the bootstrap.yml.
There are two possible solutions for this:
- Update the documentation to reflect that the encryp.key-store properties need to be placed inside the bootstrap.yml
- Make sure the KeyStoreTextEncryptorLocator is configured before configuring the EnvironmentEncryptor
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing ConfigServer bootstrap loading around KeyStoreConfiguration, EncryptorConfiguration, and EnvironmentEncryptor. Compare the application.yml and bootstrap.yml handling of encrypt.key-store properties, then verify that {cipher} values use the intended KeyStoreTextEncryptorLocator rather than NoOpTextEncryptor. The issue leaves open whether the result should be a configuration fix or documentation update.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100