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

Optimize challenge handling #171

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Optimize challenge handling #171

wants to merge 16 commits into from

Conversation

diLLec
Copy link
Contributor

@diLLec diLLec commented Feb 25, 2025

ACME providers seam to have slightly different formats in the Response when validation a process already has started for a domain. To be more flexible on that, this change adds the find_challenges filter plugin which parses the data into a standardized format for the challenge provider task modules.

While other providers always seam to publish the challenges in the challenge_data field of the response, the telesec ACME API will only put the information to challenge_date when the certificate is new or if it has reached it's due date - only that one time. Therefore re-running the module to renew the certificate anytime before the due date or with acme_force_renewal: true will need the token information out of the authorizations field of the response.

I have attached a sample dataset into tests/integration/targets/acme_letsencrypt/find-challenge-filter-plugin.yml for reference.

Alltogether the following changes are introduced:

  • adding the find_challenges.py filter plugin which will honor the challenge_data_type
  • Create the acme_challenge_data dict in create-challenge.yml
  • Use the acme_challenge_data[domain] variable instead of acme_challenge['challenge_data'][domain] in challenge providers

Michael Kluge and others added 12 commits February 12, 2025 13:37
Signed-off-by: Martin Schurz <[email protected]>
Signed-off-by: Martin Schurz <[email protected]>
Signed-off-by: Martin Schurz <[email protected]>
ACME providers seam to have slightly different formats in the Response when
validation a process already has started for a domain. To be more flexible
on that, this change adds the find_challenges filter plugin which parses the
data into a standardized format for the challenge provider task modules
@diLLec diLLec requested a review from a team as a code owner February 25, 2025 09:27
@diLLec
Copy link
Contributor Author

diLLec commented Mar 3, 2025

The test are clean now, except for the http-challenge-local.yml test. The file (located in /tmp) outputs a dns challenge instead of a http challenge as expected. I did not find the file inside of the repository, so I suspect it to be created inside of the github actions somehow. Please support me to fix this.

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