From e69a9895051c7115d0a201991c707fbef42e77e4 Mon Sep 17 00:00:00 2001 From: mojahidi Date: Tue, 15 May 2018 11:09:21 +0530 Subject: Handle logger.debug(, exception) from code Removed logger.debug(, exception) from AbstractServiceModelDao, ActionAuthenticationFilter,ApplicationConfigManagerImpl Change-Id: I58665a7dfd7e3e29d630d136af1bbf65228a9a7d Issue-ID: SDC-836 Signed-off-by: mojahidi --- .../server/filters/ActionAuthenticationFilter.java | 32 ++++++++++------------ 1 file changed, 14 insertions(+), 18 deletions(-) (limited to 'openecomp-be/api') diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionAuthenticationFilter.java b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionAuthenticationFilter.java index e10f6a57ab..7b001c84b2 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionAuthenticationFilter.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionAuthenticationFilter.java @@ -1,28 +1,24 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ +/* + * Copyright © 2018 European Support Limited + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ============LICENSE_END========================================================= - */ +*/ package org.openecomp.server.filters; -import org.openecomp.sdc.logging.api.Logger; -import org.openecomp.sdc.logging.api.LoggerFactory; - +import java.io.IOException; +import java.security.Principal; +import java.util.Base64; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; @@ -32,9 +28,9 @@ import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.security.Principal; -import java.util.Base64; + +import org.openecomp.sdc.logging.api.Logger; +import org.openecomp.sdc.logging.api.LoggerFactory; public class ActionAuthenticationFilter implements Filter { @@ -62,7 +58,7 @@ public class ActionAuthenticationFilter implements Filter { String decodedCredentials = new String(Base64.getDecoder().decode(base64Credentials)); username = decodedCredentials.substring(0, decodedCredentials.indexOf(":")); } catch (Exception exception) { - log.debug("",exception); + log.error("Failed to decode credentials", exception); setResponseStatus((HttpServletResponse) arg1, HttpServletResponse.SC_FORBIDDEN); return; } @@ -87,7 +83,7 @@ public class ActionAuthenticationFilter implements Filter { .valueOf(username.substring(username.indexOf("-") + 1).toUpperCase()); return userPrivilege.ordinal() >= requiredPrivilege.ordinal(); } catch (Exception exception) { - log.debug("",exception); + log.error("Failed to validate UserInRole", exception); return false; } } -- cgit 1.2.3-korg