mirror of
https://github.com/google/nomulus
synced 2026-02-03 19:42:39 +00:00
Do not send SNI headers in the GCP proxy
The server no longer checks it as of [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=213278568
This commit is contained in:
@@ -150,7 +150,6 @@ public class EppProtocolModule {
|
||||
config.epp.relayHost,
|
||||
config.epp.relayPath,
|
||||
accessTokenSupplier,
|
||||
config.epp.serverHostname,
|
||||
helloBytes,
|
||||
metrics);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,6 @@ public class ProxyConfig {
|
||||
public int maxMessageLengthBytes;
|
||||
public int headerLengthBytes;
|
||||
public int readTimeoutSeconds;
|
||||
public String serverHostname;
|
||||
public Quota quota;
|
||||
}
|
||||
|
||||
|
||||
@@ -96,10 +96,6 @@ epp:
|
||||
# request.
|
||||
readTimeoutSeconds: 3600
|
||||
|
||||
# Hostname of the EPP server.
|
||||
# TODO(b/64510444) Remove this after nomulus no longer check sni header.
|
||||
serverHostname: epp.yourdomain.tld
|
||||
|
||||
# Quota configuration for EPP
|
||||
quota:
|
||||
|
||||
|
||||
@@ -52,10 +52,6 @@ public class EppServiceHandler extends HttpsRelayServiceHandler {
|
||||
/** Name of the HTTP header that stores the client certificate hash. */
|
||||
public static final String SSL_CLIENT_CERTIFICATE_HASH_FIELD = "X-SSL-Certificate";
|
||||
|
||||
/** Name of the HTTP header that stores the epp server name requested by the client using SNI. */
|
||||
// TODO(b/64510444): remove this header entirely when borg proxy is retired.
|
||||
public static final String REQUESTED_SERVERNAME_VIA_SNI_FIELD = "X-Requested-Servername-SNI";
|
||||
|
||||
/** Name of the HTTP header that stores the client IP address. */
|
||||
public static final String FORWARDED_FOR_FIELD = "X-Forwarded-For";
|
||||
|
||||
@@ -64,7 +60,6 @@ public class EppServiceHandler extends HttpsRelayServiceHandler {
|
||||
|
||||
public static final String EPP_CONTENT_TYPE = "application/epp+xml";
|
||||
|
||||
private final String serverHostname;
|
||||
private final byte[] helloBytes;
|
||||
|
||||
private String sslClientCertificateHash;
|
||||
@@ -74,11 +69,9 @@ public class EppServiceHandler extends HttpsRelayServiceHandler {
|
||||
String relayHost,
|
||||
String relayPath,
|
||||
Supplier<String> accessTokenSupplier,
|
||||
String serverHostname,
|
||||
byte[] helloBytes,
|
||||
FrontendMetrics metrics) {
|
||||
super(relayHost, relayPath, accessTokenSupplier, metrics);
|
||||
this.serverHostname = serverHostname;
|
||||
this.helloBytes = helloBytes;
|
||||
}
|
||||
|
||||
@@ -135,7 +128,6 @@ public class EppServiceHandler extends HttpsRelayServiceHandler {
|
||||
request
|
||||
.headers()
|
||||
.set(SSL_CLIENT_CERTIFICATE_HASH_FIELD, sslClientCertificateHash)
|
||||
.set(REQUESTED_SERVERNAME_VIA_SNI_FIELD, serverHostname)
|
||||
.set(FORWARDED_FOR_FIELD, clientAddress)
|
||||
.set(HttpHeaderNames.CONTENT_TYPE, EPP_CONTENT_TYPE)
|
||||
.set(HttpHeaderNames.ACCEPT, EPP_CONTENT_TYPE);
|
||||
|
||||
Reference in New Issue
Block a user