mirror of
https://github.com/google/nomulus.git
synced 2025-04-30 03:57:51 +02:00
RDAP: Remove port43 element from JSON output
According to Gustavo Lozano of ICANN: "In the case of the RDAP profile (gTLD space), the “port43” element is not expected to be used, because Whois/43 tcp will be deprecated in the future." So it sounds like we should not include the port43 element for the moment. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=130017966
This commit is contained in:
parent
72894253ae
commit
0cab13e6d8
32 changed files with 43 additions and 71 deletions
|
@ -23,6 +23,7 @@ import dagger.Provides;
|
|||
import java.lang.annotation.Documented;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.inject.Qualifier;
|
||||
import org.joda.money.CurrencyUnit;
|
||||
import org.joda.time.DateTimeConstants;
|
||||
|
@ -319,7 +320,7 @@ public final class ConfigModule {
|
|||
*/
|
||||
@Provides
|
||||
@Config("rdeImportBucket")
|
||||
public String provideRdeImportBucket(@Config("projectId") String projectId) {
|
||||
public static String provideRdeImportBucket(@Config("projectId") String projectId) {
|
||||
return projectId + "-rde-import";
|
||||
}
|
||||
|
||||
|
@ -533,14 +534,17 @@ public final class ConfigModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* WHOIS server displayed in RDAP query responses.
|
||||
* WHOIS server displayed in RDAP query responses. As per Gustavo Lozano of ICANN, this should be
|
||||
* omitted, but the ICANN operational profile doesn't actually say that, so it's good to have the
|
||||
* ability to reinstate this field if necessary.
|
||||
*
|
||||
* @see google.registry.rdap.RdapActionBase
|
||||
*/
|
||||
@Nullable
|
||||
@Provides
|
||||
@Config("rdapWhoisServer")
|
||||
public static String provideRdapWhoisServer() {
|
||||
return "whois.nic.google";
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Returns Braintree Merchant Account IDs for each supported currency. */
|
||||
|
|
|
@ -43,6 +43,7 @@ import google.registry.request.Response;
|
|||
import google.registry.util.FormattingLogger;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
import org.json.simple.JSONValue;
|
||||
|
||||
|
@ -68,7 +69,7 @@ public abstract class RdapActionBase implements Runnable {
|
|||
@Inject @RequestMethod Action.Method requestMethod;
|
||||
@Inject @RequestPath String requestPath;
|
||||
@Inject @Config("rdapLinkBase") String rdapLinkBase;
|
||||
@Inject @Config("rdapWhoisServer") String rdapWhoisServer;
|
||||
@Inject @Config("rdapWhoisServer") @Nullable String rdapWhoisServer;
|
||||
|
||||
/** Returns a string like "domain name" or "nameserver", used for error strings. */
|
||||
abstract String getHumanReadableObjectTypeName();
|
||||
|
|
|
@ -124,7 +124,7 @@ public class RdapDomainActionTest {
|
|||
action.clock = clock;
|
||||
action.response = response;
|
||||
action.rdapLinkBase = "https://example.com/rdap/";
|
||||
action.rdapWhoisServer = "whois.example.tld";
|
||||
action.rdapWhoisServer = null;
|
||||
|
||||
// history entries
|
||||
persistResource(
|
||||
|
@ -199,9 +199,6 @@ public class RdapDomainActionTest {
|
|||
if (!map.containsKey("remarks")) {
|
||||
RdapTestHelper.addDomainBoilerplateRemarks(builder);
|
||||
}
|
||||
if (!map.containsKey("port43")) {
|
||||
builder.put("port43", "whois.example.com");
|
||||
}
|
||||
obj = builder.build();
|
||||
}
|
||||
return obj;
|
||||
|
|
|
@ -274,7 +274,7 @@ public class RdapDomainSearchActionTest {
|
|||
action.clock = clock;
|
||||
action.response = response;
|
||||
action.rdapLinkBase = "https://example.com/rdap/";
|
||||
action.rdapWhoisServer = "whois.example.tld";
|
||||
action.rdapWhoisServer = null;
|
||||
}
|
||||
|
||||
private Object generateExpectedJson(String expectedOutputFile) {
|
||||
|
|
|
@ -145,7 +145,7 @@ public class RdapEntityActionTest {
|
|||
action.clock = clock;
|
||||
action.response = response;
|
||||
action.rdapLinkBase = "https://example.com/rdap/";
|
||||
action.rdapWhoisServer = "whois.example.tld";
|
||||
action.rdapWhoisServer = null;
|
||||
}
|
||||
|
||||
private Object generateActualJson(String name) {
|
||||
|
@ -180,9 +180,6 @@ public class RdapEntityActionTest {
|
|||
if (!map.containsKey("rdapConformance")) {
|
||||
builder.put("rdapConformance", ImmutableList.of("rdap_level_0"));
|
||||
}
|
||||
if (!map.containsKey("port43")) {
|
||||
builder.put("port43", "whois.example.tld");
|
||||
}
|
||||
if (!map.containsKey("notices")) {
|
||||
RdapTestHelper.addTermsOfServiceNotice(builder, "https://example.com/rdap/");
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ public class RdapEntitySearchActionTest {
|
|||
action.response = response;
|
||||
action.rdapResultSetMaxSize = 100;
|
||||
action.rdapLinkBase = "https://example.com/rdap/";
|
||||
action.rdapWhoisServer = "whois.example.tld";
|
||||
action.rdapWhoisServer = null;
|
||||
action.fnParam = Optional.absent();
|
||||
action.handleParam = Optional.absent();
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public class RdapHelpActionTest {
|
|||
action.clock = clock;
|
||||
action.response = response;
|
||||
action.rdapLinkBase = "https://example.tld/rdap/";
|
||||
action.rdapWhoisServer = "whois.example.tld";
|
||||
action.rdapWhoisServer = null;
|
||||
}
|
||||
|
||||
private Object generateActualJson(String helpPath) {
|
||||
|
|
|
@ -77,7 +77,8 @@ public class RdapJsonFormatterTest {
|
|||
|
||||
private static final String LINK_BASE = "http://myserver.google.com/";
|
||||
private static final String LINK_BASE_NO_TRAILING_SLASH = "http://myserver.google.com";
|
||||
private static final String WHOIS_SERVER = "whois.google.com";
|
||||
// Do not set a port43 whois server, as per Gustavo Lozano.
|
||||
private static final String WHOIS_SERVER = null;
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
|
|
|
@ -76,7 +76,7 @@ public class RdapNameserverActionTest {
|
|||
action.response = response;
|
||||
action.requestPath = RdapNameserverAction.PATH.concat(input);
|
||||
action.rdapLinkBase = "https://example.tld/rdap/";
|
||||
action.rdapWhoisServer = "whois.example.tld";
|
||||
action.rdapWhoisServer = null;
|
||||
return action;
|
||||
}
|
||||
|
||||
|
@ -121,9 +121,6 @@ public class RdapNameserverActionTest {
|
|||
if (!map.containsKey("rdapConformance")) {
|
||||
builder.put("rdapConformance", ImmutableList.of("rdap_level_0"));
|
||||
}
|
||||
if (!map.containsKey("port43")) {
|
||||
builder.put("port43", "whois.example.tld");
|
||||
}
|
||||
if (!map.containsKey("notices")) {
|
||||
RdapTestHelper.addTermsOfServiceNotice(builder, "https://example.tld/rdap/");
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ public class RdapNameserverSearchActionTest {
|
|||
action.response = response;
|
||||
action.rdapResultSetMaxSize = 100;
|
||||
action.rdapLinkBase = "https://example.tld/rdap/";
|
||||
action.rdapWhoisServer = "whois.example.tld";
|
||||
action.rdapWhoisServer = null;
|
||||
action.ipParam = Optional.absent();
|
||||
action.nameParam = Optional.absent();
|
||||
}
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
["tel", {"type" : ["fax"]}, "uri", "tel:+1.2126660420"],
|
||||
["email", {}, "text", "%EMAIL%"]
|
||||
]
|
||||
],
|
||||
"port43": "whois.example.tld"
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -354,6 +354,5 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"objectClassName": "domain",
|
||||
"port43": "whois.example.tld"
|
||||
"objectClassName": "domain"
|
||||
}
|
||||
|
|
|
@ -355,6 +355,5 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"objectClassName": "domain",
|
||||
"port43": "whois.example.tld"
|
||||
"objectClassName": "domain"
|
||||
}
|
||||
|
|
|
@ -24,6 +24,5 @@
|
|||
"eventDate": "1999-01-01T00:00:00.000Z"
|
||||
},
|
||||
],
|
||||
"objectClassName": "nameserver",
|
||||
"port43": "whois.example.tld"
|
||||
"objectClassName": "nameserver"
|
||||
}
|
||||
|
|
|
@ -19,6 +19,5 @@
|
|||
"eventDate": "1999-01-01T00:00:00.000Z"
|
||||
},
|
||||
],
|
||||
"objectClassName": "nameserver",
|
||||
"port43": "whois.example.tld"
|
||||
"objectClassName": "nameserver"
|
||||
}
|
||||
|
|
|
@ -25,6 +25,5 @@
|
|||
"eventDate": "1999-01-01T00:00:00.000Z"
|
||||
},
|
||||
],
|
||||
"objectClassName": "nameserver",
|
||||
"port43": "whois.example.tld"
|
||||
"objectClassName": "nameserver"
|
||||
}
|
||||
|
|
|
@ -43,8 +43,7 @@
|
|||
["tel", {"type" : ["fax"]}, "uri", "tel:+1.2126660420"],
|
||||
["email", {}, "text", "blinky@b.tld"]
|
||||
]
|
||||
],
|
||||
"port43": "whois.example.tld"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectClassName" : "entity",
|
||||
|
@ -130,8 +129,7 @@
|
|||
]
|
||||
],
|
||||
}
|
||||
],
|
||||
"port43": "whois.example.tld"
|
||||
]
|
||||
}
|
||||
],
|
||||
"rdapConformance": [ "rdap_level_0" ],
|
||||
|
|
|
@ -356,8 +356,7 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"objectClassName": "domain",
|
||||
"port43": "whois.example.tld"
|
||||
"objectClassName": "domain"
|
||||
},
|
||||
{
|
||||
"status": [
|
||||
|
@ -715,8 +714,7 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"objectClassName": "domain",
|
||||
"port43": "whois.example.tld"
|
||||
"objectClassName": "domain"
|
||||
}
|
||||
],
|
||||
"rdapConformance": [
|
||||
|
|
|
@ -25,8 +25,7 @@
|
|||
"eventActor": "foo",
|
||||
"eventDate": "1999-01-01T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"port43": "whois.example.tld"
|
||||
]
|
||||
},
|
||||
{
|
||||
"objectClassName" : "nameserver",
|
||||
|
@ -53,8 +52,7 @@
|
|||
"eventActor": "foo",
|
||||
"eventDate": "1999-01-01T00:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"port43": "whois.example.tld"
|
||||
]
|
||||
}
|
||||
],
|
||||
"rdapConformance" : ["rdap_level_0"],
|
||||
|
|
|
@ -82,6 +82,5 @@
|
|||
]
|
||||
],
|
||||
}
|
||||
],
|
||||
"port43": "whois.example.tld"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -41,6 +41,5 @@
|
|||
["tel", {"type" : ["voice"]}, "uri", "tel:+1.2126660420"],
|
||||
["tel", {"type" : ["fax"]}, "uri", "tel:+1.2126660420"]
|
||||
]
|
||||
],
|
||||
"port43": "whois.google.com"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -217,6 +217,5 @@
|
|||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"port43": "whois.google.com"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -161,6 +161,5 @@
|
|||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"port43": "whois.google.com"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -24,6 +24,5 @@
|
|||
{
|
||||
"v4" : ["1.2.3.4"],
|
||||
"v6" : ["bad:f00d:cafe::15:beef"]
|
||||
},
|
||||
"port43": "whois.google.com"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,5 @@
|
|||
"ipAddresses" :
|
||||
{
|
||||
"v4" : ["1.2.3.4"]
|
||||
},
|
||||
"port43": "whois.google.com"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,5 @@
|
|||
"ipAddresses" :
|
||||
{
|
||||
"v6" : ["bad:f00d:cafe::15:beef"]
|
||||
},
|
||||
"port43": "whois.google.com"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,5 @@
|
|||
"eventActor": "foo",
|
||||
"eventDate": "1996-01-01T00:00:00.000Z"
|
||||
},
|
||||
],
|
||||
"port43": "whois.google.com"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -30,6 +30,5 @@
|
|||
["tel", {"type" : ["fax"]}, "uri", "tel:+1.2126660420"],
|
||||
["email", {}, "text", "lol@cat.みんな"]
|
||||
]
|
||||
],
|
||||
"port43": "whois.google.com"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -30,6 +30,5 @@
|
|||
["tel", {"type" : ["fax"]}, "uri", "tel:+1.2126660420"],
|
||||
["email", {}, "text", "lol@cat.みんな"]
|
||||
]
|
||||
],
|
||||
"port43": "whois.google.com"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -97,6 +97,5 @@
|
|||
]
|
||||
],
|
||||
}
|
||||
],
|
||||
"port43": "whois.google.com"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -40,6 +40,5 @@
|
|||
["tel", {"type" : ["fax"]}, "uri", "tel:+1.2126660420"],
|
||||
["email", {}, "text", "bog@cat.みんな"]
|
||||
]
|
||||
],
|
||||
"port43": "whois.google.com"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -41,6 +41,5 @@
|
|||
["tel", {"type" : ["fax"]}, "uri", "tel:+1.2126660420"],
|
||||
["email", {}, "text", "bog@cat.みんな"]
|
||||
]
|
||||
],
|
||||
"port43": "whois.google.com"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue