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

Configurable pkiCert rendering interval #17306

Closed
fitz123 opened this issue Sep 23, 2022 · 2 comments
Closed

Configurable pkiCert rendering interval #17306

fitz123 opened this issue Sep 23, 2022 · 2 comments

Comments

@fitz123
Copy link

fitz123 commented Sep 23, 2022

Problem Description

We're using vault PKI engine to generate certificates. One of the requirements is to have dependant on certificates services running without access to vault for at least a week (time required for recovery in worst case infrastructure/servers/datacenter outage). This means we have to have at least 1 week before the expiration for any certificate in any given time. Currently vault-agent re-issues the certificate when 85% of the secrets time-to-live (TTL) is reached and this is not configurable. Therefore shortest possibly certificate's TTL we can have is "7days / 0.15". We are looking for a way to get shorten certificates.

Solution

It'd be great to have ability to configure when vault-agent have to re-issue the certificate. In described case if vault-agent re-issues certificates when 15% TTL is reached, then we can have 9-day-long (7days / 0.85) certificates instead of 47-day (7days / 0.15) which is much shorten certificates.
Option could be similar similar to static_secret_render_interval but for pkiCert templating function.

Considered alternatives

Using "secret" template function without a lease instead of pkiCert gives an ability to re-issue certificate on every token renew event which is 60 second in our case. We use short token renew period for security purpose. We also store certificates in the vault to be able to revoke them. Such scenario produces way too much certificates and affects storage backend performance.

@cipherboy
Copy link
Contributor

This needs to be filed against https://github.com/hashicorp/consul-template not Vault :-)

(cc @eikenb).

@fitz123
Copy link
Author

fitz123 commented Sep 26, 2022

hashicorp/consul-template#1646

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

No branches or pull requests

3 participants