From 354e1fb8b2689ddb86af04e0bcd3e20c9aeaeffc Mon Sep 17 00:00:00 2001 From: mountford Date: Thu, 4 May 2017 12:51:54 -0700 Subject: [PATCH] Change messages about failed authentication to be warnings instead of info messages ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=155114145 --- .../registry/request/auth/RequestAuthenticator.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/google/registry/request/auth/RequestAuthenticator.java b/java/google/registry/request/auth/RequestAuthenticator.java index 6b4101e96..caf9ab16e 100644 --- a/java/google/registry/request/auth/RequestAuthenticator.java +++ b/java/google/registry/request/auth/RequestAuthenticator.java @@ -63,13 +63,13 @@ public class RequestAuthenticator { break; case APP: if (!authResult.isAuthenticated()) { - logger.info("Not authorized; no authentication found"); + logger.warning("Not authorized; no authentication found"); return Optional.absent(); } break; case USER: if (authResult.authLevel() != AuthLevel.USER) { - logger.info("Not authorized; no authenticated user"); + logger.warning("Not authorized; no authenticated user"); // TODO(mountford): change this so that the caller knows to return a more helpful error return Optional.absent(); } @@ -78,7 +78,7 @@ public class RequestAuthenticator { switch (auth.userPolicy()) { case IGNORED: if (authResult.authLevel() == AuthLevel.USER) { - logger.info("Not authorized; user policy is IGNORED, but a user was found"); + logger.warning("Not authorized; user policy is IGNORED, but a user was found"); return Optional.absent(); } break; @@ -88,7 +88,7 @@ public class RequestAuthenticator { case ADMIN: if (authResult.userAuthInfo().isPresent() && !authResult.userAuthInfo().get().isUserAdmin()) { - logger.info("Not authorized; user policy is ADMIN, but the user was not an admin"); + logger.warning("Not authorized; user policy is ADMIN, but the user was not an admin"); return Optional.absent(); } break;