Skip to content

Forward EPP client certificate chain validation status and hostnames - #3293

Open
anomaly2104 wants to merge 1 commit into
google:masterfrom
anomaly2104:epp-cert-chain-headers
Open

anomaly2104 wants to merge 1 commit into
google:masterfrom
anomaly2104:epp-cert-chain-headers

Conversation

@anomaly2104

@anomaly2104 anomaly2104 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

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 (using checkServerTrusted so publicly trusted serverAuth-only TLS certs are accepted), DNS SAN / CN-fallback hostname extraction (excluding wildcards for now), 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


This change is Reviewable

@anomaly2104
anomaly2104 requested a review from CydeWeys November 24, 2026 08:57
@anomaly2104
anomaly2104 force-pushed the epp-cert-chain-headers branch 2 times, most recently from ec26b30 to 9e48c39 Compare November 25, 2026 08:13

@CydeWeys CydeWeys left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

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 explicitly disabled and checkServerTrusted so publicly
  trusted serverAuth-only TLS certs are accepted), SAN dNSName hostname
  extraction (excluding wildcards for now 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
@anomaly2104
anomaly2104 force-pushed the epp-cert-chain-headers branch from 9e48c39 to 8e3361e Compare November 26, 2026 08:08

This branch has not been deployed

No deployments
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.

3 participants