Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Invalid configuration is not fatal

Open
#685 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale

Research direction

Start with LeaseAwareVaultPropertySource and reproduce the behavior using the supplied bug-vault-bad-config-nonfatal.zip sample and YAML configuration. Check how ignoreSecretNotFound and the non-optional spring.config.import affect the invalid Vault URL, then verify that the application no longer continues after the configuration error.

Written by the indexing model from the issue text.

Description

Describe the bug
If configuration is invalid (e.g. wrong SSL certs) then vault config prints exception and continues execution.
Even when spring.config.import is not set to optional.

This is probably because in LeaseAwareVaultPropertySource ignoreSecretNotFound is always true.

Sample
bug-vault-bad-config-nonfatal.zip

  1. Use spring-cloud-starter-vault-config:3.1.2
  2. Point config to invalid vault url
  3. Make sure import is non-optional
spring:
  cloud:
    vault:
      uri: https://bad.site/
      authentication: token
      token: foo
  config:
    import: vault://foo/bar

Log

2023-03-28T13:22:06.206-04:00  INFO 23668 --- [           main] o.s.v.c.e.LeaseAwareVaultPropertySource  : Vault location [foo/bar] not resolvable: I/O error on GET request for "https://bad.site:443/v1/foo/bar": bad.site
2023-03-28T13:22:06.592-04:00  INFO 23668 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=13545f80-8375-3886-af6d-4191f093e243
2023-03-28T13:22:06.862-04:00  INFO 23668 --- [           main] e.b.BugVaultBadConfigNonfatalApplication : Started BugVaultBadConfigNonfatalApplication in 1.657 seconds (process running for 2.251)
Dominant language
Java
Stars
291
Forks
152
Avg merge
3h 34m
Merged PRs (30d)
16

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No 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.

More from spring-cloud/spring-cloud-vault

All issues in spring-cloud/spring-cloud-vault

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.