spring-cloud / spring-cloud/spring-cloud-config

KeyStoreConfiguration loaded too late in bootstrap

Open
#762 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

closable documentation
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:

  1. Update the documentation to reflect that the encryp.key-store properties need to be placed inside the bootstrap.yml
  2. Make sure the KeyStoreTextEncryptorLocator is configured before configuring the EnvironmentEncryptor

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.