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

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