opentdf / platform

OpenTDF Platform monorepo enabling the development and integration of _forever control_ of data into new and existing applications. The concept of forever control stems from an increasingly common concept known as zero trust.
BSD 3-Clause Clear License
18 stars 8 forks source link

Keys Init Script Fails #778

Closed namanrawal47 closed 2 months ago

namanrawal47 commented 5 months ago

.github/scripts/init-temp-keys.sh fails on final command docker run ... with error:

docker run -v $(pwd)/keys/:/keys openjdk:latest keytool -importkeystore -srckeystore /keys/ca.p12 \
-srcstoretype PKCS12 \
-destkeystore /keys/ca.jks \
-deststoretype JKS \
-srcstorepass "password" \
-deststorepass "password" \
-noprompt
docker: invalid reference format: repository name must be lowercase.
See 'docker run --help'.

Wrapping the volume mount in double-quotes (like so: "$(pwd)/keys/:/keys)") get us further:

Importing keystore /keys/ca.p12 to /keys/ca.jks...
Entry for alias 1 successfully imported.
Import command completed:  1 entries successfully imported, 0 entries failed or cancelled
keytool error: java.io.FileNotFoundException: /keys/ca.jks (Is a directory)

Upon investigation, it seems that ca.jks was created as an empty directory rather than a JKS. Upon removing it and re-running docker run ... the keystore is correctly created. Afterwards, docker-compose up runs successfully.

OS: macOS Sonoma Version 14.4.1 Docker version 24.0.2-rd, build e63f5fa Docker Compose version v2.19.0 Rancher Desktop Version 1.9.1

namanrawal47 commented 4 months ago

I don't understand how some of these issues are not being caught in CI and integration testing...are quality gates in place for breaking changes? I'm seeing the same issues for localhost.key and localhost.crt.

jrschumacher commented 4 months ago

@namanrawal47 this version of the platform is at v0.4.2 as of today and SDK is v0.2.1. We have integration tests for policy and unit tests for our SDK. We are working on further integration and e2e tests. I'd advise looking at our feature matrix to see the state of the platform: https://opentdf.github.io/docs/matrix

Since we're still in an Alpha / early-Beta stage, we don't have all the test infrastructure in place. If you'd like to commit a change or contribute some tests, please feel free to do so!

jrschumacher commented 4 months ago

@namanrawal47 since we've figured out the issue in #822 could you check the resolution and see if that applies for this issue?

namanrawal47 commented 4 months ago

It applies. Just have to also make sure $(pwd)/keys/:/keys is also wrapped in double-quotes like so "$(pwd)/keys/:/keys".