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:
mountford 2016-08-11 12:23:39 -07:00 committed by Ben McIlwain
parent 72894253ae
commit 0cab13e6d8
32 changed files with 43 additions and 71 deletions

View file

@ -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. */

View file

@ -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();

View file

@ -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;

View file

@ -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) {

View file

@ -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/");
}

View file

@ -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();
}

View file

@ -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) {

View file

@ -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 {

View file

@ -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/");
}

View file

@ -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();
}

View file

@ -40,7 +40,6 @@
["tel", {"type" : ["fax"]}, "uri", "tel:+1.2126660420"],
["email", {}, "text", "%EMAIL%"]
]
],
"port43": "whois.example.tld"
]
}

View file

@ -354,6 +354,5 @@
]
}
],
"objectClassName": "domain",
"port43": "whois.example.tld"
"objectClassName": "domain"
}

View file

@ -355,6 +355,5 @@
]
}
],
"objectClassName": "domain",
"port43": "whois.example.tld"
"objectClassName": "domain"
}

View file

@ -24,6 +24,5 @@
"eventDate": "1999-01-01T00:00:00.000Z"
},
],
"objectClassName": "nameserver",
"port43": "whois.example.tld"
"objectClassName": "nameserver"
}

View file

@ -19,6 +19,5 @@
"eventDate": "1999-01-01T00:00:00.000Z"
},
],
"objectClassName": "nameserver",
"port43": "whois.example.tld"
"objectClassName": "nameserver"
}

View file

@ -25,6 +25,5 @@
"eventDate": "1999-01-01T00:00:00.000Z"
},
],
"objectClassName": "nameserver",
"port43": "whois.example.tld"
"objectClassName": "nameserver"
}

View file

@ -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" ],

View file

@ -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": [

View file

@ -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"],

View file

@ -82,6 +82,5 @@
]
],
}
],
"port43": "whois.example.tld"
]
}

View file

@ -41,6 +41,5 @@
["tel", {"type" : ["voice"]}, "uri", "tel:+1.2126660420"],
["tel", {"type" : ["fax"]}, "uri", "tel:+1.2126660420"]
]
],
"port43": "whois.google.com"
]
}

View file

@ -217,6 +217,5 @@
]
]
}
],
"port43": "whois.google.com"
]
}

View file

@ -161,6 +161,5 @@
]
]
}
],
"port43": "whois.google.com"
]
}

View file

@ -24,6 +24,5 @@
{
"v4" : ["1.2.3.4"],
"v6" : ["bad:f00d:cafe::15:beef"]
},
"port43": "whois.google.com"
}
}

View file

@ -23,6 +23,5 @@
"ipAddresses" :
{
"v4" : ["1.2.3.4"]
},
"port43": "whois.google.com"
}
}

View file

@ -23,6 +23,5 @@
"ipAddresses" :
{
"v6" : ["bad:f00d:cafe::15:beef"]
},
"port43": "whois.google.com"
}
}

View file

@ -19,6 +19,5 @@
"eventActor": "foo",
"eventDate": "1996-01-01T00:00:00.000Z"
},
],
"port43": "whois.google.com"
]
}

View file

@ -30,6 +30,5 @@
["tel", {"type" : ["fax"]}, "uri", "tel:+1.2126660420"],
["email", {}, "text", "lol@cat.みんな"]
]
],
"port43": "whois.google.com"
]
}

View file

@ -30,6 +30,5 @@
["tel", {"type" : ["fax"]}, "uri", "tel:+1.2126660420"],
["email", {}, "text", "lol@cat.みんな"]
]
],
"port43": "whois.google.com"
]
}

View file

@ -97,6 +97,5 @@
]
],
}
],
"port43": "whois.google.com"
]
}

View file

@ -40,6 +40,5 @@
["tel", {"type" : ["fax"]}, "uri", "tel:+1.2126660420"],
["email", {}, "text", "bog@cat.みんな"]
]
],
"port43": "whois.google.com"
]
}

View file

@ -41,6 +41,5 @@
["tel", {"type" : ["fax"]}, "uri", "tel:+1.2126660420"],
["email", {}, "text", "bog@cat.みんな"]
]
],
"port43": "whois.google.com"
]
}