mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 17:07:15 +02:00
Open up RdeStagingAction @Action settings to support tool access
This change means that RdeStagingAction now accepts POST requests and supports the API auth method, which is needed for the new GenerateEscrowDepositCommand (as of [] to be able to invoke the action in manual mode. Note that this shouldn't affect the cron setting that invokes it currently, which are GET requests with INTERNAL auth. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=154764870
This commit is contained in:
parent
8bb66dd365
commit
7f2821cd7e
2 changed files with 14 additions and 1 deletions
|
@ -15,6 +15,7 @@ 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",
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
package google.registry.rde;
|
||||
|
||||
import static google.registry.request.Action.Method.GET;
|
||||
import static google.registry.request.Action.Method.POST;
|
||||
import static google.registry.util.PipelineUtils.createJobPath;
|
||||
import static javax.servlet.http.HttpServletResponse.SC_NO_CONTENT;
|
||||
|
||||
|
@ -41,6 +43,8 @@ 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;
|
||||
|
@ -181,7 +185,15 @@ import org.joda.time.Duration;
|
|||
* @see <a href="https://tools.ietf.org/html/draft-arias-noguchi-registry-data-escrow-06">Registry Data Escrow Specification</a>
|
||||
* @see <a href="https://tools.ietf.org/html/draft-arias-noguchi-dnrd-objects-mapping-05">Domain Name Registration Data Objects Mapping</a>
|
||||
*/
|
||||
@Action(path = RdeStagingAction.PATH)
|
||||
@Action(
|
||||
path = RdeStagingAction.PATH,
|
||||
method = {GET, POST},
|
||||
auth =
|
||||
@Auth(
|
||||
methods = {Auth.AuthMethod.INTERNAL, Auth.AuthMethod.API},
|
||||
minimumLevel = AuthLevel.APP,
|
||||
userPolicy = Auth.UserPolicy.ADMIN
|
||||
))
|
||||
public final class RdeStagingAction implements Runnable {
|
||||
|
||||
public static final String PATH = "/_dr/task/rdeStaging";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue