Refine properties for non-root

Issue-ID: AAF-698
Change-Id: I266f0e36842fb506dbb3e412e12eedf64e24418a
Signed-off-by: Instrumental <jonathan.gathman@att.com>
diff --git a/auth/auth-cass/cass_init/cmd.sh b/auth/auth-cass/cass_init/cmd.sh
index ffaf182..ba55648 100644
--- a/auth/auth-cass/cass_init/cmd.sh
+++ b/auth/auth-cass/cass_init/cmd.sh
@@ -33,6 +33,7 @@
 # Always need startup status...
 if [ ! -e "$DIR" ]; then
   mkdir -p "$DIR"
+  chmod 777 $DIR
 fi
 
 function status {
@@ -134,7 +135,7 @@
 
     # Startup like normal
     echo "Cassandra Startup"
-    /usr/local/bin/docker-entrypoint.sh 
+    exec /usr/local/bin/docker-entrypoint.sh 
   ;;
   wait)
     # Wait for initialization.  This can be called from Docker only as a check to make sure it is ready
@@ -148,7 +149,7 @@
 
     # Startup like normal
     echo "Cassandra Startup"
-    /usr/local/bin/docker-entrypoint.sh 
+    exec /usr/local/bin/docker-entrypoint.sh 
   ;;
 esac
 
diff --git a/auth/auth-cass/docker/Dockerfile.cass b/auth/auth-cass/docker/Dockerfile.cass
index e79b33f..aa6a9ef 100644
--- a/auth/auth-cass/docker/Dockerfile.cass
+++ b/auth/auth-cass/docker/Dockerfile.cass
@@ -30,6 +30,11 @@
 COPY aaf-auth-batch-${AAF_VERSION}-full.jar /opt/app/aaf/cass_init/
 COPY cass_data/*.dat /opt/app/aaf/cass_init/dats/
 
+RUN mkdir -p /opt/app/aaf/status && chmod 777 /opt/app/aaf/status
+#RUN addgroup ${USER} && adduser --no-create-home --ingroup ${USER} --disabled-password --gecos "" --shell /bin/bash ${USER}
+#RUN chown -R ${USER}:${USER} /opt/app/aaf/cass_init
+
+
 ENTRYPOINT ["/bin/bash","/opt/app/aaf/cass_init/cmd.sh"]
 CMD ["start"]
 # Default is to start up with CQL setup only
diff --git a/auth/auth-cass/docker/dbash.sh b/auth/auth-cass/docker/dbash.sh
deleted file mode 100644
index 1e13d27..0000000
--- a/auth/auth-cass/docker/dbash.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-#########
-#  ============LICENSE_START====================================================
-#  org.onap.aaf
-#  ===========================================================================
-#  Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
-#  ===========================================================================
-#  Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-#  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-#  ============LICENSE_END====================================================
-#
-# Pull in AAF Env Variables from AAF install
-if [ -e ../../docker/d.props ]; then
-  . ../../docker/d.props
-fi
-DOCKER=${DOCKER:-docker}
-
-$DOCKER exec -it aaf_cass bash
-
diff --git a/auth/auth-cass/docker/dbuild.sh b/auth/auth-cass/docker/dbuild.sh
index 100b8cb..c708dad 100644
--- a/auth/auth-cass/docker/dbuild.sh
+++ b/auth/auth-cass/docker/dbuild.sh
@@ -30,7 +30,9 @@
 
 DIR=$(pwd)
 cd ..
-sed -e 's/${AAF_VERSION}/'${VERSION}'/g' $DIR/Dockerfile.cass > Dockerfile
+sed -e 's/${AAF_VERSION}/'${VERSION}'/g' \
+    -e 's/${USER}/'${USER}'/g' \
+    $DIR/Dockerfile.cass > Dockerfile
 cd ..
 cp -Rf sample/cass_data auth-cass/cass_data
 cp sample/data/sample.identities.dat auth-cass
diff --git a/auth/auth-cass/docker/drun.sh b/auth/auth-cass/docker/drun.sh
index 778947e..cd8ab78 100644
--- a/auth/auth-cass/docker/drun.sh
+++ b/auth/auth-cass/docker/drun.sh
@@ -38,6 +38,7 @@
 if [ "`$DOCKER ps -a | grep aaf-cass`" == "" ]; then
   echo "starting Cass from 'run'"
   # NOTE: These HEAP Sizes are minimal. Not set for full organizations.
+  #  --user ${USER} \
   $DOCKER run \
     --name aaf-cass \
     -e HEAP_NEWSIZE=512M \