smallstep / certificates

🛡️ A private certificate authority (X.509 & SSH) & ACME server for secure automated certificate management, so you can use TLS everywhere & SSO for SSH.
https://smallstep.com/certificates
Apache License 2.0
6.35k stars 415 forks source link

[Bug]: step ca init ignores --password-file when using an existing root cert #1888

Open stew3254 opened 2 weeks ago

stew3254 commented 2 weeks ago

Steps to Reproduce

Generate a root certificate

cd ~
echo "test" > passwd
step ca init --deployment-type standalone --password-file passwd --dns ca.home --name Homelab --address :443 --provisioner JWK

Now, move it somewhere else and try to generate a new one using that existing root

cd ~
mv .step step
step ca init --deployment-type standalone --password-file passwd --dns ca.home --name Homelab --address :443 --provisioner JWK --root step/certs/root_ca.crt --key step/secrets/root_ca_key

Your Environment

Expected Behavior

I expected it to use my password file and automatically decrypt the key like it does when generating a new cert.

Actual Behavior

It doesn't appear to use my password file and automatically decrypt the key like it does when generating a new cert. This breaks my automation when using an existing cert because now it's looking for a user prompt.

Additional Context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).