Skip to content

Commit

Permalink
Add ENFORCE_HTTPS environment variable (#321)
Browse files Browse the repository at this point in the history
* Add E2E config to set `enforce_https` to false

* Set `IS_E2E_TEST` environment variable

* Replace `IS_E2E_TEST` with `ENFORCE_HTTPS` environment variable

* Update pom version to reflect the latest shared version
  • Loading branch information
cYKatherine authored Jan 4, 2024
1 parent 98e8e48 commit 4ab0fef
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<enclave-aws.version>1.1.0</enclave-aws.version>
<enclave-azure.version>1.5.0-115595d597</enclave-azure.version>
<enclave-gcp.version>1.4.2-dd1920710d</enclave-gcp.version>
<uid2-shared.version>6.0.0-c7abb59c26</uid2-shared.version>
<uid2-shared.version>6.0.10-208e0b52b2</uid2-shared.version>
<image.version>${project.version}</image.version>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion scripts/gcp-oidc/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM eclipse-temurin@sha256:de8e6219ff5360811a453a9237713679a9d9106ba5150290ef37fb23e246ce7d

LABEL "tee.launch_policy.allow_env_override"="API_TOKEN_SECRET_NAME,DEPLOYMENT_ENVIRONMENT,CORE_BASE_URL,OPTOUT_BASE_URL"
LABEL "tee.launch_policy.allow_env_override"="API_TOKEN_SECRET_NAME,DEPLOYMENT_ENVIRONMENT,CORE_BASE_URL,OPTOUT_BASE_URL,ENFORCE_HTTPS"

# Install Packages
RUN apk update && apk add jq
Expand Down
5 changes: 5 additions & 0 deletions scripts/gcp-oidc/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ if [ -n "${CORE_BASE_URL}" -a -n "${OPTOUT_BASE_URL}" -a "${DEPLOYMENT_ENVIRONME
sed -i "s#https://optout-integ.uidapi.com#${OPTOUT_BASE_URL}#g" ${FINAL_CONFIG}
fi

# -- replace `enforce_https` value to ENFORCE_HTTPS if provided
if [ -n "${ENFORCE_HTTPS}" ]; then
sed -i "s#"enforce_https": true#"enforce_https": ${ENFORCE_HTTPS}#g" ${FINAL_CONFIG}
fi

# -- start operator
echo "-- starting java application"
java \
Expand Down

0 comments on commit 4ab0fef

Please sign in to comment.