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

spring-cloud-config-client: Load properties from Vault first.

Open
#2,326 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement waiting for votes
Dominant language
Java
Stars
2k
Forks
1.3k
Avg merge
2d 59m
Merged PRs (30d)
16

Description

We've added basic auth to our config server, we want to store credentials for config clients in vault.
This flow doesn't work since RestTemplate that connects to config server is constructed much earlier than properties are loaded from vault (spring-cloud-dependencies: 2022.0.4).

Possible solution:
If spring-cloud-starter-vault-config is present in the class path and connection info is known, the following order of values resolution could be used:

  • fetch values from vault
  • resolve current property placeholders
  • load other remote property sources
  • resolve placeholders other remote property sources

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 how the RestTemplate for the config server is constructed and how remote property sources are loaded in the spring-cloud-config-client module. Compare the current order with the proposed Vault-first sequence; done means Vault values and current placeholders are resolved before other remote property sources, with the resulting client credentials available when the connection is created.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
backend, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.