Skip to content

refactor: Externalize secrets and bind ports to localhost in Docker setup - #3081

Open
programmiri wants to merge 3 commits into
mainfrom
docker-secure-config-setup
Open

programmiri wants to merge 3 commits into
mainfrom
docker-secure-config-setup

Conversation

@programmiri

@programmiri programmiri commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Description

Update to docker files (and proxy) to (hopefully :D) make setup more comfortable:

1. No more secrets in git

The shared KLAW_CLUSTERAPI_ACCESS_BASE64_SECRET and the default superadmin password (WelcomeToKlaw321@) were hardcoded in docker-compose-klaw.yaml. They now come from a git-ignored docker-scripts/.env, created with ./klaw-docker.sh --init

2. secrete.properties file

Cluster credentials (SASL, truststore passwords, Aiven token etc) moved to a git-ignored docker-scripts/klaw-secrets.properties, mounted as a Docker secret and loaded via SPRING_CONFIG_IMPORT.

  • Ports bound to localhost. klaw-core:9097 and klaw-cluster-api:9343 are now published as 127.0.0.1:PORT:PORT, so they are not reachable from the network.
  • Truststores stay outside the repo. Keystore/truststore files are expected in ~/.klaw/truststore (also configurable via KLAW_TRUSTSTORE_DIR) and mounted read-only at /truststore in the container.
  • Safer script defaults. --deploy and the new --restart fail fast if the config files are missing instead of starting with default secrets, the well-known E2E password is now only injected for --dev-ui-tests.

Docs update, proxy update

docs are updated, corals proxy is also updated and adds better usage

@programmiri programmiri self-assigned this Nov 20, 2026
@programmiri
programmiri force-pushed the docker-secure-config-setup branch from 6fe0afc to 3c3fd63 Compare November 21, 2026 10:10
@aindriu-aiven

Copy link
Copy Markdown
Contributor

@programmiri can you update the branch :D

@programmiri

Copy link
Copy Markdown
Contributor Author

Updated!

Comment thread docker-scripts/docker-compose-klaw.yaml Resolved
#myprefix.kafkassl.keystore.type=pkcs12
#myprefix.kafkassl.truststore.location=/truststore/client.truststore.jks
#myprefix.kafkassl.truststore.pwd=<truststore-password>
#myprefix.kafkassl.truststore.type=JKS

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#myprefix.kafkassl.truststore.type=JKS
#myprefix.kafkassl.truststore.type=JKS
#myprefix.kafkassl.truststore.location=/truststore/ca.pem
#myprefix.kafkassl.keystore.type=PEM
#myprefix.kafkassl.truststore.type=PEM
#myprefix.kafkassl.keystore.location=/truststore/svc.pem

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, but 🙏 please check again, I did it a bit different because otherwise we would have had truststore.type duplicated & I don't think we should?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit -> 5cada8e

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will take a look ty

Comment thread docker-scripts/docker-compose-klaw.yaml Resolved
Comment thread docker-scripts/README.md Resolved

@aindriu-aiven aindriu-aiven left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good, had some minor bits and pieces to ask

…etup

Signed-off-by: Mirjam Aulbach <me@programmiri.rocks>
@programmiri
programmiri force-pushed the docker-secure-config-setup branch from 83772fd to 6a74939 Compare November 28, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants