Feature Request: Config file secrets via file paths

Open
#2,548 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
security

Research direction

Start by tracing how ca.json is loaded and how fields such as roots and clientSecret are handled. The issue proposes file-path alternatives such as roots_file and clientSecret_file, but leaves the exact scope and design open. Done means supported secret values can be supplied from injected files rather than stored directly in ca.json.

Written by the indexing model from the issue text.

Description

enhancement needs triage

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

In ca.json some secrets are referenced via file paths, in particular certificate files

{
  "root": "examples/pki/secrets/root_ca.crt",
  "federatedRoots": ["examples/pki/secrets/federated_root_ca.crt"],
  "crt": "examples/pki/secrets/intermediate_ca.crt",
  "key": "examples/pki/secrets/intermediate_ca_key",
  "address": ":9000",

However other secrets are not:

        "type": "OIDC",
        "name": "Google",
        "clientID": "1087160488420-8qt7bavg3qesdhs6it824mhnfgcfe8il.apps.googleusercontent.com",
        "clientSecret": "udTrOT3gzrO7W9fDPgZQLfYJ",
        "configurationEndpoint": "https://accounts.google.com/.well-known/openid-configuration",

or

{
    "type": "X5C",
    "name": "x5c",
    "roots": "LS0tLS1 ... Q0FURS0tLS0tCg==",

The ideal option, would be to have the ability to reference a file path as an alternative to the raw value by an alternative, roots/ roots_file, clientSecret/clientSecret_file and so on. These files could be injected into the container by various tooling, keeping the secrets outside of ca.json.

Why is this needed?

When deploying step-ca via IaC tools, this needs to be worked around, because the ca.json cannot be simply stored as-is. This leads to various workarounds, such as storing the entire configuration as a secret, bootstrapping the container by templates, none of which are ideal.

Dominant language
Go
Stars
8.9k
Forks
599
Avg merge
21h 20m
Merged PRs (30d)
15

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from smallstep/certificates

All issues in smallstep/certificates

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.