Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Feature Request] Allow loading signing config from environment variable

Open
#1,376 0 comments 3 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
cli

Research direction

Start at the cfssl sign command and its existing env:CA and env:CA_KEY handling. Trace how -config is loaded, then determine how the requested env:CONFIG_JSON form can supply the signing configuration without writing a file. Done means signing accepts configuration from an environment variable while preserving the existing file-based form.

Written by the indexing model from the issue text.

Description

I'm using CFSSL inside a docker container to sign leaf certificates. The container is configured with a CA, and provides a web API which uses CFSSL to sign CSRs.

The signed certificates inherit the not before/after dates from the CA. Currently this requires that the container write a config JSON file to disk on startup which contains the CA's not before/after dates.

{
	"signing": {
		"default": {
			"not_before": "...",
			"expiry": "..."
		}
	}
}

Which is then used in CFSSL like so:

cfssl sign -ca env:CA -ca-key env:CA_KEY -config /path/to/config.json -hostname example.com -

To improve container security I'd ideally like to run it atop a readonly filesystem, but writing the config file to disk prevents this.

Would it be possible to allow CFSSL to read the config file from an environment variable, similar to what is allowed for the -ca parameter?

cfssl sign -ca env:CA -ca-key env:CA_KEY -config env:CONFIG_JSON -hostname example.com -

Or indeed any other method of setting the configuration values without writing to disk would work.

Thanks,
Nathan

Dominant language
Go
Stars
9.5k
Forks
1.2k
Avg merge
12h 48m
Merged PRs (30d)
2

Getting set up

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 cloudflare/cfssl

All issues in cloudflare/cfssl

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.