Remove override of parent aaf version 13/67313/2
authorPamela Dragosh <pdragosh@research.att.com>
Tue, 18 Sep 2018 13:55:30 +0000 (09:55 -0400)
committerPamela Dragosh <pdragosh@research.att.com>
Tue, 18 Sep 2018 15:20:27 +0000 (11:20 -0400)
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>
PolicyEngineUtils/pom.xml
PolicyEngineUtils/src/main/java/org/onap/policy/utils/AAFPolicyClientImpl.java

index f4bb5a0..052d637 100644 (file)
@@ -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>
index 5c46c76..e65ac27 100644 (file)
@@ -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) {