Repository navigation
Forward EPP client certificate chain validation status and hostnames - #3293
Conversation
ec26b30 to
9e48c39
Compare
CydeWeys
left a comment
There was a problem hiding this comment.
Overall this is very clean, well-structured, and thoroughly tested—the checkServerTrusted(..., "UNKNOWN") profile choice (preserving compatibility as public CAs drop clientAuth EKU while enforcing TLSServer CA-distrust policies and digitalSignature key usage), MAX_CERTIFICATE_CHAIN_LENGTH = 10 guard, single-pass per-connection header formatting, log sanitization, and core/proxy parity all look solid.
Requesting changes for one P1 PKI security issue: Subject CN fallback bypasses OpenJDK PKIX NameConstraints in four ways (details inline on X509Utils.java). Dropping CN fallback and extracting hostnames strictly from SAN dNSName entries per RFC 9525 §6.2 closes all four bypasses and simplifies X509Utils. I also left a couple of non-blocking hardening/operational notes and minor nits.
9e48c39 to
8e3361e
Compare
d6bcbef to
6980cc0
Compare
CydeWeys
left a comment
There was a problem hiding this comment.
Thanks for cleanly addressing all Round 1 feedback—removing Subject CN fallback, explicitly disabling online revocation via PKIXBuilderParameters.setRevocationEnabled(false), adding the outer catch in SslServerInitializer, statically importing ZoneOffset.UTC, and resolving the CodeQL findings all look clean. The networking/, proxy/, and core/ changes look solid overall.
Requesting changes for one remaining P1 PKI security issue in X509Utils.normalizeCertificateHostname (an OpenJDK PKIX NameConstraints excludedSubtrees bypass via trailing-dot SAN dNSName entries, plus a companion non-ASCII dNSName parser-differential hardening item). It's a small ~3-line fix, and please include dedicated unit tests covering both the trailing-dot and non-ASCII excludedSubtrees cases alongside the fix before we approve (especially with auto-merge enabled).
A couple of non-blocking PR-level notes:
- Stale PR description (non-blocking): Bullet 1 of the PR description still references
DNS SAN / CN-fallback hostname extractionand omits online revocation being explicitly disabled (the commit message is already updated). Please sync the PR description before merge while keeping the Reviewable footer intact. - Operational headroom note (non-blocking): With
MAX_HOSTNAMES_HEADER_BYTES = 4096and Jetty's default8192-byterequestHeaderSize, the primary GKE--localsidecar path has ~2 KB of headroom under worst-case headers, whereas legacy standalone proxy + GCLB/IAP would leave only ~600–1,000 B (exceeding 8,192 B returns HTTP 431 and drops the EPP connection). Fits today, so non-blocking—just worth keeping in mind if standalone proxy + IAP remains active.
CydeWeys
left a comment
There was a problem hiding this comment.
Follow-up from a deeper PKIX/TLS security audit on 6980cc0dd0ae75e3c0b5553c1d5ada85a9f186c6: found 2 additional blocking security issues in X509Utils (intermediate CA ExtendedKeyUsage bypass and an unauthenticated Netty EventLoop CPU/heap-exhaustion DoS via LazyX509Certificate re-parsing + SunCertPathBuilder backtracking), plus a companion SHA-1 signature hardening item (for distro-packaged openjdk-25-jre-headless / ca-certificates-java truststores without [jdk] alias tags) and one minor test note on SslServerInitializerTest.java:613.
Details, recommended fixes, and required unit tests for each security fix are inline below—please include dedicated test coverage for every security fix before we approve.
Validate incoming EPP client certificate chains against the JVM default truststore after TLS handshake completion and forward the result along with extracted DNS hostnames to Nomulus, preparing for hostname-based EPP login authentication while keeping existing fingerprint-pinned connections working unchanged. - Add X.509 helpers in X509Utils for PKIX chain validation (with online revocation disabled, intermediate/leaf EKU and SHA-1 checks, 32 KB chain size and path-length bounds, and checkServerTrusted so publicly trusted serverAuth-only TLS certs are accepted), ASCII non-trailing-dot SAN dNSName hostname extraction (excluding wildcards and omitting Subject CN fallback per RFC 9525 section 6.2), and 4 KB-bounded header formatting. - Run chain validation and hostname extraction in SslServerInitializer without failing handshakes on untrusted chains, and log the validation status, failure reason, and extracted hostnames in --SSL Information--. - Forward X-SSL-Certificate-Chain-Validated and X-SSL-Certificate-Hostnames from both the integrated EPP server and proxy EppServiceHandler. BUG=http://b/573176897
6980cc0 to
dc7c7bf
Compare
|
The latest code and test changes look clean. One small non-blocking housekeeping request: please update the PR description to match the latest commit message (bullet 1 still references |
Validate incoming EPP client certificate chains against the JVM default truststore after TLS handshake completion and forward the result along with extracted DNS hostnames to Nomulus, preparing for hostname-based EPP login authentication while keeping existing fingerprint-pinned connections working unchanged.
BUG=http://b/573176897
This change is