set auth perm for AAF Realm
[ccsdk/sli/core.git] / 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