Repository navigation
Fix: Ensure mod_md tls-alpn-01 challenge is usable - #2643
JonasVerhofste wants to merge 1 commit into
Conversation
|
That looks like a CI bug, not a failed test. 😅 |
|
@JonasVerhofste : You are right, the acceptance tests don't run correctly on forks. Initial spec tests look good, I'll run some acceptance tests so we can get platform-specific feedback. |
|
Running CI tests for this PR here: #2644 |
|
Acceptance test results here: https://github.com/puppetlabs/puppetlabs-apache/actions/runs/32295187776?pr=2644 All failures in PR acceptance testing match existing failures in the Nightly build against main:
These are pre-existing issues on main, not caused by this change. Next step will require an engineering review when the team is available, but tests look good! |
7ee051e to
d59f879
Compare
|
Rebasing and re-running tests against latest |
|
CI test run created: #2652 |
@jst-cyr That will break my gpg signing, so hit me up if you want me to rebase again. :) |
|
@JonasVerhofste : My apologies for that! I'll ping you the next time before doing that. We do have some new test results though... Acceptance Test Results: https://github.com/puppetlabs/puppetlabs-apache/actions/runs/36456571257?pr=2652 Mostly green, but some failures on Debian 11 and SLES 12.
|
d59f879 to
36734cf
Compare
|
@jst-cyr Going through the codepath I don't see how the SLES12 failure can be caused by this PR for Would it be an option to somehow turn on diff output for the litmus tests ( I mostly think this is a flaky test and nothing to do with the change, but with the diff output we could confirm for sure. |
|
@JonasVerhofste : It does seem like SLES 12 is quite flaky. Been trying to re-run the tests and it keeps failing provisioning. I think you are right that there is something flaky with the SLES 12 infrastructure. Leave this one with me and I will try to rerun that particular test once provisioning is working again and see if we get the same result. |
|
@JonasVerhofste : As you suspected, not a logical problem, but flaky infrastructure. It took a lot of runs (12, specifically) but I eventually got SLES 12 to green. There must be something in the way the infra is provisioned that can cause acceptance tests to fail, but it does look like we are good to go now! |
|
@jst-cyr I already rebased and force pushed, so from my end: merge at will! :) |
|
@JonasVerhofste : It still needs an engineering review, but I've put this on their backlog list so the team can review when they have a moment! |
span786
left a comment
There was a problem hiding this comment.
Thanks @JonasVerhofste. Allowing acme-tls/1 in protocols is the right fix for tls-alpn-01, which apache::mod::md already accepts in md_ca_challenges. The init.pp side looks good.
The vhost.pp side has a placement issue (inline comment). Could you also add rspec-puppet cases for both classes? For example: protocols => ['acme-tls/1'] compiles and contains Class['apache::mod::md'], with and without h2. Those would have caught it.
| 'h2_upgrade' => $h2_upgrade, | ||
| 'h2_window_size' => $h2_window_size, | ||
| } | ||
| if 'acme-tls/1' in $protocols { |
There was a problem hiding this comment.
This include is nested inside the if ('h2' in $protocols or 'h2c' in $protocols or $h2_copy_files != undef or ...) and $ensure == 'present' block. With only acme-tls/1 (e.g. protocols => ['acme-tls/1', 'http/1.1'], the typical non-HTTP/2 setup) that block is skipped, so apache::mod::md is never included. That's exactly the case this PR is meant to fix. It only works today if the vhost also enables h2/h2c or sets an h2_* parameter.
Could it move out of the HTTP/2 block and merge with the existing mdomain check just below? Something like:
if ($mdomain or 'acme-tls/1' in $protocols) and $ensure == 'present' {
include apache::mod::md
}That also keeps the $ensure == 'present' guard.
span786
left a comment
There was a problem hiding this comment.
I'm marking my earlier review as changes requested so this doesn't merge as-is.
In manifests/vhost.pp, include apache::mod::md is nested inside the HTTP/2 block. A vhost with only acme-tls/1 (e.g. protocols => ['acme-tls/1', 'http/1.1']) therefore never loads mod_md, which is the case this PR is meant to fix. Please move it out of that block, for example:
if ($mdomain or 'acme-tls/1' in $protocols) and $ensure == 'present' {
include apache::mod::md
}Please also add rspec-puppet coverage for acme-tls/1 with and without h2, in both apache and apache::vhost. I'll approve once those are in.
The challenge is already configurable in apache::mod::md, but it needs the `acme-tls/1` protocol to properly work (see "https: Challenges"): https://httpd.apache.org/docs/2.4/mod/mod_md.html Signed-off-by: Jonas Verhofsté <jonas@verhofste.tech>
|
@JonasVerhofste, thanks for the push. I don't think it picked up the requested changes, though. The head is back at
Happy to approve once those are in. |
|
@span786 If you look at the comittor, you'll notice it was you who pushed, not me. :P Haven't had the time to look at it further, it'll probably be for this weekend. |
The challenge is already configurable in apache::mod::md, but it needs the
acme-tls/1protocol to properly work (see "https: Challenges"): https://httpd.apache.org/docs/2.4/mod/mod_md.html