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

Create failure analyzer when encrypt.keyStore.* properties in application.yml causes startup failure

Open
#1,122 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description of problem

If you try to set the encrypt.keyStore.* properties in application.yml, you get the following error:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-08-28 20:22:00.550 ERROR 31486 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

Field rsaProperties in org.springframework.cloud.config.server.config.EncryptionAutoConfiguration$KeyStoreConfiguration required a bean of type 'org.springframework.cloud.bootstrap.encrypt.RsaProperties' that could not be found.

Action:

Consider defining a bean of type 'org.springframework.cloud.bootstrap.encrypt.RsaProperties' in your configuration.

Resources

There is a question on stackoverflow of someone else having a similar issue.

Work-around

Move the encrypt.keyStore.* properties to bootstrap.yml

Code to reproduce the issue

https://github.com/mjohns39/ResumeWebsiteApi/tree/spring-cloud-rsa-issue

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 reproducing the startup failure with the encrypt.keyStore.* properties in application.yml, using the linked ResumeWebsiteApi example. Read EncryptionAutoConfiguration$KeyStoreConfiguration and the missing RsaProperties dependency, then compare the failure with the existing bootstrap.yml workaround. Done means the failure is reported with a useful analyzer message instead of only the missing-bean error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
backend, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.