certificates icon indicating copy to clipboard operation
certificates copied to clipboard

[Bug]: Cannot expand environment variable in `ca.json`

Open MacWeber opened this issue 2 years ago • 0 comments

Steps to Reproduce

  • Create a boilerplate CA
  • Modify the "crt" and/or "key" values using an environment variable, such as ${STEPPATH}
  • Start step-ca

Your Environment

  • OS - Linux/amd64
  • step-ca Version - 0.23.1

Expected Behavior

As the file ca.json has the variable ${STEPPATH} set in other places, then I'd expect it would work setting the path of the certificate and key.

This would help if the configuration needs to dynamically changes its path.

Actual Behavior

Starting step-ca outputs the following message:

error reading ${STEPPATH}/certs/intermediate_ca.crt: no such file or directory

Additional Context

In addition, if one tries to use a relative path the CA will try to read the file from the path user is running the command, not from the installation path.

Then, this issue makes the application less portable.

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).

MacWeber avatar Mar 11 '23 00:03 MacWeber