Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Allow loading signing config from environment variable #1376

Open
ngarside opened this issue Apr 18, 2024 · 0 comments
Open

Comments

@ngarside
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant