Skip to content

fix(config): Warn on invalid characters in datacenter property leading to incompatible DNS names #22382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 5, 2025

Conversation

arnabkaycee
Copy link
Contributor

@arnabkaycee arnabkaycee commented Jun 5, 2025

Description

Non-compliant characters lead to invalid DNS names that are incompatible with externalized PKI Certificate generation.

Testing & Reproduction steps

  • Start consul with invalid characters in datacenter property.
  • Create tls certificates using CLI Commands. Consul does not warn/fail.
  • When using other PKI engines to generate certificates with SAN as <service-name>.service.<datacenter>.consul PKI generation usually fails because of invalid characters in datacenter field.
  • It is not possible to change datacenter name as it is an initial bootstrapping configuration of consul. One has to migrate entire data.

Links

PR Checklist

  • updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

@github-actions github-actions bot added type/docs Documentation needs to be created/updated/clarified theme/config Relating to Consul Agent configuration, including reloading labels Jun 5, 2025
@arnabkaycee arnabkaycee added backport/1.19 This release series is longer active on CE, use backport/ent/1.19 backport/1.18 This release series is longer active on CE, use backport/ent/1.18 backport/1.20 Changes are backported to 1.20 backport/1.21 Changes are backported to 1.21 labels Jun 5, 2025
@arnabkaycee arnabkaycee marked this pull request as ready for review June 5, 2025 12:57
@arnabkaycee arnabkaycee requested review from a team as code owners June 5, 2025 12:57
@arnabkaycee arnabkaycee enabled auto-merge (squash) June 5, 2025 13:03
Copy link
Member

@sreeram77 sreeram77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link

hashicorp-cla-app bot commented Jun 5, 2025

CLA assistant check
All committers have signed the CLA.

@arnabkaycee arnabkaycee merged commit 66d28ae into main Jun 5, 2025
138 of 140 checks passed
@arnabkaycee arnabkaycee deleted the arnabkaycee/warn-on-invalid-dc-config branch June 5, 2025 14:46
@hc-github-team-consul-core
Copy link
Collaborator

📣 Hi @arnabkaycee! a backport is missing for this PR [22382] for versions [1.18,1.19,1.20,1.21] please perform the backport manually and add the following snippet to your backport PR description:

<details>
	<summary> Overview of commits </summary>
		- <<backport commit 1>>
		- <<backport commit 2>>
		...
</details>

2 similar comments
@hc-github-team-consul-core
Copy link
Collaborator

📣 Hi @arnabkaycee! a backport is missing for this PR [22382] for versions [1.18,1.19,1.20,1.21] please perform the backport manually and add the following snippet to your backport PR description:

<details>
	<summary> Overview of commits </summary>
		- <<backport commit 1>>
		- <<backport commit 2>>
		...
</details>

@hc-github-team-consul-core
Copy link
Collaborator

📣 Hi @arnabkaycee! a backport is missing for this PR [22382] for versions [1.18,1.19,1.20,1.21] please perform the backport manually and add the following snippet to your backport PR description:

<details>
	<summary> Overview of commits </summary>
		- <<backport commit 1>>
		- <<backport commit 2>>
		...
</details>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.18 This release series is longer active on CE, use backport/ent/1.18 backport/1.19 This release series is longer active on CE, use backport/ent/1.19 backport/1.20 Changes are backported to 1.20 backport/1.21 Changes are backported to 1.21 theme/config Relating to Consul Agent configuration, including reloading type/docs Documentation needs to be created/updated/clarified
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants