Skip to content

Commit

Permalink
reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
mwangggg committed May 2, 2024
1 parent 53ad168 commit 57da16a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ docker.client.strategy=org.testcontainers.dockerclient.UnixSocketClientProviderS
testcontainers.reuse.enable=false
```

Generate a certificate and key for the server to enable HTTPS connections:

```bash
# run cert and key generation script
$ sh compose/auth_certs/generate.sh
```

Build the container image and run smoketests. This will spin up the cryostat container and its required services.

```bash
Expand Down
4 changes: 3 additions & 1 deletion compose/auth_certs/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

set -xe

openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out certificate.pem -keyout private.key
CERTS_DIR="$(dirname "$(readlink -f "$0")")"

openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out ${CERTS_DIR}/certificate.pem -keyout ${CERTS_DIR}/private.key
4 changes: 2 additions & 2 deletions smoketest.bash
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,11 @@ createProxyCertsVolume() {
"${container_engine}" volume create auth_proxy_certs
"${container_engine}" container create --name proxy_certs_helper -v auth_proxy_certs:/certs busybox
if [ -f "${DIR}/compose/auth_certs/certificate.pem" ] && [ -f "${DIR}/compose/auth_certs/private.key" ]; then
chmod 644 "${DIR}/compose/auth_certs/private.key"
chmod 640 "${DIR}/compose/auth_certs/private.key"
"${container_engine}" cp "${DIR}/compose/auth_certs/certificate.pem" proxy_certs_helper:/certs/certificate.pem
"${container_engine}" cp "${DIR}/compose/auth_certs/private.key" proxy_certs_helper:/certs/private.key
else
echo "Unable to find a certificate and key to allow oauth2_proxy to enable TLS connections"
echo "Did you run auth_certs/generate.sh?"
exit 2
fi
}
Expand Down

0 comments on commit 57da16a

Please sign in to comment.