diff options
author | varun gudisena <varuneshwar.gudisena@att.com> | 2018-10-24 18:27:28 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-10-24 18:27:28 +0000 |
commit | 693ebced47f4211b5b6b8874b41e60cedf9dba0e (patch) | |
tree | dd597caca058a44f3f8fbc366668827c61498236 /auth/sample/bin | |
parent | eb1a7439bbbd282fe2ff4f76a82a7f337323996e (diff) | |
parent | 284ad0ad02fc18f8603f777b8cc38ba1d73e4b83 (diff) |
Merge "Config Container starts"
Diffstat (limited to 'auth/sample/bin')
-rwxr-xr-x | auth/sample/bin/client.sh | 10 | ||||
-rw-r--r-- | auth/sample/bin/service.sh | 20 |
2 files changed, 27 insertions, 3 deletions
diff --git a/auth/sample/bin/client.sh b/auth/sample/bin/client.sh index 363e2b43..e9422880 100755 --- a/auth/sample/bin/client.sh +++ b/auth/sample/bin/client.sh @@ -66,6 +66,8 @@ if [ ! -e "$DOT_AAF/keyfile" ]; then base64 -d $CONFIG/cert/truststoreONAPall.jks.b64 > $DOT_AAF/truststoreONAPall.jks echo "cadi_truststore=$DOT_AAF/truststoreONAPall.jks" >> ${SSO} echo cadi_truststore_password=enc:$(sso_encrypt changeit) >> ${SSO} + echo "Caller Properties Initialized" + INITIALIZED="true" fi # Only initialize once, automatically... @@ -92,6 +94,8 @@ if [ ! -e $LOCAL/${NS}.props ]; then echo "#### Validate Configuration and Certificate with live call" $JAVA_AGENT_SELF validate + echo "Obtained Certificates" + INITIALIZED="true" else echo "#### Certificate Authorization Artifact must be valid to continue" fi @@ -101,7 +105,11 @@ fi # Now run a command CMD=$2 if [ -z "$CMD" ]; then - $JAVA_AGENT + if [ -n "$INITIALIZED" ]; then + echo "Initialization complete" + else + $JAVA_AGENT + fi else shift shift diff --git a/auth/sample/bin/service.sh b/auth/sample/bin/service.sh index 9880e8a6..7e443b53 100644 --- a/auth/sample/bin/service.sh +++ b/auth/sample/bin/service.sh @@ -35,6 +35,8 @@ FILE="$DATA/identities.dat" if [ ! -e $FILE ]; then mkdir -p $DATA cp $CONFIG/data/sample.identities.dat $FILE + echo "Set Identities" + INITIALIZED="true" fi # Load up Cert/X509 Artifacts @@ -45,6 +47,8 @@ if [ ! -e $FILE ]; then mkdir -p $PUBLIC if [ -e $CONFIG/cert/org.osaaf.aaf.signer.p12 ]; then cp $CONFIG/cert/org.osaaf.aaf.signer.p12 $FILE + echo "Installed Signer P12" + INITIALIZED="true" else echo "Decode" base64 -d $CONFIG/cert/demoONAPsigner.p12.b64 > $FILE @@ -54,6 +58,8 @@ if [ ! -e $FILE ]; then cp $CONFIG/cert/AAF_RootCA.cer $PUBLIC CM_TRUST_CAS="$PUBLIC/AAF_RootCA.cer" echo "cadi_keystore_password=something easy" >> $CONFIG/local/aaf.props + echo "Setup ONAP Test CAs and Signers" + INITIALIZED="true" fi fi @@ -62,6 +68,8 @@ FILE="$LOCAL/org.osaaf.aaf.p12" if [ ! -e $FILE ]; then if [ -e $CONFIG/cert/org.osaaf.aaf.p12 ]; then cp $CONFIG/cert/org.osaaf.aaf.p12 $FILE + echo "Installed AAF P12" + INITIALIZED="true" else echo "Bootstrap Creation of Keystore from Signer" cd $CONFIG/CA @@ -80,6 +88,8 @@ if [ ! -e $FILE ]; then CM_CA_PASS="something easy" CM_CA_LOCAL="org.onap.aaf.auth.cm.ca.LocalCA,$LOCAL/org.osaaf.aaf.signer.p12;aaf_intermediate_9;enc:" CM_TRUST_CAS="$PUBLIC/AAF_RootCA.cer" + echo "Generated ONAP Test AAF certs" + INITIALIZED="true" fi fi @@ -130,13 +140,19 @@ if [ ! -e $LOCAL/org.osaaf.aaf.props ]; then echo "cm_ca.local=$CM_CA_LOCAL" >> $FILE echo "cm_trust_cas=$CM_TRUST_CAS" >> $FILE fi + echo "Created AAF Initial Configurations" + INITIALIZED="true" fi # Now run a command CMD=$2 if [ -z "$CMD" ]; then - $JAVA_AGENT + if [ -n "$INITIALIZED" ]; then + echo "Initialization Complete" + else + echo "No Additional Initialization required" + fi else shift shift @@ -171,7 +187,7 @@ else $JAVA_AAFCLI perm list user aaf@aaf.osaaf.org ;; onap) - echo Initializing ONAP configurations. + #echo Initializing ONAP configurations. ;; bash) shift |