mirror of
https://github.com/google/nomulus
synced 2026-01-08 07:11:44 +00:00
Change @Auth to an AutoValue, and created a set of predefined Auths
We want to be safer and more explicit about the authentication needed by the many actions that exist. As such, we make the 'auth' parameter required in @Action (so it's always clear who can run a specific action) and we replace the @Auth with an enum so that only pre-approved configurations that are aptly named and documented can be used. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=162210306
This commit is contained in:
@@ -33,7 +33,6 @@ import google.registry.request.Action;
|
||||
import google.registry.request.RequestPath;
|
||||
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 google.registry.whois.WhoisMetrics.WhoisMetric;
|
||||
@@ -99,7 +98,7 @@ import org.joda.time.Duration;
|
||||
@Action(
|
||||
path = WhoisHttpServer.PATH,
|
||||
isPrefix = true,
|
||||
auth = @Auth(minimumLevel = AuthLevel.NONE, userPolicy = Auth.UserPolicy.PUBLIC)
|
||||
auth = Auth.AUTH_PUBLIC_ANONYMOUS
|
||||
)
|
||||
public final class WhoisHttpServer implements Runnable {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user