Invalid configuration is not fatal
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
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
- Use spring-cloud-starter-vault-config:3.1.2
- Point config to invalid vault url
- 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
- 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.
More from spring-cloud/spring-cloud-vault
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
spring-cloud/spring-cloud-vault#952 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
spring-cloud/spring-cloud-vault#958 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
spring-cloud/spring-cloud-vault#953 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
spring-cloud/spring-cloud-vault#942 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
spring-cloud/spring-cloud-vault#940 · 1 reaction ·
Maintainers usually reply within 1 day
All issues in spring-cloud/spring-cloud-vault
Similar issues
-
[Bug] The producer summary counts an unreported client version as a second version and warns about a version mixPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
apache/rocketmq-dashboard#6110 ·
Maintainers usually reply within 4 days
-
`Processing lsp` never exits and leaves orphaned processesPossibly taken @overcast302 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
processing/processing4#1578 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/doris-flink-connector#707 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
Maintainers usually reply within 1 day
-
[BUG] S3 CORS responses omit Access-Control-Allow-Credentials for matched originsPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
floci-io/floci#5369 · 1 comment ·
Maintainers usually reply within 1 day