mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Remove web & protocol WHOIS, check API, and RDAP from frontend
These are now handled by the pubapi service and all publicly facing sites that were using these APIs have already been migrated over. For documentation on the newly added dispatch.xml file, see: https://cloud.google.com/appengine/docs/standard/java/config/dispatchref Note that the --auto_update_dispatch parameter needs to be passed to the `appcfg update` command in order to apply this new XML file. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=200441580
This commit is contained in:
parent
646c6fa069
commit
9097a32cc8
10 changed files with 28 additions and 143 deletions
|
@ -68,6 +68,7 @@ zip_file(
|
||||||
name = "registry_default_war",
|
name = "registry_default_war",
|
||||||
srcs = [
|
srcs = [
|
||||||
"env/common/default/WEB-INF/datastore-indexes.xml",
|
"env/common/default/WEB-INF/datastore-indexes.xml",
|
||||||
|
"env/common/default/WEB-INF/dispatch.xml",
|
||||||
"env/common/default/WEB-INF/dos.xml",
|
"env/common/default/WEB-INF/dos.xml",
|
||||||
"env/common/default/WEB-INF/logging.properties",
|
"env/common/default/WEB-INF/logging.properties",
|
||||||
"env/common/default/WEB-INF/queue.xml",
|
"env/common/default/WEB-INF/queue.xml",
|
||||||
|
|
20
java/google/registry/env/common/default/WEB-INF/dispatch.xml
vendored
Normal file
20
java/google/registry/env/common/default/WEB-INF/dispatch.xml
vendored
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<dispatch-entries>
|
||||||
|
<!-- Send all public-facing unauthenticated traffic to the pubapi service. -->
|
||||||
|
<dispatch>
|
||||||
|
<url>*/rdap/*</url>
|
||||||
|
<module>pubapi</module>
|
||||||
|
</dispatch>
|
||||||
|
<dispatch>
|
||||||
|
<url>*/whois/*</url>
|
||||||
|
<module>pubapi</module>
|
||||||
|
</dispatch>
|
||||||
|
<dispatch>
|
||||||
|
<url>*/_dr/whois</url>
|
||||||
|
<module>pubapi</module>
|
||||||
|
</dispatch>
|
||||||
|
<dispatch>
|
||||||
|
<url>*/check</url>
|
||||||
|
<module>pubapi</module>
|
||||||
|
</dispatch>
|
||||||
|
</dispatch-entries>
|
|
@ -49,39 +49,6 @@
|
||||||
<url-pattern>/registrar-settings</url-pattern>
|
<url-pattern>/registrar-settings</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
<!-- HTTP WHOIS. -->
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>frontend-servlet</servlet-name>
|
|
||||||
<url-pattern>/whois/*</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<!-- Protocol WHOIS. -->
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>frontend-servlet</servlet-name>
|
|
||||||
<url-pattern>/_dr/whois</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<!-- RDAP (new WHOIS). -->
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>frontend-servlet</servlet-name>
|
|
||||||
<url-pattern>/rdap/*</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<!-- Public API to do availability checks -->
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>frontend-servlet</servlet-name>
|
|
||||||
<url-pattern>/check</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Temporary end point for new implementation of availability checks
|
|
||||||
TODO(b/80417678): remove this stanza
|
|
||||||
-->
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>frontend-servlet</servlet-name>
|
|
||||||
<url-pattern>/check2</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<!-- Security config -->
|
<!-- Security config -->
|
||||||
<security-constraint>
|
<security-constraint>
|
||||||
<web-resource-collection>
|
<web-resource-collection>
|
||||||
|
|
|
@ -15,14 +15,12 @@ java_library(
|
||||||
"//java/google/registry/keyring/api",
|
"//java/google/registry/keyring/api",
|
||||||
"//java/google/registry/keyring/kms",
|
"//java/google/registry/keyring/kms",
|
||||||
"//java/google/registry/monitoring/whitebox",
|
"//java/google/registry/monitoring/whitebox",
|
||||||
"//java/google/registry/rdap",
|
|
||||||
"//java/google/registry/request",
|
"//java/google/registry/request",
|
||||||
"//java/google/registry/request:modules",
|
"//java/google/registry/request:modules",
|
||||||
"//java/google/registry/request/auth",
|
"//java/google/registry/request/auth",
|
||||||
"//java/google/registry/ui",
|
"//java/google/registry/ui",
|
||||||
"//java/google/registry/ui/server/registrar",
|
"//java/google/registry/ui/server/registrar",
|
||||||
"//java/google/registry/util",
|
"//java/google/registry/util",
|
||||||
"//java/google/registry/whois",
|
|
||||||
"@com_google_appengine_api_1_0_sdk",
|
"@com_google_appengine_api_1_0_sdk",
|
||||||
"@com_google_code_findbugs_jsr305",
|
"@com_google_code_findbugs_jsr305",
|
||||||
"@com_google_dagger",
|
"@com_google_dagger",
|
||||||
|
|
|
@ -50,7 +50,6 @@ import javax.inject.Singleton;
|
||||||
ConsoleConfigModule.class,
|
ConsoleConfigModule.class,
|
||||||
CustomLogicFactoryModule.class,
|
CustomLogicFactoryModule.class,
|
||||||
google.registry.keyring.api.DummyKeyringModule.class,
|
google.registry.keyring.api.DummyKeyringModule.class,
|
||||||
FrontendMetricsModule.class,
|
|
||||||
FrontendRequestComponentModule.class,
|
FrontendRequestComponentModule.class,
|
||||||
GoogleCredentialModule.class,
|
GoogleCredentialModule.class,
|
||||||
Jackson2Module.class,
|
Jackson2Module.class,
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
package google.registry.module.frontend;
|
|
||||||
|
|
||||||
import dagger.Module;
|
|
||||||
import javax.inject.Singleton;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Dagger module for injecting metrics. All metrics should have {@link Singleton} scope to avoid
|
|
||||||
* being recreated per-request, as the metrics generally track cumulative values.
|
|
||||||
*/
|
|
||||||
@Module
|
|
||||||
public class FrontendMetricsModule {}
|
|
|
@ -17,25 +17,11 @@ package google.registry.module.frontend;
|
||||||
import dagger.Module;
|
import dagger.Module;
|
||||||
import dagger.Subcomponent;
|
import dagger.Subcomponent;
|
||||||
import google.registry.dns.DnsModule;
|
import google.registry.dns.DnsModule;
|
||||||
import google.registry.flows.CheckApi2Action;
|
|
||||||
import google.registry.flows.CheckApi2Action.CheckApi2Module;
|
|
||||||
import google.registry.flows.CheckApiAction;
|
|
||||||
import google.registry.flows.CheckApiAction.CheckApiModule;
|
|
||||||
import google.registry.flows.EppConsoleAction;
|
import google.registry.flows.EppConsoleAction;
|
||||||
import google.registry.flows.EppTlsAction;
|
import google.registry.flows.EppTlsAction;
|
||||||
import google.registry.flows.FlowComponent;
|
import google.registry.flows.FlowComponent;
|
||||||
import google.registry.flows.TlsCredentials.EppTlsModule;
|
import google.registry.flows.TlsCredentials.EppTlsModule;
|
||||||
import google.registry.monitoring.whitebox.WhiteboxModule;
|
import google.registry.monitoring.whitebox.WhiteboxModule;
|
||||||
import google.registry.rdap.RdapAutnumAction;
|
|
||||||
import google.registry.rdap.RdapDomainAction;
|
|
||||||
import google.registry.rdap.RdapDomainSearchAction;
|
|
||||||
import google.registry.rdap.RdapEntityAction;
|
|
||||||
import google.registry.rdap.RdapEntitySearchAction;
|
|
||||||
import google.registry.rdap.RdapHelpAction;
|
|
||||||
import google.registry.rdap.RdapIpAction;
|
|
||||||
import google.registry.rdap.RdapModule;
|
|
||||||
import google.registry.rdap.RdapNameserverAction;
|
|
||||||
import google.registry.rdap.RdapNameserverSearchAction;
|
|
||||||
import google.registry.request.RequestComponentBuilder;
|
import google.registry.request.RequestComponentBuilder;
|
||||||
import google.registry.request.RequestModule;
|
import google.registry.request.RequestModule;
|
||||||
import google.registry.request.RequestScope;
|
import google.registry.request.RequestScope;
|
||||||
|
@ -43,46 +29,24 @@ import google.registry.ui.server.registrar.ConsoleUiAction;
|
||||||
import google.registry.ui.server.registrar.RegistrarPaymentAction;
|
import google.registry.ui.server.registrar.RegistrarPaymentAction;
|
||||||
import google.registry.ui.server.registrar.RegistrarPaymentSetupAction;
|
import google.registry.ui.server.registrar.RegistrarPaymentSetupAction;
|
||||||
import google.registry.ui.server.registrar.RegistrarSettingsAction;
|
import google.registry.ui.server.registrar.RegistrarSettingsAction;
|
||||||
import google.registry.whois.WhoisAction;
|
|
||||||
import google.registry.whois.WhoisHttpAction;
|
|
||||||
import google.registry.whois.WhoisModule;
|
|
||||||
|
|
||||||
/** Dagger component with per-request lifetime for "default" App Engine module. */
|
/** Dagger component with per-request lifetime for "default" App Engine module. */
|
||||||
@RequestScope
|
@RequestScope
|
||||||
@Subcomponent(
|
@Subcomponent(
|
||||||
modules = {
|
modules = {
|
||||||
CheckApiModule.class,
|
|
||||||
CheckApi2Module.class,
|
|
||||||
DnsModule.class,
|
DnsModule.class,
|
||||||
EppTlsModule.class,
|
EppTlsModule.class,
|
||||||
RdapModule.class,
|
|
||||||
RequestModule.class,
|
RequestModule.class,
|
||||||
WhiteboxModule.class,
|
WhiteboxModule.class,
|
||||||
WhoisModule.class,
|
|
||||||
})
|
})
|
||||||
interface FrontendRequestComponent {
|
interface FrontendRequestComponent {
|
||||||
CheckApiAction checkApiAction();
|
|
||||||
CheckApi2Action checkApi2Action();
|
|
||||||
ConsoleUiAction consoleUiAction();
|
ConsoleUiAction consoleUiAction();
|
||||||
EppConsoleAction eppConsoleAction();
|
EppConsoleAction eppConsoleAction();
|
||||||
EppTlsAction eppTlsAction();
|
EppTlsAction eppTlsAction();
|
||||||
FlowComponent.Builder flowComponentBuilder();
|
FlowComponent.Builder flowComponentBuilder();
|
||||||
RdapAutnumAction rdapAutnumAction();
|
|
||||||
RegistrarPaymentAction registrarPaymentAction();
|
RegistrarPaymentAction registrarPaymentAction();
|
||||||
RegistrarPaymentSetupAction registrarPaymentSetupAction();
|
RegistrarPaymentSetupAction registrarPaymentSetupAction();
|
||||||
RegistrarSettingsAction registrarSettingsAction();
|
RegistrarSettingsAction registrarSettingsAction();
|
||||||
RdapDomainAction rdapDomainAction();
|
|
||||||
RdapDomainSearchAction rdapDomainSearchAction();
|
|
||||||
RdapEntityAction rdapEntityAction();
|
|
||||||
RdapEntitySearchAction rdapEntitySearchAction();
|
|
||||||
RdapHelpAction rdapHelpAction();
|
|
||||||
RdapIpAction rdapDefaultAction();
|
|
||||||
RdapNameserverAction rdapNameserverAction();
|
|
||||||
RdapNameserverSearchAction rdapNameserverSearchAction();
|
|
||||||
|
|
||||||
WhoisHttpAction whoisHttpAction();
|
|
||||||
|
|
||||||
WhoisAction whoisAction();
|
|
||||||
|
|
||||||
@Subcomponent.Builder
|
@Subcomponent.Builder
|
||||||
abstract class Builder implements RequestComponentBuilder<FrontendRequestComponent> {
|
abstract class Builder implements RequestComponentBuilder<FrontendRequestComponent> {
|
||||||
|
|
|
@ -47,7 +47,6 @@ import javax.inject.Singleton;
|
||||||
ConfigModule.class,
|
ConfigModule.class,
|
||||||
CustomLogicFactoryModule.class,
|
CustomLogicFactoryModule.class,
|
||||||
google.registry.keyring.api.DummyKeyringModule.class,
|
google.registry.keyring.api.DummyKeyringModule.class,
|
||||||
PubApiMetricsModule.class,
|
|
||||||
PubApiRequestComponentModule.class,
|
PubApiRequestComponentModule.class,
|
||||||
GoogleCredentialModule.class,
|
GoogleCredentialModule.class,
|
||||||
Jackson2Module.class,
|
Jackson2Module.class,
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
// Copyright 2018 The Nomulus Authors. All Rights Reserved.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
package google.registry.module.pubapi;
|
|
||||||
|
|
||||||
import dagger.Module;
|
|
||||||
import javax.inject.Singleton;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Dagger module for injecting metrics. All metrics should have {@link Singleton} scope to avoid
|
|
||||||
* being recreated per-request, as the metrics generally track cumulative values.
|
|
||||||
*/
|
|
||||||
@Module
|
|
||||||
public class PubApiMetricsModule {}
|
|
|
@ -1,20 +1,7 @@
|
||||||
PATH CLASS METHODS OK AUTH_METHODS MIN USER_POLICY
|
PATH CLASS METHODS OK AUTH_METHODS MIN USER_POLICY
|
||||||
/_dr/epp EppTlsAction POST n INTERNAL,API APP PUBLIC
|
/_dr/epp EppTlsAction POST n INTERNAL,API APP PUBLIC
|
||||||
/_dr/whois WhoisAction POST n INTERNAL,API APP PUBLIC
|
/registrar ConsoleUiAction GET n INTERNAL,API,LEGACY NONE PUBLIC
|
||||||
/check CheckApiAction GET n INTERNAL NONE PUBLIC
|
/registrar-payment RegistrarPaymentAction POST n API,LEGACY USER PUBLIC
|
||||||
/check2 CheckApi2Action GET n INTERNAL NONE PUBLIC
|
/registrar-payment-setup RegistrarPaymentSetupAction POST n API,LEGACY USER PUBLIC
|
||||||
/rdap/autnum/(*) RdapAutnumAction GET,HEAD n INTERNAL NONE PUBLIC
|
/registrar-settings RegistrarSettingsAction POST n API,LEGACY USER PUBLIC
|
||||||
/rdap/domain/(*) RdapDomainAction GET,HEAD n INTERNAL,API,LEGACY NONE PUBLIC
|
/registrar-xhr EppConsoleAction POST n API,LEGACY USER PUBLIC
|
||||||
/rdap/domains RdapDomainSearchAction GET,HEAD n INTERNAL,API,LEGACY NONE PUBLIC
|
|
||||||
/rdap/entities RdapEntitySearchAction GET,HEAD n INTERNAL,API,LEGACY NONE PUBLIC
|
|
||||||
/rdap/entity/(*) RdapEntityAction GET,HEAD n INTERNAL,API,LEGACY NONE PUBLIC
|
|
||||||
/rdap/help(*) RdapHelpAction GET,HEAD n INTERNAL NONE PUBLIC
|
|
||||||
/rdap/ip/(*) RdapIpAction GET,HEAD n INTERNAL NONE PUBLIC
|
|
||||||
/rdap/nameserver/(*) RdapNameserverAction GET,HEAD n INTERNAL NONE PUBLIC
|
|
||||||
/rdap/nameservers RdapNameserverSearchAction GET,HEAD n INTERNAL NONE PUBLIC
|
|
||||||
/registrar ConsoleUiAction GET n INTERNAL,API,LEGACY NONE PUBLIC
|
|
||||||
/registrar-payment RegistrarPaymentAction POST n API,LEGACY USER PUBLIC
|
|
||||||
/registrar-payment-setup RegistrarPaymentSetupAction POST n API,LEGACY USER PUBLIC
|
|
||||||
/registrar-settings RegistrarSettingsAction POST n API,LEGACY USER PUBLIC
|
|
||||||
/registrar-xhr EppConsoleAction POST n API,LEGACY USER PUBLIC
|
|
||||||
/whois/(*) WhoisHttpAction GET n INTERNAL NONE PUBLIC
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue