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 <pdragosh@research.att.com>
diff --git a/PolicyEngineUtils/pom.xml b/PolicyEngineUtils/pom.xml
index f4bb5a0..052d637 100644
--- a/PolicyEngineUtils/pom.xml
+++ b/PolicyEngineUtils/pom.xml
@@ -99,7 +99,6 @@
<dependency>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>aaf-cadi-aaf</artifactId>
- <version>2.1.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
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 5c46c76..e65ac27 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 @@
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) {