From b92d82e71019c833988be383092457d07e189a57 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Tue, 18 Sep 2018 09:55:30 -0400 Subject: [PATCH] Remove override of parent aaf version policy/parent now declares the aaf dependency so consistency is maintained in all the repositories. Removing the version declaration in order to pull in the declared version. The constructor changes to add a namespace. A null value is still possible to be used. If we are given a namespace then we will have to add that in. Preferrably via a properties file. I also noticed there is a hard-coded URL in here in the setupAAF() method on line 212. That should be moved to a property file. Issue-ID: POLICY-1119 Change-Id: I97dcd7d669d3d05db7c6597be6f3038183fa4e17 Signed-off-by: Pamela Dragosh --- PolicyEngineUtils/pom.xml | 1 - .../src/main/java/org/onap/policy/utils/AAFPolicyClientImpl.java | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/PolicyEngineUtils/pom.xml b/PolicyEngineUtils/pom.xml index f4bb5a09d..052d63785 100644 --- a/PolicyEngineUtils/pom.xml +++ b/PolicyEngineUtils/pom.xml @@ -99,7 +99,6 @@ org.onap.aaf.authz aaf-cadi-aaf - 2.1.0 com.google.code.gson diff --git a/PolicyEngineUtils/src/main/java/org/onap/policy/utils/AAFPolicyClientImpl.java b/PolicyEngineUtils/src/main/java/org/onap/policy/utils/AAFPolicyClientImpl.java index 5c46c76f7..e65ac2780 100644 --- a/PolicyEngineUtils/src/main/java/org/onap/policy/utils/AAFPolicyClientImpl.java +++ b/PolicyEngineUtils/src/main/java/org/onap/policy/utils/AAFPolicyClientImpl.java @@ -190,7 +190,11 @@ public class AAFPolicyClientImpl implements AAFPolicyClient{ if(aafCon!=null && aafLurPerm !=null){ try { aafCon.basicAuth(userName, pass); - AAFPermission perm = new AAFPermission(type, instance, action); + // + // The first parameter is the namespace. At this point we will default + // to null until we are given a namespace to use. + // + AAFPermission perm = new AAFPermission(null, type, instance, action); final Principal p = new UnAuthPrincipal(userName); result = aafLurPerm.fish(p, perm); } catch (CadiException e) { -- 2.16.6