From 009522d078f6646d71d7e5d569d700357da72d95 Mon Sep 17 00:00:00 2001 From: mountford Date: Fri, 26 May 2017 14:21:15 -0700 Subject: [PATCH] Change auth settings on RdeStagingAction [] opened up the settings on RdeStaging, in order to make it usable by the nomulus tool. But in retrospect, we think that all we needed to do was support the POST method, not loosen the auth settings, since nomulus invokes RdeStaging via a task queue. Removing the looser auth settings will bring this action into line with other backend actions. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=157262595 --- java/google/registry/rde/BUILD | 1 - java/google/registry/rde/RdeStagingAction.java | 11 ++--------- .../module/backend/testdata/backend_routing.txt | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/java/google/registry/rde/BUILD b/java/google/registry/rde/BUILD index d3d68ca97..a0156c635 100644 --- a/java/google/registry/rde/BUILD +++ b/java/google/registry/rde/BUILD @@ -15,7 +15,6 @@ java_library( "//java/google/registry/mapreduce/inputs", "//java/google/registry/model", "//java/google/registry/request", - "//java/google/registry/request/auth", "//java/google/registry/tldconfig/idn", "//java/google/registry/util", "//java/google/registry/xjc", diff --git a/java/google/registry/rde/RdeStagingAction.java b/java/google/registry/rde/RdeStagingAction.java index e20ce2c22..28b7cca06 100644 --- a/java/google/registry/rde/RdeStagingAction.java +++ b/java/google/registry/rde/RdeStagingAction.java @@ -45,8 +45,6 @@ import google.registry.request.HttpException.BadRequestException; import google.registry.request.Parameter; import google.registry.request.RequestParameters; import google.registry.request.Response; -import google.registry.request.auth.Auth; -import google.registry.request.auth.AuthLevel; import google.registry.util.Clock; import google.registry.util.FormattingLogger; import javax.inject.Inject; @@ -189,13 +187,8 @@ import org.joda.time.Duration; */ @Action( path = RdeStagingAction.PATH, - method = {GET, POST}, - auth = - @Auth( - methods = {Auth.AuthMethod.INTERNAL, Auth.AuthMethod.API}, - minimumLevel = AuthLevel.APP, - userPolicy = Auth.UserPolicy.ADMIN - )) + method = {GET, POST} +) public final class RdeStagingAction implements Runnable { public static final String PATH = "/_dr/task/rdeStaging"; diff --git a/javatests/google/registry/module/backend/testdata/backend_routing.txt b/javatests/google/registry/module/backend/testdata/backend_routing.txt index 307c055e8..96cbc3b47 100644 --- a/javatests/google/registry/module/backend/testdata/backend_routing.txt +++ b/javatests/google/registry/module/backend/testdata/backend_routing.txt @@ -26,7 +26,7 @@ PATH CLASS METHOD /_dr/task/pollBigqueryJob BigqueryPollJobAction GET,POST y n app n INTERNAL APP IGNORED /_dr/task/publishDnsUpdates PublishDnsUpdatesAction POST y n app n INTERNAL APP IGNORED /_dr/task/rdeReport RdeReportAction POST n n app n INTERNAL APP IGNORED -/_dr/task/rdeStaging RdeStagingAction GET,POST n n app n INTERNAL,API APP ADMIN +/_dr/task/rdeStaging RdeStagingAction GET,POST n n app n INTERNAL APP IGNORED /_dr/task/rdeUpload RdeUploadAction POST n n app n INTERNAL APP IGNORED /_dr/task/refreshDnsOnHostRename RefreshDnsOnHostRenameAction GET n n app n INTERNAL APP IGNORED /_dr/task/syncGroupMembers SyncGroupMembersAction POST n n app n INTERNAL APP IGNORED