Merge "Technical debt reduction"
[policy/engine.git] / PolicyEngineUtils / src / main / java / org / onap / policy / utils / AAFPolicyClientImpl.java
index ecb51b2..c3a6be5 100644 (file)
@@ -123,6 +123,7 @@ public class AAFPolicyClientImpl implements AAFPolicyClient{
         * @param properties  Properties with CLIENT_ID, CLIENT_KEY and ENVIRONMENT
         * @throws AAFPolicyException exceptions if any.
         */
+       @Override
        public void updateProperties(Properties properties) throws AAFPolicyException{
                setup(properties);
        }
@@ -137,6 +138,7 @@ public class AAFPolicyClientImpl implements AAFPolicyClient{
         * @param action Permissions Action. 
         * @return
         */
+       @Override
        public boolean checkAuthPerm(String mechID, String pass, String type, String instance, String action){
                return checkAuth(mechID, pass) && checkPerm(mechID, pass, type, instance, action);
        }
@@ -148,6 +150,7 @@ public class AAFPolicyClientImpl implements AAFPolicyClient{
         * @param pass Password.
         * @return True or False. 
         */
+       @Override
        public boolean checkAuth(String userName, String pass){
                if(aafAuthn!=null){
                        try {
@@ -162,7 +165,6 @@ public class AAFPolicyClientImpl implements AAFPolicyClient{
                                logger.error(e.getMessage() + e);
                        }
                }
-               logger.info("Authentication failed for : " + userName + " in " + props.getProperty(Config.AAF_URL));
                return false;
        }
 
@@ -176,6 +178,7 @@ public class AAFPolicyClientImpl implements AAFPolicyClient{
         * @param action Permissions Action. 
         * @return True or False. 
         */
+       @Override
        public boolean checkPerm(String userName, String pass, String type, String instance, String action){
                int i =0;
                Boolean result= false;
@@ -190,7 +193,6 @@ public class AAFPolicyClientImpl implements AAFPolicyClient{
                                        aafLurPerm.destroy();
                                }
                        }
-                       logger.info("Permissions for : " + userName + " in " + props.getProperty(Config.AAF_URL) + " for " + type  + "," + instance + "," + action + "\n Result is: " + result);
                        i++;
                }while(i<2 && !result); // Try once more to check if this can be passed. AAF has some issues. 
                return result;