Skip to content

Commit 6cd351e

Browse files
authored
Remove WHOIS classes and configuration (#2859)
This is steps one and two of b/454947209 We already haven't been serving WHOIS for a while, so there's no point in keeping the old code around. This can simplify some code paths in the future (like, certain foreign-key-loads that are only used in WHOIS queries).
1 parent 19e03db commit 6cd351e

File tree

105 files changed

+19
-8623
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+19
-8623
lines changed

core/build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ def dockerIncompatibleTestPatterns = [
5555
// objects retained by frameworks.
5656
// TODO(weiminyu): identify cause and fix offending tests.
5757
def fragileTestPatterns = [
58-
// Changes cache timeouts and for some reason appears to have contention
59-
// with other tests.
60-
"google/registry/whois/WhoisCommandFactoryTest.*",
6158
// Breaks random other tests when running with standardTests.
6259
"google/registry/bsa/UploadBsaUnavailableDomainsActionTest.*",
6360
// Currently changes a global configuration parameter that for some reason

core/src/main/java/google/registry/config/RegistryConfig.java

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -976,17 +976,6 @@ public static int provideTransientFailureRetries(RegistryConfigSettings config)
976976
return config.misc.transientFailureRetries;
977977
}
978978

979-
/**
980-
* Amount of time public HTTP proxies are permitted to cache our WHOIS responses.
981-
*
982-
* @see google.registry.whois.WhoisHttpAction
983-
*/
984-
@Provides
985-
@Config("whoisHttpExpires")
986-
public static Duration provideWhoisHttpExpires() {
987-
return Duration.standardDays(1);
988-
}
989-
990979
/**
991980
* Maximum number of results to return for an RDAP search query
992981
*
@@ -998,39 +987,6 @@ public static int provideRdapResultSetMaxSize() {
998987
return 100;
999988
}
1000989

1001-
/**
1002-
* Redaction text for email address in WHOIS
1003-
*
1004-
* @see google.registry.whois.WhoisResponse
1005-
*/
1006-
@Provides
1007-
@Config("whoisRedactedEmailText")
1008-
public static String provideWhoisRedactedEmailText(RegistryConfigSettings config) {
1009-
return config.registryPolicy.whoisRedactedEmailText;
1010-
}
1011-
1012-
/**
1013-
* Disclaimer displayed at the end of WHOIS query results.
1014-
*
1015-
* @see google.registry.whois.WhoisResponse
1016-
*/
1017-
@Provides
1018-
@Config("whoisDisclaimer")
1019-
public static String provideWhoisDisclaimer(RegistryConfigSettings config) {
1020-
return config.registryPolicy.whoisDisclaimer;
1021-
}
1022-
1023-
/**
1024-
* Message template for whois response when queried domain is blocked by BSA.
1025-
*
1026-
* @see google.registry.whois.WhoisResponse
1027-
*/
1028-
@Provides
1029-
@Config("domainBlockedByBsaTemplate")
1030-
public static String provideDomainBlockedByBsaTemplate(RegistryConfigSettings config) {
1031-
return config.registryPolicy.domainBlockedByBsaTemplate;
1032-
}
1033-
1034990
/**
1035991
* Maximum QPS for the Google Cloud Monitoring V3 (aka Stackdriver) API. The QPS limit can be
1036992
* adjusted by contacting Cloud Support.
@@ -1105,12 +1061,6 @@ public static String provideCustomLogicFactoryClass(RegistryConfigSettings confi
11051061
return config.registryPolicy.customLogicFactoryClass;
11061062
}
11071063

1108-
@Provides
1109-
@Config("whoisCommandFactoryClass")
1110-
public static String provideWhoisCommandFactoryClass(RegistryConfigSettings config) {
1111-
return config.registryPolicy.whoisCommandFactoryClass;
1112-
}
1113-
11141064
@Provides
11151065
@Config("dnsCountQueryCoordinatorClass")
11161066
public static String dnsCountQueryCoordinatorClass(RegistryConfigSettings config) {

core/src/main/java/google/registry/config/RegistryConfigSettings.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ public static class RegistryPolicy {
9090
public String contactAndHostRoidSuffix;
9191
public String productName;
9292
public String customLogicFactoryClass;
93-
public String whoisCommandFactoryClass;
9493
public String dnsCountQueryCoordinatorClass;
9594
public int contactAutomaticTransferDays;
9695
public String greetingServerId;
@@ -102,9 +101,6 @@ public static class RegistryPolicy {
102101
public String registryAdminClientId;
103102
public String premiumTermsExportDisclaimer;
104103
public String reservedTermsExportDisclaimer;
105-
public String whoisRedactedEmailText;
106-
public String whoisDisclaimer;
107-
public String domainBlockedByBsaTemplate;
108104
public String rdapTos;
109105
public String rdapTosStaticUrl;
110106
public String registryName;

core/src/main/java/google/registry/config/files/default-config.yaml

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ registryPolicy:
6565
# See flows/custom/CustomLogicFactory.java
6666
customLogicFactoryClass: google.registry.flows.custom.CustomLogicFactory
6767

68-
# WHOIS command factory fully-qualified class name.
69-
# See whois/WhoisCommandFactory.java
70-
whoisCommandFactoryClass: google.registry.whois.WhoisCommandFactory
71-
7268
# Custom logic class for handling DNS query count reporting for ICANN.
7369
# See reporting/icann/DnsCountQueryCoordinator.java
7470
dnsCountQueryCoordinatorClass: google.registry.reporting.icann.DummyDnsCountQueryCoordinator
@@ -114,31 +110,6 @@ registryPolicy:
114110
to publish. This list is subject to change. The most up-to-date source
115111
is always the registry itself, by sending domain check EPP commands.
116112
117-
# Redaction text for email address in WHOIS
118-
whoisRedactedEmailText: |
119-
Please query the WHOIS server of the owning registrar identified in this
120-
output for information on how to contact the Registrant, Admin, or Tech
121-
contact of the queried domain name.
122-
123-
# Disclaimer at the top of WHOIS results.
124-
whoisDisclaimer: |
125-
WHOIS information is provided by the registry solely for query-based,
126-
informational purposes. Any information provided is "as is" without any
127-
guarantee of accuracy. You may not use such information to (a) allow,
128-
enable, or otherwise support the transmission of mass unsolicited,
129-
commercial advertising or solicitations; (b) enable high volume, automated,
130-
electronic processes that access the registry's systems or any
131-
ICANN-Accredited Registrar, except as reasonably necessary to register
132-
domain names or modify existing registrations; or (c) engage in or support
133-
unlawful behavior. We reserve the right to restrict or deny your access to
134-
the WHOIS database, and may modify these terms at any time.
135-
136-
# BSA blocked domain name template.
137-
domainBlockedByBsaTemplate: |
138-
Domain Name: %s
139-
>>> This name is not available for registration.
140-
>>> This name has been blocked by a GlobalBlock service.
141-
142113
# RDAP Terms of Service text displayed at the /rdap/help/tos endpoint.
143114
rdapTos: >
144115
By querying our Domain Database as part of the RDAP pilot program (RDAP

core/src/main/java/google/registry/env/common/pubapi/WEB-INF/web.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@
5757
<!-- Verbatim JavaScript sources (only visible to admins for debugging). -->
5858
<url-pattern>/assets/sources/*</url-pattern>
5959

60-
<!-- TODO(b/26776367): Move these files to /assets/sources. -->
61-
<url-pattern>/assets/js/registrar_bin.js.map</url-pattern>
62-
<url-pattern>/assets/js/registrar_dbg.js</url-pattern>
63-
<url-pattern>/assets/css/registrar_dbg.css</url-pattern>
64-
6560
</web-resource-collection>
6661
<auth-constraint>
6762
<role-name>admin</role-name>

core/src/main/java/google/registry/model/EppResourceUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public static <T extends EppResource> Optional<T> loadByForeignKey(
130130
* past.
131131
*
132132
* <p>Do not call this cached version for anything that needs transactional consistency. It should
133-
* only be used when it's OK if the data is potentially being out of date, e.g. WHOIS.
133+
* only be used when it's OK if the data is potentially being out of date, e.g. RDAP.
134134
*
135135
* @param clazz the resource type to load
136136
* @param foreignKey id to match
@@ -181,7 +181,7 @@ private static <T extends EppResource> Optional<T> loadByForeignKeyHelper(
181181
return Optional.empty();
182182
}
183183
// When setting status values based on a time, choose the greater of "now" and the resource's
184-
// UpdateAutoTimestamp. For non-mutating uses (info, whois, etc.), this is equivalent to rolling
184+
// UpdateAutoTimestamp. For non-mutating uses (info, RDAP, etc.), this is equivalent to rolling
185185
// "now" forward to at least the last update on the resource, so that a read right after a write
186186
// doesn't appear stale. For mutating flows, if we had to roll now forward then the flow will
187187
// fail when it tries to save anything, since "now" is needed to be > the last update time for

core/src/main/java/google/registry/model/registrar/Registrar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ public boolean isLive() {
492492
return LIVE_STATES.contains(state);
493493
}
494494

495-
/** Returns {@code true} if registrar should be visible in WHOIS results. */
495+
/** Returns {@code true} if registrar should be visible in RDAP results. */
496496
public boolean isLiveAndPubliclyVisible() {
497497
return LIVE_STATES.contains(state) && PUBLICLY_VISIBLE_TYPES.contains(type);
498498
}

core/src/main/java/google/registry/module/RequestComponent.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,6 @@
131131
import google.registry.ui.server.console.settings.ContactAction;
132132
import google.registry.ui.server.console.settings.RdapRegistrarFieldsAction;
133133
import google.registry.ui.server.console.settings.SecurityAction;
134-
import google.registry.whois.WhoisAction;
135-
import google.registry.whois.WhoisHttpAction;
136-
import google.registry.whois.WhoisModule;
137134

138135
/** Dagger component with per-request lifetime. */
139136
@RequestScope
@@ -161,8 +158,7 @@
161158
Spec11Module.class,
162159
TmchModule.class,
163160
ToolsServerModule.class,
164-
WhiteboxModule.class,
165-
WhoisModule.class,
161+
WhiteboxModule.class
166162
})
167163
interface RequestComponent {
168164
FlowComponent.Builder flowComponentBuilder();
@@ -343,10 +339,6 @@ interface RequestComponent {
343339

344340
VerifyOteAction verifyOteAction();
345341

346-
WhoisAction whoisAction();
347-
348-
WhoisHttpAction whoisHttpAction();
349-
350342
WipeOutContactHistoryPiiAction wipeOutContactHistoryPiiAction();
351343

352344
@Subcomponent.Builder

core/src/main/java/google/registry/module/pubapi/PubApiRequestComponent.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@
3636
import google.registry.request.RequestComponentBuilder;
3737
import google.registry.request.RequestModule;
3838
import google.registry.request.RequestScope;
39-
import google.registry.whois.WhoisAction;
40-
import google.registry.whois.WhoisHttpAction;
41-
import google.registry.whois.WhoisModule;
4239

4340
/** Dagger component with per-request lifetime for "pubapi" App Engine module. */
4441
@RequestScope
@@ -49,8 +46,7 @@
4946
EppTlsModule.class,
5047
RdapModule.class,
5148
RequestModule.class,
52-
WhiteboxModule.class,
53-
WhoisModule.class,
49+
WhiteboxModule.class
5450
})
5551
public interface PubApiRequestComponent {
5652
CheckApiAction checkApiAction();
@@ -67,9 +63,6 @@ public interface PubApiRequestComponent {
6763

6864
ReadinessProbeActionPubApi readinessProbeActionPubApi();
6965

70-
WhoisHttpAction whoisHttpAction();
71-
WhoisAction whoisAction();
72-
7366
@Subcomponent.Builder
7467
abstract class Builder implements RequestComponentBuilder<PubApiRequestComponent> {
7568
@Override public abstract Builder requestModule(RequestModule requestModule);

core/src/main/java/google/registry/request/RequestMetrics.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,13 @@ public void record(
6767
private static String truncatePath(String path) {
6868
// We want to bucket RDAP requests by type to use less metric space,
6969
// e.g. "/rdap/domains" rather than "/rdap/domains/foo.tld"
70-
7170
if (path.startsWith("/rdap")) {
7271
List<String> splitPath = Splitter.on("/").omitEmptyStrings().splitToList(path);
7372
return Streams.stream(Iterables.limit(splitPath, 2))
7473
.collect(Collectors.joining("/", "/", "/"));
75-
// Similarly, we put all web WHOIS requests under the same path because otherwise its
76-
// cardinality is unbound, and it is possible to generate a huge amount of metrics with all
77-
// the different paths.
7874
} else if (path.startsWith("/whois")) {
75+
// Though we don't serve WHOIS requests anymore, bucket any non-served WHOIS requests together
76+
// to avoid an unbound cardinality
7977
return "/whois";
8078
}
8179
return path;

0 commit comments

Comments
 (0)