From 4c89ceb95e585eea291f97443fd4beec08649485 Mon Sep 17 00:00:00 2001 From: Rafael Jardim Date: Thu, 6 May 2021 17:03:44 -0300 Subject: [PATCH] Add OS_CACERT on the client_wrapper This change is required to avoid the user pass a flag in each request if this environment variable is available inside the container the clients will get that to make https requests in the remote cli Depends-On:I4221657b97592b319b3fbf54b5b8c6d325ec9aa3 Signed-off-by: Rafael Jardim Change-Id: Iddc982c4394e06c3cc14da4b33145f45b1b2f412 --- remote_cli/client_wrapper.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/remote_cli/client_wrapper.sh b/remote_cli/client_wrapper.sh index 08d0efa..0ed1cb7 100755 --- a/remote_cli/client_wrapper.sh +++ b/remote_cli/client_wrapper.sh @@ -37,7 +37,7 @@ read -d '' EXPORTS << EOF OS_PASSWORD OS_PROJECT_DOMAIN_ID OS_PROJECT_ID OS_REGION_NAME OS_USER_DOMAIN_NAME OS_PROJECT_NAME OS_IDENTITY_API_SERVICE OS_AUTH_URL OS_USERNAME OS_INTERFACE OS_PROJECT_DOMAIN_NAME -OS_AUTH_TYPE +OS_AUTH_TYPE OS_CACERT EOF # We initialize the environment variable list with the OS_ENDPOINT_TYPE set @@ -50,6 +50,11 @@ EOF # to the correct value. COMMAND_ENV="-e OS_ENDPOINT_TYPE=publicURL" +# the REQUESTS_CA_BUNDLE is required to the fm client +if [[ ! -z "$(printenv "OS_CACERT")" ]]; then + COMMAND_ENV="$COMMAND_ENV -e REQUESTS_CA_BUNDLE=$(printenv "OS_CACERT")" +fi + for exp in $EXPORTS; do # If variable is not defined, don't pass it over to the container if [[ ! -z "$(printenv $exp)" ]]; then