TLS private key has to be world-readable on the host #229
Unanswered
igor-alexandrov
asked this question in
Ideas and Issue Triage
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
kamal-proxy runs as
kamal-proxy(uid 1001), but Kamal writes the TLS files to the host as the SSH user, which is root by default. The apps-config directory is bind-mounted in, so the only mode that lets the proxy read the key is 0644, which is what Kamal uses: https://github.com/basecamp/kamal/blob/main/lib/kamal/cli/app/ssl_certificates.rb#L19.That leaves the private key readable by every local user on the host and by any other container that mounts the same directory.
Tightening it on the Kamal side doesn't work:
So the fix likely belongs here. Two options that would work:
Happy to send a PR if you have a preference.
All reactions