Skip to content

Add blocklisting for recursive on-demand domains#8646

Merged
aarongable merged 6 commits intomainfrom
jit-blocklist
Feb 25, 2026
Merged

Add blocklisting for recursive on-demand domains#8646
aarongable merged 6 commits intomainfrom
jit-blocklist

Conversation

@aarongable
Copy link
Contributor

@aarongable aarongable commented Feb 25, 2026

Add BlockedOnDemandLabels, a list of strings, to the WFEs config. This new config item will be populated by a list of subdomain labels that frequently appear in just-in-time requests for certificates as a result of recursive automated crawler activity.

For example, a vulnerability-seeking bot might see a cert for example.com in CT, and attempt to access asdf.example.com. The webserver receiving that request uses us to just-in-time issue a cert for that name, when then appears in CT. Moments later, the crawler attempts to access asdf.asdf.example.com, and the cycle repeats. We don't want to issue certs for names that look like they result from this process.

Specifically, block new-order requests for requests that have at least four domain labels; and either two identical blocked labels in a row, or any three blocked labels in a row.

Fixes #8645
IN-12292 tracks the corresponding config changes

@aarongable aarongable requested a review from a team as a code owner February 25, 2026 01:04
@github-actions
Copy link
Contributor

@aarongable, this PR appears to contain configuration and/or SQL schema changes. Please ensure that a corresponding deployment ticket has been filed with the new values.

jsha
jsha previously approved these changes Feb 25, 2026
Copy link
Contributor

@jsha jsha left a comment

Choose a reason for hiding this comment

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

This looks fine, though the logic inside looksLikeRecursiveJITRequest feels slightly messy, with edge cases and chances for off-by-one.

It seems like you could do better by ranging over the slice, incrementing a score for each blockedLabel. If the score reaches 3, error; if a non-blockedLabel is seen, score is reset to 0.

The "two in a row" check would remain mostly unchanged.

Also, I think "JIT issuance" is not a broadly used term. Since we believe most affected subscribers are using Caddy, it would be slightly nicer for the error message (and the code) to say "on-demand issuance", which is closer to the term used in Caddy.

Both of these pieces of feedback are optional.

@aarongable
Copy link
Contributor Author

I like those points, I've uploaded a new version with a simpler loop and using the "on-demand" language instead of "just-in-time".

jsha
jsha previously approved these changes Feb 25, 2026
Copy link
Contributor

@jsha jsha left a comment

Choose a reason for hiding this comment

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

Approving module to the one tweak above; once you get a second approval you can go ahead and merge without waiting for my reapproval.

Co-authored-by: Jacob Hoffman-Andrews <jsha+github@letsencrypt.org>
@aarongable aarongable changed the title Add blocklisting for recursive just-in-time domains Add blocklisting for recursive on-demand domains Feb 25, 2026
jsha
jsha previously approved these changes Feb 25, 2026
Copy link
Member

@beautifulentropy beautifulentropy left a comment

Choose a reason for hiding this comment

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

Looks great, just one nit.

@aarongable
Copy link
Contributor Author

Merging on one approval, as per prior approval from a second reviewer noted above.

@aarongable aarongable merged commit 219190c into main Feb 25, 2026
30 checks passed
@aarongable aarongable deleted the jit-blocklist branch February 25, 2026 19:45
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.

Prevent just-in-time dynamic subdomain requests

3 participants