Skip to content

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

@MacWeber

Description

@MacWeber

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds triageWaiting for discussion / prioritization by team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions