Merge "run container as non root user" 3.0.1-ONAP
authorvarun gudisena <varuneshwar.gudisena@att.com>
Tue, 12 Feb 2019 20:18:27 +0000 (20:18 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 12 Feb 2019 20:18:27 +0000 (20:18 +0000)
INFO.yaml [new file with mode: 0644]
src/main/java/org/onap/dmaap/commonauth/kafka/base/authorization/Cadi3AAFProvider.java
src/main/java/org/onap/dmaap/kafkaAuthorize/KafkaCustomAuthorizer.java

diff --git a/INFO.yaml b/INFO.yaml
new file mode 100644 (file)
index 0000000..72451b4
--- /dev/null
+++ b/INFO.yaml
@@ -0,0 +1,42 @@
+---
+project: 'dmaap-kafka11aaf'
+project_creation_date: '2018-08-13'
+lifecycle_state: 'Incubation'
+project_lead: &onap_releng_ptl
+    name: 'Ram Koya'
+    email: 'rk541m@att.com'
+    id: 'rampi_k'
+    company: 'ATT'
+    timezone: 'America/Dallas'
+primary_contact: *onap_releng_ptl
+issue_tracking:
+    type: 'jira'
+    url: 'https://jira.onap.org/projects/DMAAP'
+    key: 'DMAAP'
+meetings:
+    - type: 'zoom'
+        agenda: ''
+        url: 'https://wiki.onap.org/pages/viewpage.action?pageId=13599275'
+        server: 'n/a'
+        channel: 'n/a'
+        repeats: 'weekly'
+        time: '13:00 UTC'
+committers:
+    - <<: *onap_releng_ptl
+    - name: 'Ramdas Sawant'
+        email: 'rs873m@att.com'
+        company: 'ATT'
+        id: 'rs873m'
+        timezone: 'America/Dallas'
+    - name: 'Varun Gudisena'
+        email: 'vg411h@att.com'
+        company: 'ATT'
+        id: 'vg411h'
+        timezone: 'America/Dallas'
+tsc:
+    approval: 'https://lists.onap.org/pipermail/onap-tsc'
+    changes:
+        - type: 'Removal'
+          name: 'Habib Madani'
+          name: 'Xinhui Li'
+          name: 'Jing Wang'
index 5ee43e8..9cc45fe 100644 (file)
@@ -54,8 +54,6 @@ public class Cadi3AAFProvider implements AuthorizationProvider {
        private static AAFAuthn<?> aafAuthn;
        private static AbsAAFLur<AAFPermission> aafLur;
 
-       private static boolean props_ok = false;
-
        private static final Logger logger = LoggerFactory.getLogger(Cadi3AAFProvider.class);
 
        public Cadi3AAFProvider() {
@@ -85,11 +83,6 @@ public class Cadi3AAFProvider implements AuthorizationProvider {
                                logger.error("Unable to load " + CADI_PROPERTIES);
                                logger.error("Error", e);
                        }
-
-                       props_ok = true;
-                       if (props_ok == false) {
-                               return;
-                       }
                }
 
                if (aafAuthn == null) {
@@ -101,7 +94,6 @@ public class Cadi3AAFProvider implements AuthorizationProvider {
                                aafAuthn = null;
                                if (access != null)
                                        access.log(e, "Failed to initialize AAF");
-                               props_ok = false;
                        }
                }
 
index cb33e29..acafbdf 100644 (file)
@@ -94,7 +94,7 @@ public class KafkaCustomAuthorizer implements Authorizer {
                                logger.info("^Event Received for topic " + topicName + " , User " + fullName + " , action = " + action);
                        }
 
-                       if (fullName.equals("admin")) {
+                       if (null != fullName && fullName.equals("admin")) {
                                return true;
                        }