From ac836d0f27919da9525f5625aaef51a7b8b228ca Mon Sep 17 00:00:00 2001 From: Instrumental Date: Fri, 6 Apr 2018 05:27:41 -0500 Subject: [PATCH] Service required changed startup Issue-ID: AAF-211 Change-Id: Id4101ca0e59c5a2a3deaf703dc8fdd07183f3b4d Signed-off-by: Instrumental --- auth/auth-service/pom.xml | 2 +- auth/docker/drun.sh | 26 +++++++++------------- .../java/org/onap/aaf/cadi/taf/cert/X509Taf.java | 3 ++- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/auth/auth-service/pom.xml b/auth/auth-service/pom.xml index 16592856..3a99b973 100644 --- a/auth/auth-service/pom.xml +++ b/auth/auth-service/pom.xml @@ -120,7 +120,7 @@ org.onap.aaf.auth.service.AAF_Service service - cadi_prop_files=${project.conf_dir}/org.osaaf.service.props + cadi_prop_files=${project.ext_root_dir}/etc/org.osaaf.service.props cadi_log_dir=${project.ext_root_dir}/logs/service diff --git a/auth/docker/drun.sh b/auth/docker/drun.sh index 775c0c45..179a7da8 100644 --- a/auth/docker/drun.sh +++ b/auth/docker/drun.sh @@ -2,7 +2,7 @@ . d.props if [ "$1" == "" ]; then - AAF_COMPONENTS=`ls ../aaf_${VERSION}/bin | grep -v '\.'` + AAF_COMPONENTS=`ls -r ../aaf_${VERSION}/bin | grep -v '\.'` else AAF_COMPONENTS=$1 fi @@ -18,19 +18,15 @@ for AAF_COMPONENT in ${AAF_COMPONENTS}; do "fs") PORTMAP="80:8096";; esac -# if [ "`docker container ls | grep aaf_$AAF_COMPONENT:$VERSION`" == "" ]; then - echo Starting aaf_$AAF_COMPONENT... - docker run \ - -d \ - --name aaf_$AAF_COMPONENT \ - --hostname="$HOSTNAME" \ - --add-host="$CASS_HOST" \ - --publish $PORTMAP \ - --mount type=bind,source=$CONF_ROOT_DIR,target=/opt/app/osaaf \ - --link aaf_cass:cassandra \ - ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} -# else - #echo docker container start -ia aaf_$AAF_COMPONENT -# fi + echo Starting aaf_$AAF_COMPONENT... + docker run \ + -d \ + --name aaf_$AAF_COMPONENT \ + --hostname="$HOSTNAME" \ + --add-host="$CASS_HOST" \ + --publish $PORTMAP \ + --mount type=bind,source=$CONF_ROOT_DIR,target=/opt/app/osaaf \ + --link aaf_cass:cassandra \ + ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} done # --add-host="$HOSTNAME:$HOST_IP" \ diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/taf/cert/X509Taf.java b/cadi/core/src/main/java/org/onap/aaf/cadi/taf/cert/X509Taf.java index b5ed7ad1..4411a859 100644 --- a/cadi/core/src/main/java/org/onap/aaf/cadi/taf/cert/X509Taf.java +++ b/cadi/core/src/main/java/org/onap/aaf/cadi/taf/cert/X509Taf.java @@ -130,7 +130,8 @@ public class X509Taf implements HttpTaf { if(certarr!=null && certarr.length>0) { si.checkClientTrusted(certarr); // Note: If the Issuer is not in the TrustStore, it's not added to the Cert list - if(cadiIssuers.contains(certarr[0].getIssuerDN().toString())) { + String issuer = certarr[0].getIssuerDN().toString(); + if(cadiIssuers.contains(issuer)) { String subject = certarr[0].getSubjectDN().getName(); // avoiding extra object creation, since this is validated EVERY transaction with a Cert int at = subject.indexOf('@'); -- 2.16.6