set auth perm for AAF Realm 86/105686/1
authorAgarwal, Ruchira (ra1926) <ra1926@att.com>
Thu, 9 Apr 2020 15:05:09 +0000 (15:05 +0000)
committerAgarwal, Ruchira (ra1926) <ra1926@att.com>
Thu, 9 Apr 2020 15:05:09 +0000 (15:05 +0000)
set spring SLI container shiro filter perms for authorization

Issue-ID: CCSDK-2304
Signed-off-by: Agarwal, Ruchira (ra1926) <ra1926@att.com>
Change-Id: Ib99223ba1921f656a0e64f62745271bc6aa0bdf7

sliapi/springboot/src/main/java/org/onap/ccsdk/sli/core/sliapi/springboot/App.java

index 2892430..f4e78be 100644 (file)
@@ -20,6 +20,8 @@
 \r
 package org.onap.ccsdk.sli.core.sliapi.springboot;\r
 \r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
 import org.springframework.boot.SpringApplication;\r
 import org.springframework.boot.autoconfigure.SpringBootApplication;\r
 import org.springframework.context.annotation.ComponentScan;\r
@@ -38,6 +40,8 @@ import org.onap.aaf.cadi.shiro.AAFRealm;
 \r
 public class App {\r
 \r
+  private static final Logger log = LoggerFactory.getLogger(App.class);\r
+\r
   public static void main(String[] args) throws Exception {\r
     SpringApplication.run(App.class, args);\r
   }\r
@@ -48,6 +52,7 @@ public class App {
     // If cadi prop files is not defined use local properties realm\r
     // src/main/resources/shiro-users.properties\r
     if ("none".equals(System.getProperty("cadi_prop_files", "none"))) {\r
+      log.info("cadi_prop_files undefined, AAF Realm will not be set");\r
       PropertiesRealm realm = new PropertiesRealm();\r
       return realm;\r
     } else {\r
@@ -65,7 +70,8 @@ public class App {
     if ("none".equals(System.getProperty("cadi_prop_files", "none"))) {\r
       chainDefinition.addPathDefinition("/**", "anon");\r
     } else {\r
-      chainDefinition.addPathDefinition("/**", "authcBasic, rest[org.onap.sdnc:odl-api]");\r
+      log.info("Loaded property cadi_prop_files, AAF REALM set");\r
+      chainDefinition.addPathDefinition("/**", "authcBasic, rest[org.onap.sdnc.odl:odl-api]");\r
     }\r
 \r
     return chainDefinition;\r