Skip to content
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

Handle bad DNS configuration while generating certificate #537

Merged
merged 3 commits into from
Dec 14, 2023

Conversation

ludeeus
Copy link
Contributor

@ludeeus ludeeus commented Dec 13, 2023

This change brings in DNS validation before generating certificates.

If a bad DNS configuration is detected when there is < 25 days remaining a repair issue will be created with a warning severity.
If a bad DNS configuration is detected when there is < 18 days remaining a repair issue will be created with a error severity, and the acme client will be recreated without the custom domain.

@ludeeus ludeeus marked this pull request as ready for review December 14, 2023 09:12
hass_nabucasa/remote.py Outdated Show resolved Hide resolved
hass_nabucasa/remote.py Outdated Show resolved Hide resolved
hass_nabucasa/remote.py Show resolved Hide resolved
return False

# Recreate the acme client with working domains
await self.cloud.client.async_create_repair_issue(
Copy link
Contributor

Choose a reason for hiding this comment

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

What are we asking users to do here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently nothing, this is a no-op untill its implemented in core.

But the idea here is to notify the user that we had to create a new certificate without their defined custom domain, and they would have to remove it from the account page, or fix the DNS config of that domain

Copy link
Contributor

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Looks good!

@ludeeus ludeeus merged commit 5cf13f7 into master Dec 14, 2023
2 checks passed
@ludeeus ludeeus deleted the validate-alias-before-generating-certificates branch December 14, 2023 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants