turbot / steampipe

Zero-ETL, infinite possibilities. Live query APIs, code & more with SQL. No DB required.
https://steampipe.io
GNU Affero General Public License v3.0
6.79k stars 263 forks source link

feat: handle ssl password #4152

Closed burahimu closed 5 months ago

burahimu commented 5 months ago

We figured out that steampipe does not handle private key protected with a passphrase. This should fix that by adding sslpassword and ssl_passphrase_command options (and ssl_passphrase_command_supports_reload)

Note

The server.key content must contains Proc-Type and DEK-Info headers.

It is possible by adding -traditional to openssl command:

openssl genrsa -aes256 -out $STEAMPIPE_INSTALL_DIR/db/14.2.0/data/server.key -passout pass:steampipe -traditional 2048
CLAassistant commented 5 months ago

CLA assistant check
All committers have signed the CLA.

e-gineer commented 5 months ago

This is a good feature and PR. Some questions:

burahimu commented 5 months ago

Should this focus have CLI arguments etc? It's consistent, but perhaps simpler to start with just the env var for this (edge) case.

Yes it can be set only in env var as a first step. Would you like this behavior?

If the password env var is set, would that affect our automatic certificate creation? How do we make that behavior clear?

For instance, I believe steampipe will override the server.key file with no passphrase. The certificate renew will be specific to the authority managing the certificates, unless you want steampipe to manage the case?

kaidaguerre commented 5 months ago

@burahimu

Yes it can be set only in env var as a first step. Would you like this behavior?

Yes, I think for the initial implementation, just an env var would be good

burahimu commented 5 months ago

Done ✅

kaidaguerre commented 5 months ago

thanks!