-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
feat(ssl): add hardened HTTPS agent with OCSP mixed policy (failHard=… #6062
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am reviewing this despite it being a draft.
The code looks good and I would merge it as is 😊
Tests for this would be amazing (this way we can see if the planned PRs/features break something accidentally).
Because of where this sits, the simplest way is likely an end to end test 🤔
This is not a must though.
Thanks for the review! I had kept it in draft on purpose until I got a first round of feedback 😅
Absolutely, I’ll add an E2E test suite for this PR that rely on stable, real-world targets (like badssl.com and a few known-good hosts). I had already planned to add classic CRL support to |
Shure. What works for you |
…ns; add E2E test file `tls-revocation.spec.js`
d41f683
to
7197221
Compare
Hey @CommanderStorm, just pushed the latest changes to this PR. I also added a full end‑to‑end test suite to lock in the TLS behaviors introduced here. This is ready for (re)review, if it looks good, feel free to merge, and I’ll follow up with a separate PR to add classic CRL support and the proxy‑aware fetcher so we can safely re‑enable the validation kit with proxies. |
❗ Important Announcements
Click here for more details:
🚫 Please Avoid Unnecessary Pinging of Maintainers
We kindly ask you to refrain from pinging maintainers unless absolutely necessary. Pings are for critical/urgent pull requests that require immediate attention.
📋 Overview
What problem does this pull request address?
What features or functionality does this pull request introduce or enhance?
ignoreTls=false
) using the new dependencyhardened-https-agent
.HardenedHttpsAgent
:failHard=false
, meaning if OCSP is unavailable (no stapling, no responder URL, or fetch errors), the monitor does not fail.HardenedHttpsValidationKit
instead ofHardenedHttpsAgent
.failHard=false
, monitors do not flip DOWN.Roadmap
hardened-https-agent
and enable OCSP validation with the Mixed policy (failHard=false
).hardened-https-agent
(automatic AIA CRL extraction, fetch, and query). Then open a PR here to bump the dependency and enable CRL checks in Kuma.Proxy behavior and OCSP direct lookups
When a proxy is enabled, the
HardenedHttpsValidationKit
attaches to the same agent used by the monitor (HttpProxyAgent
/HttpsProxyAgent
/SocksProxyAgent
), so the main HTTPS connection benefits from revocation checks even when proxied.When the server does not include OCSP stapling, a secondary AIA OCSP HTTP request is performed via a basic
fetch
and currently does not use the proxy. In locked‑down egress environments, that fetch may be blocked; this is acceptable for this first step because the default policy is permissive (OCSP “mixed”,failHard=false
) to avoid false negatives.🛠️ Type of change
📄 Checklist
📷 Screenshots or Visual Changes
I've tested several live domains and connection paths (direct HTTP(S), local HTTP proxy and SOCKS5 proxy) to manually validate the validation behavior. In the screenshots you can see that
revoked.badssl.com
appears UP even though it's obviously revoked, that's because it's revoked via CRL and as said before this PR only implements OCSP-based revocation.PS: I collected test targets from https://crt.sh/test-websites.