mirror of
https://github.com/google/nomulus.git
synced 2025-05-21 11:49:37 +02:00
Remove AUTH_INTERNAL_ONLY (#393)
Endpoints annotated with AUTH_INTERNAL_ONLY used to be accessible manually with an internal RPC tool that adds App Engine specific HTTP headers to a request to make it look like it comes from App Engine (hence internal). This tool is used by admins to hit such endpoints during debugging, making them effectively AUTH_INTERNAL_OR_ADMIN. This RPC tool has never been made available outside Google so the open source admins do not have such ability. A recent change in the RPC tool made this hack stop working internally as well. This PR replaces all all occurances of AUTH_INTERNAL_ONLY with AUTH_INTERNAL_OR_ADMIN and brings the open source build into feature parity with the internal version. Also fixed a few issues the router tests.
This commit is contained in:
parent
1e1c8cdd80
commit
369c1259fb
44 changed files with 89 additions and 102 deletions
|
@ -47,7 +47,7 @@ import org.joda.time.DateTime;
|
||||||
path = "/_dr/cron/commitLogCheckpoint",
|
path = "/_dr/cron/commitLogCheckpoint",
|
||||||
method = Action.Method.GET,
|
method = Action.Method.GET,
|
||||||
automaticallyPrintOk = true,
|
automaticallyPrintOk = true,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class CommitLogCheckpointAction implements Runnable {
|
public final class CommitLogCheckpointAction implements Runnable {
|
||||||
|
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
|
@ -65,7 +65,7 @@ import org.joda.time.Duration;
|
||||||
@Action(
|
@Action(
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = "/_dr/task/deleteOldCommitLogs",
|
path = "/_dr/task/deleteOldCommitLogs",
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class DeleteOldCommitLogsAction implements Runnable {
|
public final class DeleteOldCommitLogsAction implements Runnable {
|
||||||
|
|
||||||
private static final int NUM_MAP_SHARDS = 20;
|
private static final int NUM_MAP_SHARDS = 20;
|
||||||
|
|
|
@ -63,7 +63,7 @@ import org.joda.time.DateTime;
|
||||||
path = ExportCommitLogDiffAction.PATH,
|
path = ExportCommitLogDiffAction.PATH,
|
||||||
method = Action.Method.POST,
|
method = Action.Method.POST,
|
||||||
automaticallyPrintOk = true,
|
automaticallyPrintOk = true,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class ExportCommitLogDiffAction implements Runnable {
|
public final class ExportCommitLogDiffAction implements Runnable {
|
||||||
|
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
|
@ -111,7 +111,7 @@ import org.joda.time.Duration;
|
||||||
@Action(
|
@Action(
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = "/_dr/task/deleteContactsAndHosts",
|
path = "/_dr/task/deleteContactsAndHosts",
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public class DeleteContactsAndHostsAction implements Runnable {
|
public class DeleteContactsAndHostsAction implements Runnable {
|
||||||
|
|
||||||
static final String KIND_CONTACT = getKind(ContactResource.class);
|
static final String KIND_CONTACT = getKind(ContactResource.class);
|
||||||
|
|
|
@ -55,7 +55,7 @@ import javax.inject.Inject;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = "/_dr/task/deleteLoadTestData",
|
path = "/_dr/task/deleteLoadTestData",
|
||||||
method = POST,
|
method = POST,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public class DeleteLoadTestDataAction implements Runnable {
|
public class DeleteLoadTestDataAction implements Runnable {
|
||||||
|
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
|
@ -68,7 +68,7 @@ import org.joda.time.Duration;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = "/_dr/task/deleteProberData",
|
path = "/_dr/task/deleteProberData",
|
||||||
method = POST,
|
method = POST,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public class DeleteProberDataAction implements Runnable {
|
public class DeleteProberDataAction implements Runnable {
|
||||||
|
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
|
@ -75,7 +75,7 @@ import org.joda.time.DateTime;
|
||||||
@Action(
|
@Action(
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = "/_dr/task/expandRecurringBillingEvents",
|
path = "/_dr/task/expandRecurringBillingEvents",
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public class ExpandRecurringBillingEventsAction implements Runnable {
|
public class ExpandRecurringBillingEventsAction implements Runnable {
|
||||||
|
|
||||||
public static final String PARAM_CURSOR_TIME = "cursorTime";
|
public static final String PARAM_CURSOR_TIME = "cursorTime";
|
||||||
|
|
|
@ -75,7 +75,7 @@ import org.joda.time.Duration;
|
||||||
@Action(
|
@Action(
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = "/_dr/task/refreshDnsOnHostRename",
|
path = "/_dr/task/refreshDnsOnHostRename",
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public class RefreshDnsOnHostRenameAction implements Runnable {
|
public class RefreshDnsOnHostRenameAction implements Runnable {
|
||||||
|
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
|
@ -33,7 +33,7 @@ import javax.inject.Inject;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = "/_dr/cron/commitLogFanout",
|
path = "/_dr/cron/commitLogFanout",
|
||||||
automaticallyPrintOk = true,
|
automaticallyPrintOk = true,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class CommitLogFanoutAction implements Runnable {
|
public final class CommitLogFanoutAction implements Runnable {
|
||||||
|
|
||||||
public static final String BUCKET_PARAM = "bucket";
|
public static final String BUCKET_PARAM = "bucket";
|
||||||
|
|
|
@ -87,7 +87,7 @@ import javax.inject.Inject;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = "/_dr/cron/fanout",
|
path = "/_dr/cron/fanout",
|
||||||
automaticallyPrintOk = true,
|
automaticallyPrintOk = true,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class TldFanoutAction implements Runnable {
|
public final class TldFanoutAction implements Runnable {
|
||||||
|
|
||||||
/** A set of control params to TldFanoutAction that aren't passed down to the executing action. */
|
/** A set of control params to TldFanoutAction that aren't passed down to the executing action. */
|
||||||
|
|
|
@ -52,7 +52,7 @@ import org.joda.time.Duration;
|
||||||
path = PublishDnsUpdatesAction.PATH,
|
path = PublishDnsUpdatesAction.PATH,
|
||||||
method = POST,
|
method = POST,
|
||||||
automaticallyPrintOk = true,
|
automaticallyPrintOk = true,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class PublishDnsUpdatesAction implements Runnable, Callable<Void> {
|
public final class PublishDnsUpdatesAction implements Runnable, Callable<Void> {
|
||||||
|
|
||||||
public static final String PATH = "/_dr/task/publishDnsUpdates";
|
public static final String PATH = "/_dr/task/publishDnsUpdates";
|
||||||
|
|
|
@ -80,7 +80,7 @@ import org.joda.time.Duration;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = "/_dr/cron/readDnsQueue",
|
path = "/_dr/cron/readDnsQueue",
|
||||||
automaticallyPrintOk = true,
|
automaticallyPrintOk = true,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class ReadDnsQueueAction implements Runnable {
|
public final class ReadDnsQueueAction implements Runnable {
|
||||||
|
|
||||||
private static final String PARAM_JITTER_SECONDS = "jitterSeconds";
|
private static final String PARAM_JITTER_SECONDS = "jitterSeconds";
|
||||||
|
|
|
@ -35,7 +35,7 @@ import javax.inject.Inject;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = "/_dr/dnsRefresh",
|
path = "/_dr/dnsRefresh",
|
||||||
automaticallyPrintOk = true,
|
automaticallyPrintOk = true,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class RefreshDnsAction implements Runnable {
|
public final class RefreshDnsAction implements Runnable {
|
||||||
|
|
||||||
private final Clock clock;
|
private final Clock clock;
|
||||||
|
|
|
@ -45,7 +45,7 @@ import javax.inject.Inject;
|
||||||
path = BackupDatastoreAction.PATH,
|
path = BackupDatastoreAction.PATH,
|
||||||
method = POST,
|
method = POST,
|
||||||
automaticallyPrintOk = true,
|
automaticallyPrintOk = true,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public class BackupDatastoreAction implements Runnable {
|
public class BackupDatastoreAction implements Runnable {
|
||||||
|
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
|
@ -51,7 +51,7 @@ import org.joda.time.Duration;
|
||||||
path = BigqueryPollJobAction.PATH,
|
path = BigqueryPollJobAction.PATH,
|
||||||
method = {Action.Method.GET, Action.Method.POST},
|
method = {Action.Method.GET, Action.Method.POST},
|
||||||
automaticallyPrintOk = true,
|
automaticallyPrintOk = true,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public class BigqueryPollJobAction implements Runnable {
|
public class BigqueryPollJobAction implements Runnable {
|
||||||
|
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
|
@ -59,7 +59,7 @@ import org.joda.time.format.PeriodFormat;
|
||||||
path = CheckBackupAction.PATH,
|
path = CheckBackupAction.PATH,
|
||||||
method = {POST, GET},
|
method = {POST, GET},
|
||||||
automaticallyPrintOk = true,
|
automaticallyPrintOk = true,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public class CheckBackupAction implements Runnable {
|
public class CheckBackupAction implements Runnable {
|
||||||
|
|
||||||
/** Parameter names for passing parameters into this action. */
|
/** Parameter names for passing parameters into this action. */
|
||||||
|
|
|
@ -65,7 +65,7 @@ import org.joda.time.DateTime;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = "/_dr/task/exportDomainLists",
|
path = "/_dr/task/exportDomainLists",
|
||||||
method = POST,
|
method = POST,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public class ExportDomainListsAction implements Runnable {
|
public class ExportDomainListsAction implements Runnable {
|
||||||
|
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
|
@ -49,7 +49,7 @@ import javax.inject.Inject;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = "/_dr/task/exportPremiumTerms",
|
path = "/_dr/task/exportPremiumTerms",
|
||||||
method = POST,
|
method = POST,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public class ExportPremiumTermsAction implements Runnable {
|
public class ExportPremiumTermsAction implements Runnable {
|
||||||
|
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
|
@ -37,7 +37,7 @@ import javax.inject.Inject;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = "/_dr/task/exportReservedTerms",
|
path = "/_dr/task/exportReservedTerms",
|
||||||
method = POST,
|
method = POST,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public class ExportReservedTermsAction implements Runnable {
|
public class ExportReservedTermsAction implements Runnable {
|
||||||
|
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
|
@ -56,7 +56,7 @@ import javax.inject.Inject;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = "/_dr/task/syncGroupMembers",
|
path = "/_dr/task/syncGroupMembers",
|
||||||
method = POST,
|
method = POST,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class SyncGroupMembersAction implements Runnable {
|
public final class SyncGroupMembersAction implements Runnable {
|
||||||
|
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
|
@ -39,7 +39,7 @@ import javax.inject.Inject;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = UpdateSnapshotViewAction.PATH,
|
path = UpdateSnapshotViewAction.PATH,
|
||||||
method = POST,
|
method = POST,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public class UpdateSnapshotViewAction implements Runnable {
|
public class UpdateSnapshotViewAction implements Runnable {
|
||||||
|
|
||||||
/** Headers for passing parameters into the servlet. */
|
/** Headers for passing parameters into the servlet. */
|
||||||
|
|
|
@ -52,7 +52,7 @@ import javax.inject.Inject;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = UploadDatastoreBackupAction.PATH,
|
path = UploadDatastoreBackupAction.PATH,
|
||||||
method = POST,
|
method = POST,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public class UploadDatastoreBackupAction implements Runnable {
|
public class UploadDatastoreBackupAction implements Runnable {
|
||||||
|
|
||||||
/** Parameter names for passing parameters into the servlet. */
|
/** Parameter names for passing parameters into the servlet. */
|
||||||
|
|
|
@ -60,7 +60,7 @@ import org.joda.time.Duration;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = SyncRegistrarsSheetAction.PATH,
|
path = SyncRegistrarsSheetAction.PATH,
|
||||||
method = POST,
|
method = POST,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public class SyncRegistrarsSheetAction implements Runnable {
|
public class SyncRegistrarsSheetAction implements Runnable {
|
||||||
|
|
||||||
private enum Result {
|
private enum Result {
|
||||||
|
|
|
@ -58,7 +58,7 @@ import org.joda.time.DateTime;
|
||||||
path = BrdaCopyAction.PATH,
|
path = BrdaCopyAction.PATH,
|
||||||
method = POST,
|
method = POST,
|
||||||
automaticallyPrintOk = true,
|
automaticallyPrintOk = true,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class BrdaCopyAction implements Runnable {
|
public final class BrdaCopyAction implements Runnable {
|
||||||
|
|
||||||
static final String PATH = "/_dr/task/brdaCopy";
|
static final String PATH = "/_dr/task/brdaCopy";
|
||||||
|
|
|
@ -53,7 +53,7 @@ import org.joda.time.Duration;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = RdeReportAction.PATH,
|
path = RdeReportAction.PATH,
|
||||||
method = POST,
|
method = POST,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class RdeReportAction implements Runnable, EscrowTask {
|
public final class RdeReportAction implements Runnable, EscrowTask {
|
||||||
|
|
||||||
static final String PATH = "/_dr/task/rdeReport";
|
static final String PATH = "/_dr/task/rdeReport";
|
||||||
|
|
|
@ -195,7 +195,7 @@ import org.joda.time.Duration;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = RdeStagingAction.PATH,
|
path = RdeStagingAction.PATH,
|
||||||
method = {GET, POST},
|
method = {GET, POST},
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class RdeStagingAction implements Runnable {
|
public final class RdeStagingAction implements Runnable {
|
||||||
|
|
||||||
public static final String PATH = "/_dr/task/rdeStaging";
|
public static final String PATH = "/_dr/task/rdeStaging";
|
||||||
|
|
|
@ -84,7 +84,7 @@ import org.joda.time.Duration;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = RdeUploadAction.PATH,
|
path = RdeUploadAction.PATH,
|
||||||
method = POST,
|
method = POST,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class RdeUploadAction implements Runnable, EscrowTask {
|
public final class RdeUploadAction implements Runnable, EscrowTask {
|
||||||
|
|
||||||
static final String PATH = "/_dr/task/rdeUpload";
|
static final String PATH = "/_dr/task/rdeUpload";
|
||||||
|
|
|
@ -50,7 +50,7 @@ import org.joda.time.YearMonth;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = GenerateInvoicesAction.PATH,
|
path = GenerateInvoicesAction.PATH,
|
||||||
method = POST,
|
method = POST,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public class GenerateInvoicesAction implements Runnable {
|
public class GenerateInvoicesAction implements Runnable {
|
||||||
|
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
|
@ -68,7 +68,7 @@ import org.joda.time.format.DateTimeFormat;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = IcannReportingStagingAction.PATH,
|
path = IcannReportingStagingAction.PATH,
|
||||||
method = POST,
|
method = POST,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class IcannReportingStagingAction implements Runnable {
|
public final class IcannReportingStagingAction implements Runnable {
|
||||||
|
|
||||||
static final String PATH = "/_dr/task/icannReportingStaging";
|
static final String PATH = "/_dr/task/icannReportingStaging";
|
||||||
|
|
|
@ -49,7 +49,7 @@ import org.joda.time.LocalDate;
|
||||||
service = Action.Service.BACKEND,
|
service = Action.Service.BACKEND,
|
||||||
path = GenerateSpec11ReportAction.PATH,
|
path = GenerateSpec11ReportAction.PATH,
|
||||||
method = POST,
|
method = POST,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public class GenerateSpec11ReportAction implements Runnable {
|
public class GenerateSpec11ReportAction implements Runnable {
|
||||||
|
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
|
@ -73,15 +73,7 @@ public enum Auth {
|
||||||
AUTH_INTERNAL_OR_ADMIN(
|
AUTH_INTERNAL_OR_ADMIN(
|
||||||
ImmutableList.of(AuthMethod.INTERNAL, AuthMethod.API),
|
ImmutableList.of(AuthMethod.INTERNAL, AuthMethod.API),
|
||||||
AuthLevel.APP,
|
AuthLevel.APP,
|
||||||
UserPolicy.ADMIN),
|
UserPolicy.ADMIN);
|
||||||
|
|
||||||
/**
|
|
||||||
* Allows only internal (App Engine task-queue) access.
|
|
||||||
*/
|
|
||||||
AUTH_INTERNAL_ONLY(
|
|
||||||
ImmutableList.of(AuthMethod.INTERNAL),
|
|
||||||
AuthLevel.APP,
|
|
||||||
UserPolicy.IGNORED);
|
|
||||||
|
|
||||||
private final AuthSettings authSettings;
|
private final AuthSettings authSettings;
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ import org.joda.time.Duration;
|
||||||
path = NordnUploadAction.PATH,
|
path = NordnUploadAction.PATH,
|
||||||
method = Action.Method.POST,
|
method = Action.Method.POST,
|
||||||
automaticallyPrintOk = true,
|
automaticallyPrintOk = true,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class NordnUploadAction implements Runnable {
|
public final class NordnUploadAction implements Runnable {
|
||||||
|
|
||||||
static final String PATH = "/_dr/task/nordnUpload";
|
static final String PATH = "/_dr/task/nordnUpload";
|
||||||
|
|
|
@ -56,7 +56,7 @@ import javax.inject.Inject;
|
||||||
path = NordnVerifyAction.PATH,
|
path = NordnVerifyAction.PATH,
|
||||||
method = Action.Method.POST,
|
method = Action.Method.POST,
|
||||||
automaticallyPrintOk = true,
|
automaticallyPrintOk = true,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class NordnVerifyAction implements Runnable {
|
public final class NordnVerifyAction implements Runnable {
|
||||||
|
|
||||||
static final String PATH = "/_dr/task/nordnVerify";
|
static final String PATH = "/_dr/task/nordnVerify";
|
||||||
|
|
|
@ -32,7 +32,7 @@ import javax.inject.Inject;
|
||||||
path = "/_dr/task/tmchCrl",
|
path = "/_dr/task/tmchCrl",
|
||||||
method = POST,
|
method = POST,
|
||||||
automaticallyPrintOk = true,
|
automaticallyPrintOk = true,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class TmchCrlAction implements Runnable {
|
public final class TmchCrlAction implements Runnable {
|
||||||
|
|
||||||
@Inject Marksdb marksdb;
|
@Inject Marksdb marksdb;
|
||||||
|
|
|
@ -36,7 +36,7 @@ import org.bouncycastle.openpgp.PGPException;
|
||||||
path = "/_dr/task/tmchDnl",
|
path = "/_dr/task/tmchDnl",
|
||||||
method = POST,
|
method = POST,
|
||||||
automaticallyPrintOk = true,
|
automaticallyPrintOk = true,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class TmchDnlAction implements Runnable {
|
public final class TmchDnlAction implements Runnable {
|
||||||
|
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
|
@ -34,7 +34,7 @@ import org.bouncycastle.openpgp.PGPException;
|
||||||
path = "/_dr/task/tmchSmdrl",
|
path = "/_dr/task/tmchSmdrl",
|
||||||
method = POST,
|
method = POST,
|
||||||
automaticallyPrintOk = true,
|
automaticallyPrintOk = true,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public final class TmchSmdrlAction implements Runnable {
|
public final class TmchSmdrlAction implements Runnable {
|
||||||
|
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
|
@ -48,7 +48,7 @@ import javax.inject.Inject;
|
||||||
service = Action.Service.TOOLS,
|
service = Action.Service.TOOLS,
|
||||||
path = "/_dr/task/killAllCommitLogs",
|
path = "/_dr/task/killAllCommitLogs",
|
||||||
method = POST,
|
method = POST,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public class KillAllCommitLogsAction implements Runnable {
|
public class KillAllCommitLogsAction implements Runnable {
|
||||||
|
|
||||||
@Inject MapreduceRunner mrRunner;
|
@Inject MapreduceRunner mrRunner;
|
||||||
|
|
|
@ -44,7 +44,7 @@ import javax.inject.Inject;
|
||||||
service = Action.Service.TOOLS,
|
service = Action.Service.TOOLS,
|
||||||
path = "/_dr/task/killAllEppResources",
|
path = "/_dr/task/killAllEppResources",
|
||||||
method = POST,
|
method = POST,
|
||||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||||
public class KillAllEppResourcesAction implements Runnable {
|
public class KillAllEppResourcesAction implements Runnable {
|
||||||
|
|
||||||
@Inject MapreduceRunner mrRunner;
|
@Inject MapreduceRunner mrRunner;
|
||||||
|
|
|
@ -16,7 +16,7 @@ package google.registry.request;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
import static com.google.common.truth.Truth8.assertThat;
|
||||||
import static google.registry.request.auth.Auth.AUTH_INTERNAL_ONLY;
|
import static google.registry.request.auth.Auth.AUTH_INTERNAL_OR_ADMIN;
|
||||||
import static google.registry.testing.JUnitBackports.assertThrows;
|
import static google.registry.testing.JUnitBackports.assertThrows;
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
@ -45,7 +45,7 @@ public final class RouterTest {
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Action(service = Action.Service.DEFAULT, path = "/sloth", auth = AUTH_INTERNAL_ONLY)
|
@Action(service = Action.Service.DEFAULT, path = "/sloth", auth = AUTH_INTERNAL_OR_ADMIN)
|
||||||
public static final class SlothTask implements Runnable {
|
public static final class SlothTask implements Runnable {
|
||||||
@Override
|
@Override
|
||||||
public void run() {}
|
public void run() {}
|
||||||
|
@ -79,7 +79,7 @@ public final class RouterTest {
|
||||||
service = Action.Service.DEFAULT,
|
service = Action.Service.DEFAULT,
|
||||||
path = "/prefix",
|
path = "/prefix",
|
||||||
isPrefix = true,
|
isPrefix = true,
|
||||||
auth = AUTH_INTERNAL_ONLY)
|
auth = AUTH_INTERNAL_OR_ADMIN)
|
||||||
public static final class PrefixTask implements Runnable {
|
public static final class PrefixTask implements Runnable {
|
||||||
@Override
|
@Override
|
||||||
public void run() {}
|
public void run() {}
|
||||||
|
@ -109,7 +109,7 @@ public final class RouterTest {
|
||||||
service = Action.Service.DEFAULT,
|
service = Action.Service.DEFAULT,
|
||||||
path = "/prefix/long",
|
path = "/prefix/long",
|
||||||
isPrefix = true,
|
isPrefix = true,
|
||||||
auth = AUTH_INTERNAL_ONLY)
|
auth = AUTH_INTERNAL_OR_ADMIN)
|
||||||
public static final class LongTask implements Runnable {
|
public static final class LongTask implements Runnable {
|
||||||
@Override
|
@Override
|
||||||
public void run() {}
|
public void run() {}
|
||||||
|
@ -164,7 +164,7 @@ public final class RouterTest {
|
||||||
@Action(
|
@Action(
|
||||||
service = Action.Service.DEFAULT,
|
service = Action.Service.DEFAULT,
|
||||||
path = "/samePathAsOtherTask",
|
path = "/samePathAsOtherTask",
|
||||||
auth = AUTH_INTERNAL_ONLY)
|
auth = AUTH_INTERNAL_OR_ADMIN)
|
||||||
public static final class DuplicateTask1 implements Runnable {
|
public static final class DuplicateTask1 implements Runnable {
|
||||||
@Override
|
@Override
|
||||||
public void run() {}
|
public void run() {}
|
||||||
|
@ -173,7 +173,7 @@ public final class RouterTest {
|
||||||
@Action(
|
@Action(
|
||||||
service = Action.Service.DEFAULT,
|
service = Action.Service.DEFAULT,
|
||||||
path = "/samePathAsOtherTask",
|
path = "/samePathAsOtherTask",
|
||||||
auth = AUTH_INTERNAL_ONLY)
|
auth = AUTH_INTERNAL_OR_ADMIN)
|
||||||
public static final class DuplicateTask2 implements Runnable {
|
public static final class DuplicateTask2 implements Runnable {
|
||||||
@Override
|
@Override
|
||||||
public void run() {}
|
public void run() {}
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class RequestAuthenticatorTest {
|
||||||
AuthLevel.NONE,
|
AuthLevel.NONE,
|
||||||
UserPolicy.IGNORED);
|
UserPolicy.IGNORED);
|
||||||
|
|
||||||
private static final AuthSettings AUTH_INTERNAL_ONLY = AuthSettings.create(
|
private static final AuthSettings AUTH_INTERNAL_OR_ADMIN = AuthSettings.create(
|
||||||
ImmutableList.of(AuthMethod.INTERNAL),
|
ImmutableList.of(AuthMethod.INTERNAL),
|
||||||
AuthLevel.APP,
|
AuthLevel.APP,
|
||||||
UserPolicy.IGNORED);
|
UserPolicy.IGNORED);
|
||||||
|
@ -157,7 +157,7 @@ public class RequestAuthenticatorTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInternalAuth_notInvokedInternally() {
|
public void testInternalAuth_notInvokedInternally() {
|
||||||
Optional<AuthResult> authResult = runTest(mockUserService, AUTH_INTERNAL_ONLY);
|
Optional<AuthResult> authResult = runTest(mockUserService, AUTH_INTERNAL_OR_ADMIN);
|
||||||
|
|
||||||
verifyZeroInteractions(mockUserService);
|
verifyZeroInteractions(mockUserService);
|
||||||
assertThat(authResult).isEmpty();
|
assertThat(authResult).isEmpty();
|
||||||
|
@ -167,7 +167,7 @@ public class RequestAuthenticatorTest {
|
||||||
public void testInternalAuth_success() {
|
public void testInternalAuth_success() {
|
||||||
when(req.getHeader("X-AppEngine-QueueName")).thenReturn("__cron");
|
when(req.getHeader("X-AppEngine-QueueName")).thenReturn("__cron");
|
||||||
|
|
||||||
Optional<AuthResult> authResult = runTest(mockUserService, AUTH_INTERNAL_ONLY);
|
Optional<AuthResult> authResult = runTest(mockUserService, AUTH_INTERNAL_OR_ADMIN);
|
||||||
|
|
||||||
verifyZeroInteractions(mockUserService);
|
verifyZeroInteractions(mockUserService);
|
||||||
assertThat(authResult).isPresent();
|
assertThat(authResult).isPresent();
|
||||||
|
|
|
@ -37,18 +37,18 @@ public class GoldenFileTestHelper {
|
||||||
String goldenFileDescription = null;
|
String goldenFileDescription = null;
|
||||||
|
|
||||||
private static final String UPDATE_COMMAND =
|
private static final String UPDATE_COMMAND =
|
||||||
"nomulus -e localhost %1$s > %2$s";
|
"../gradlew nomulus && java -jar build/libs/nomulus.jar -e localhost %s > %s";
|
||||||
|
|
||||||
private static final String UPDATE_INSTRUCTIONS =
|
private static final String UPDATE_INSTRUCTIONS =
|
||||||
Joiner.on('\n')
|
Joiner.on('\n')
|
||||||
.join(
|
.join(
|
||||||
"",
|
"",
|
||||||
"-------------------------------------------------------------------------------",
|
"-------------------------------------------------------------------------------",
|
||||||
"Your changes affect the %3$s. To update the checked-in version, run:",
|
"Your changes affect the %s. To update the checked-in version, run the following"
|
||||||
|
+ " command in the core project:",
|
||||||
UPDATE_COMMAND,
|
UPDATE_COMMAND,
|
||||||
"");
|
"");
|
||||||
|
|
||||||
|
|
||||||
public static GoldenFileTestHelper assertThat(String actualValue) {
|
public static GoldenFileTestHelper assertThat(String actualValue) {
|
||||||
return new GoldenFileTestHelper().setActualValue(actualValue);
|
return new GoldenFileTestHelper().setActualValue(actualValue);
|
||||||
}
|
}
|
||||||
|
@ -82,9 +82,9 @@ public class GoldenFileTestHelper {
|
||||||
actualValue, expectedValue);
|
actualValue, expectedValue);
|
||||||
assertWithMessage(
|
assertWithMessage(
|
||||||
UPDATE_INSTRUCTIONS,
|
UPDATE_INSTRUCTIONS,
|
||||||
|
goldenFileDescription,
|
||||||
nomulusCommand,
|
nomulusCommand,
|
||||||
filePath(context, filename),
|
filePath(context, filename))
|
||||||
goldenFileDescription)
|
|
||||||
.fail();
|
.fail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,43 +1,43 @@
|
||||||
PATH CLASS METHODS OK AUTH_METHODS MIN USER_POLICY
|
PATH CLASS METHODS OK AUTH_METHODS MIN USER_POLICY
|
||||||
/_dr/cron/commitLogCheckpoint CommitLogCheckpointAction GET y INTERNAL APP IGNORED
|
/_dr/cron/commitLogCheckpoint CommitLogCheckpointAction GET y INTERNAL,API APP ADMIN
|
||||||
/_dr/cron/commitLogFanout CommitLogFanoutAction GET y INTERNAL APP IGNORED
|
/_dr/cron/commitLogFanout CommitLogFanoutAction GET y INTERNAL,API APP ADMIN
|
||||||
/_dr/cron/fanout TldFanoutAction GET y INTERNAL APP IGNORED
|
/_dr/cron/fanout TldFanoutAction GET y INTERNAL,API APP ADMIN
|
||||||
/_dr/cron/readDnsQueue ReadDnsQueueAction GET y INTERNAL APP IGNORED
|
/_dr/cron/readDnsQueue ReadDnsQueueAction GET y INTERNAL,API APP ADMIN
|
||||||
/_dr/dnsRefresh RefreshDnsAction GET y INTERNAL APP IGNORED
|
/_dr/dnsRefresh RefreshDnsAction GET y INTERNAL,API APP ADMIN
|
||||||
/_dr/task/backupDatastore BackupDatastoreAction POST y INTERNAL APP IGNORED
|
/_dr/task/backupDatastore BackupDatastoreAction POST y INTERNAL,API APP ADMIN
|
||||||
/_dr/task/brdaCopy BrdaCopyAction POST y INTERNAL APP IGNORED
|
/_dr/task/brdaCopy BrdaCopyAction POST y INTERNAL,API APP ADMIN
|
||||||
/_dr/task/checkDatastoreBackup CheckBackupAction POST,GET y INTERNAL APP IGNORED
|
/_dr/task/checkDatastoreBackup CheckBackupAction POST,GET y INTERNAL,API APP ADMIN
|
||||||
/_dr/task/copyDetailReports CopyDetailReportsAction POST n INTERNAL,API APP ADMIN
|
/_dr/task/copyDetailReports CopyDetailReportsAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/deleteContactsAndHosts DeleteContactsAndHostsAction GET n INTERNAL APP IGNORED
|
/_dr/task/deleteContactsAndHosts DeleteContactsAndHostsAction GET n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/deleteLoadTestData DeleteLoadTestDataAction POST n INTERNAL APP IGNORED
|
/_dr/task/deleteLoadTestData DeleteLoadTestDataAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/deleteOldCommitLogs DeleteOldCommitLogsAction GET n INTERNAL APP IGNORED
|
/_dr/task/deleteOldCommitLogs DeleteOldCommitLogsAction GET n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/deleteProberData DeleteProberDataAction POST n INTERNAL APP IGNORED
|
/_dr/task/deleteProberData DeleteProberDataAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/expandRecurringBillingEvents ExpandRecurringBillingEventsAction GET n INTERNAL APP IGNORED
|
/_dr/task/expandRecurringBillingEvents ExpandRecurringBillingEventsAction GET n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/exportCommitLogDiff ExportCommitLogDiffAction POST y INTERNAL APP IGNORED
|
/_dr/task/exportCommitLogDiff ExportCommitLogDiffAction POST y INTERNAL,API APP ADMIN
|
||||||
/_dr/task/exportDomainLists ExportDomainListsAction POST n INTERNAL APP IGNORED
|
/_dr/task/exportDomainLists ExportDomainListsAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/exportPremiumTerms ExportPremiumTermsAction POST n INTERNAL APP IGNORED
|
/_dr/task/exportPremiumTerms ExportPremiumTermsAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/exportReservedTerms ExportReservedTermsAction POST n INTERNAL APP IGNORED
|
/_dr/task/exportReservedTerms ExportReservedTermsAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/generateInvoices GenerateInvoicesAction POST n INTERNAL APP IGNORED
|
/_dr/task/generateInvoices GenerateInvoicesAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/generateSpec11 GenerateSpec11ReportAction POST n INTERNAL APP IGNORED
|
/_dr/task/generateSpec11 GenerateSpec11ReportAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/icannReportingStaging IcannReportingStagingAction POST n INTERNAL APP IGNORED
|
/_dr/task/icannReportingStaging IcannReportingStagingAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/icannReportingUpload IcannReportingUploadAction POST n INTERNAL,API APP ADMIN
|
/_dr/task/icannReportingUpload IcannReportingUploadAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/nordnUpload NordnUploadAction POST y INTERNAL APP IGNORED
|
/_dr/task/nordnUpload NordnUploadAction POST y INTERNAL,API APP ADMIN
|
||||||
/_dr/task/nordnVerify NordnVerifyAction POST y INTERNAL APP IGNORED
|
/_dr/task/nordnVerify NordnVerifyAction POST y INTERNAL,API APP ADMIN
|
||||||
/_dr/task/pollBigqueryJob BigqueryPollJobAction GET,POST y INTERNAL APP IGNORED
|
/_dr/task/pollBigqueryJob BigqueryPollJobAction GET,POST y INTERNAL,API APP ADMIN
|
||||||
/_dr/task/publishDnsUpdates PublishDnsUpdatesAction POST y INTERNAL APP IGNORED
|
/_dr/task/publishDnsUpdates PublishDnsUpdatesAction POST y INTERNAL,API APP ADMIN
|
||||||
/_dr/task/publishInvoices PublishInvoicesAction POST n INTERNAL,API APP ADMIN
|
/_dr/task/publishInvoices PublishInvoicesAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/publishSpec11 PublishSpec11ReportAction POST n INTERNAL,API APP ADMIN
|
/_dr/task/publishSpec11 PublishSpec11ReportAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/rdeReport RdeReportAction POST n INTERNAL APP IGNORED
|
/_dr/task/rdeReport RdeReportAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/rdeStaging RdeStagingAction GET,POST n INTERNAL APP IGNORED
|
/_dr/task/rdeStaging RdeStagingAction GET,POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/rdeUpload RdeUploadAction POST n INTERNAL APP IGNORED
|
/_dr/task/rdeUpload RdeUploadAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/refreshDnsOnHostRename RefreshDnsOnHostRenameAction GET n INTERNAL APP IGNORED
|
/_dr/task/refreshDnsOnHostRename RefreshDnsOnHostRenameAction GET n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/resaveAllEppResources ResaveAllEppResourcesAction GET n INTERNAL,API APP ADMIN
|
/_dr/task/resaveAllEppResources ResaveAllEppResourcesAction GET n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/resaveEntity ResaveEntityAction POST n INTERNAL,API APP ADMIN
|
/_dr/task/resaveEntity ResaveEntityAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/syncGroupMembers SyncGroupMembersAction POST n INTERNAL APP IGNORED
|
/_dr/task/syncGroupMembers SyncGroupMembersAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/syncRegistrarsSheet SyncRegistrarsSheetAction POST n INTERNAL APP IGNORED
|
/_dr/task/syncRegistrarsSheet SyncRegistrarsSheetAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/tmchCrl TmchCrlAction POST y INTERNAL APP IGNORED
|
/_dr/task/tmchCrl TmchCrlAction POST y INTERNAL,API APP ADMIN
|
||||||
/_dr/task/tmchDnl TmchDnlAction POST y INTERNAL APP IGNORED
|
/_dr/task/tmchDnl TmchDnlAction POST y INTERNAL,API APP ADMIN
|
||||||
/_dr/task/tmchSmdrl TmchSmdrlAction POST y INTERNAL APP IGNORED
|
/_dr/task/tmchSmdrl TmchSmdrlAction POST y INTERNAL,API APP ADMIN
|
||||||
/_dr/task/updateRegistrarRdapBaseUrls UpdateRegistrarRdapBaseUrlsAction GET y INTERNAL,API APP ADMIN
|
/_dr/task/updateRegistrarRdapBaseUrls UpdateRegistrarRdapBaseUrlsAction GET y INTERNAL,API APP ADMIN
|
||||||
/_dr/task/updateSnapshotView UpdateSnapshotViewAction POST n INTERNAL APP IGNORED
|
/_dr/task/updateSnapshotView UpdateSnapshotViewAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/uploadDatastoreBackup UploadDatastoreBackupAction POST n INTERNAL APP IGNORED
|
/_dr/task/uploadDatastoreBackup UploadDatastoreBackupAction POST n INTERNAL,API APP ADMIN
|
||||||
|
|
|
@ -13,8 +13,8 @@ PATH CLASS METHODS OK AUTH
|
||||||
/_dr/epptool EppToolAction POST n INTERNAL,API APP ADMIN
|
/_dr/epptool EppToolAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/loadtest LoadTestAction POST y INTERNAL,API APP ADMIN
|
/_dr/loadtest LoadTestAction POST y INTERNAL,API APP ADMIN
|
||||||
/_dr/task/generateZoneFiles GenerateZoneFilesAction POST n INTERNAL,API APP ADMIN
|
/_dr/task/generateZoneFiles GenerateZoneFilesAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/killAllCommitLogs KillAllCommitLogsAction POST n INTERNAL APP IGNORED
|
/_dr/task/killAllCommitLogs KillAllCommitLogsAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/killAllEppResources KillAllEppResourcesAction POST n INTERNAL APP IGNORED
|
/_dr/task/killAllEppResources KillAllEppResourcesAction POST n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/refreshDnsForAllDomains RefreshDnsForAllDomainsAction GET n INTERNAL,API APP ADMIN
|
/_dr/task/refreshDnsForAllDomains RefreshDnsForAllDomainsAction GET n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/resaveAllHistoryEntries ResaveAllHistoryEntriesAction GET n INTERNAL,API APP ADMIN
|
/_dr/task/resaveAllHistoryEntries ResaveAllHistoryEntriesAction GET n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/restoreCommitLogs RestoreCommitLogsAction POST y INTERNAL,API APP ADMIN
|
/_dr/task/restoreCommitLogs RestoreCommitLogsAction POST y INTERNAL,API APP ADMIN
|
||||||
|
|
|
@ -117,11 +117,6 @@ make sense. A master enumeration lists all the valid triplets. They are:
|
||||||
because we don't require a user for internal requests, but the user policy
|
because we don't require a user for internal requests, but the user policy
|
||||||
is `ADMIN`, meaning that if there *is* a user, it needs to be an admin.
|
is `ADMIN`, meaning that if there *is* a user, it needs to be an admin.
|
||||||
|
|
||||||
* `AUTH_INTERNAL_ONLY`: Only internal requests are allowed. This is appropriate
|
|
||||||
for actions which are only executed by cron jobs, and therefore have no
|
|
||||||
authenticated user. The method is `INTERNAL`, the minimum level is `APP`,
|
|
||||||
and the user policy is `IGNORED`.
|
|
||||||
|
|
||||||
* `AUTH_PUBLIC_OR_INTERNAL`: Allows anyone access, as long as they use OAuth to
|
* `AUTH_PUBLIC_OR_INTERNAL`: Allows anyone access, as long as they use OAuth to
|
||||||
authenticate. Also allows access from App Engine task-queue. Note that OAuth
|
authenticate. Also allows access from App Engine task-queue. Note that OAuth
|
||||||
client ID still needs to be whitelisted in the config file for OAuth-based
|
client ID still needs to be whitelisted in the config file for OAuth-based
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue