hashicorp / hashicorp/consul

Consul validate misses typo in path to TLS certificates in configuration file that prevents start

Open
#23,820 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
1d 18h
Merged PRs (30d)
39

Description

#### Overview of the Issue

`consul validate` returns valid if typo in path to TLS cert file location but consul will fail to start when it can't find the cert file

---

#### Reproduction Steps

Steps to reproduce this issue, eg:

- Create a config file with the TLS stanza and the standard TLS cert paths to the .pem files.
- Insert a typo into one of the file paths
- Run `consul validate` -> It will return valid (assuming no other problems in the config file!)
- Attempt to start consul -> It will fail and with no useful error message at that!

### Operating system and Environment details

consul 2.0.3+ent on RHEL 9.7 x86_64 VM on nutanix hypervisor

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with a Consul configuration containing a typo in a TLS certificate path, then trace how `consul validate` handles the TLS stanza versus startup. Identify where the missing certificate is accepted and make completion mean validation rejects the bad path with a useful error; verify both the reproduction and a valid configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.