From 0494603a4624d391af8b5a3918555ea7e47ffa10 Mon Sep 17 00:00:00 2001 From: dglFromAtt Date: Tue, 23 Apr 2019 23:54:01 +0000 Subject: Workaround for deployment problem Change-Id: I7fa045a5a61e30012c5cfc057ad5d8742807d5d4 Signed-off-by: dglFromAtt Issue-ID: DMAAP-1177 --- dbc-client/misc/dbc-client | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'dbc-client/misc') diff --git a/dbc-client/misc/dbc-client b/dbc-client/misc/dbc-client index c29ec86..1e079bf 100644 --- a/dbc-client/misc/dbc-client +++ b/dbc-client/misc/dbc-client @@ -40,6 +40,9 @@ CAPEM=${CAPEM:-ca.pem} CLIENTPEM=${CLIENTPEM:-client.pem} KEYPEM=${KEYPEM:-key.pem} CERTPWD=${CERTPWD:-'2U[iOZzMHI:.#tdCwlBqc;}S'} +AUTH_METHOD=${AUTH_METHOD:-basicAuth} +BA_IDENTITY=${BA_IDENTITY:-dmaap-bc@dmaap-bc.onap.org} +BA_PWD=${BA_PWD:-'demo123456!'} @@ -55,7 +58,12 @@ config() { cd $PEMDIR pwd ls -l - if [ -f $CAPEM -a -f $CLIENTPEM -a -f $KEYPEM ] + echo "AUTH_METHOD=$AUTH_METHOD" + if [ "$AUTH_METHOD" = "basicAuth" ] + then + echo "-u ${BA_IDENTITY}:${BA_PWD}" > $PEMDIR/curl.cred + CURLCRED="-K $PEMDIR/curl.cred" + elif [ -f $CAPEM -a -f $CLIENTPEM -a -f $KEYPEM ] then echo "--key $PEMDIR/$KEYPEM --cacert $PEMDIR/$CAPEM --cert $PEMDIR/${CLIENTPEM}:${CERTPWD}" > $PEMDIR/curl.cred CURLCRED="-K $PEMDIR/curl.cred" -- cgit 1.2.3-korg