Remove the web console EPP endpoint

This removes the "create Domain/Host/Contact" forms that were supposed to be used instead of regular EPPs for CC-TLD that wanted to support it.

We're removing it because we don't use it and want to reduce unneeded code for the registry 3.0 migration.

Also, this is a security risk, as it allowed to do "billable actions" (creating a new domain for example) with the only authentication being access to the registrar's G Suite account.

This bypassed the certificate, IP whitelist, and EPP password, which is bad.

PUBLIC:
Remove the web console EPP endpoint

This removes the "create Domain/Host/Contact" forms that were supposed to be used instead of regular EPPs for CC-TLD that wanted to support it.

We're removing it because we don't use it and want to reduce unneeded code for the registry 3.0 migration.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=236244195
This commit is contained in:
guyben 2019-02-28 19:37:30 -08:00 committed by Weimin Yu
parent f12d368da3
commit dfad79759e
52 changed files with 58 additions and 3788 deletions

View file

@ -26,7 +26,6 @@ import google.registry.model.ofy.OfyFilter;
import google.registry.module.frontend.FrontendServlet;
import google.registry.server.RegistryTestServer;
import google.registry.testing.CertificateSamples;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@ -44,8 +43,7 @@ public class RegistrarConsoleScreenshotTest {
.setRoutes(
route("/registrar", FrontendServlet.class),
route("/registrar-ote-status", FrontendServlet.class),
route("/registrar-settings", FrontendServlet.class),
route("/registrar-xhr", FrontendServlet.class))
route("/registrar-settings", FrontendServlet.class))
.setFilters(ObjectifyFilter.class, OfyFilter.class)
.setFixtures(BASIC)
.setEmail("Marla.Singer@google.com")
@ -286,77 +284,6 @@ public class RegistrarConsoleScreenshotTest {
driver.diffPage("page");
}
// EPP pages aren't being included in launch, so temporarily disable the following tests.
@Test
public void domainCreate() throws Throwable {
// TODO(b/17675279): Change labels to unicode.
driver.get(server.getUrl("/registrar#domain"));
driver.waitForElement(By.tagName("h1"));
driver.diffPage("page");
}
@Test
@Ignore("TODO(b/26984251): Unflake nameserver ordering.")
public void domainView() throws Throwable {
driver.get(server.getUrl("/registrar#domain/love.xn--q9jyb4c"));
driver.waitForElement(By.tagName("h1"));
driver.diffPage("page");
}
@Test
@Ignore("TODO(b/26984251): Unflake nameserver ordering.")
public void domainEdit() throws Throwable {
driver.get(server.getUrl("/registrar#domain/love.xn--q9jyb4c"));
driver.waitForElement(By.id("reg-app-btn-edit")).click();
Thread.sleep(1000);
driver.diffPage("page");
}
@Test
public void contactCreate() throws Throwable {
driver.get(server.getUrl("/registrar#contact"));
driver.waitForElement(By.tagName("h1"));
driver.diffPage("page");
}
@Test
public void contactView() throws Throwable {
driver.get(server.getUrl("/registrar#contact/google"));
driver.waitForElement(By.tagName("h1"));
driver.diffPage("page");
}
@Test
public void contactEdit() throws Throwable {
driver.get(server.getUrl("/registrar#contact/google"));
driver.waitForElement(By.id("reg-app-btn-edit")).click();
Thread.sleep(1000);
driver.diffPage("page");
}
@Test
public void hostCreate() throws Throwable {
driver.get(server.getUrl("/registrar#host"));
driver.waitForElement(By.tagName("h1"));
driver.diffPage("page");
}
@Test
public void hostView() throws Throwable {
driver.get(server.getUrl("/registrar#host/ns1.love.xn--q9jyb4c"));
driver.waitForElement(By.tagName("h1"));
driver.diffPage("page");
}
@Test
public void hostEdit() throws Throwable {
driver.get(server.getUrl("/registrar#host/ns1.love.xn--q9jyb4c"));
driver.waitForElement(By.id("reg-app-btn-edit")).click();
Thread.sleep(1000);
driver.diffPage("page");
}
@Test
public void indexPage_smallScrolledDown() throws Throwable {
driver.manage().window().setSize(new Dimension(400, 300));

View file

@ -17,9 +17,7 @@ package google.registry.webdriver;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.server.Fixture.BASIC;
import static google.registry.server.Route.route;
import static google.registry.testing.DatastoreHelper.createTld;
import static google.registry.testing.DatastoreHelper.loadRegistrar;
import static google.registry.testing.DatastoreHelper.persistActiveDomain;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
@ -31,7 +29,6 @@ import google.registry.model.registrar.RegistrarContact;
import google.registry.module.frontend.FrontendServlet;
import google.registry.server.RegistryTestServer;
import google.registry.testing.AppEngineRule;
import google.registry.ui.server.registrar.ConsoleUiAction;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.Timeout;
@ -55,7 +52,6 @@ public class RegistrarConsoleWebTest {
new TestServerRule.Builder()
.setRunfiles(RegistryTestServer.RUNFILES)
.setRoutes(
route("/registrar-xhr", FrontendServlet.class),
route("/registrar", FrontendServlet.class),
route("/registrar-settings", FrontendServlet.class))
.setFilters(ObjectifyFilter.class, OfyFilter.class)
@ -209,44 +205,4 @@ public class RegistrarConsoleWebTest {
.getAttribute("value"))
.isEqualTo(registrar.getPhonePasscode());
}
@Test
public void testHostCreate_hostIsAnSld_eppErrorShowsInButterBar() throws Throwable {
driver.get(server.getUrl("/registrar#host"));
driver.waitForElement(By.id("domain-host-addr-add-button")).click();
driver.setFormFieldsById(ImmutableMap.of(
"host:name", "empire.vampyre",
"host:addr[0].value", "1.2.3.4"));
driver.findElement(By.id("reg-app-btn-save")).click();
Thread.sleep(1000); // TODO(b/26129174): Change butterbar code to add/remove dynamically.
assertThat(getButterBarText())
.isEqualTo("Host names must be at least two levels below the registry suffix");
}
@Test
public void testHostCreate() throws Throwable {
server.runInAppEngineEnvironment(
() -> {
createTld("vampyre");
persistActiveDomain("empire.vampyre");
return null;
});
driver.get(server.getUrl("/registrar#host"));
driver.waitForElement(By.id("domain-host-addr-add-button")).click();
driver.setFormFieldsById(ImmutableMap.of(
"host:name", "the.empire.vampyre",
"host:addr[0].value", "1.2.3.4"));
driver.findElement(By.id("reg-app-btn-save")).click();
Thread.sleep(1000); // TODO(b/26129174): Change butterbar code to add/remove dynamically.
assertThat(getButterBarText()).isEqualTo("Saved.");
}
private String getButterBarText() {
return (String) driver.executeScript(
String.format("return document.querySelector('.%s').innerText", css("kd-butterbar-text")));
}
private static String css(String name) {
return ConsoleUiAction.CSS_RENAMING_MAP_SUPPLIER.get().get(name);
}
}