From 0829f37fe83adfdc36f0f8b7e205846c65eaef3d Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Wed, 14 Sep 2022 11:43:58 -0700 Subject: [PATCH] Define a default crl cache duration --- authority/config/config.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/authority/config/config.go b/authority/config/config.go index 721c691c..86e950cb 100644 --- a/authority/config/config.go +++ b/authority/config/config.go @@ -35,6 +35,8 @@ var ( // DefaultEnableSSHCA enable SSH CA features per provisioner or globally // for all provisioners. DefaultEnableSSHCA = false + // DefaultCRLCacheDuration is the default cache duration for the CRL. + DefaultCRLCacheDuration = &provisioner.Duration{Duration: 24 * time.Hour} // GlobalProvisionerClaims default claims for the Authority. Can be overridden // by provisioner specific claims. GlobalProvisionerClaims = provisioner.Claims{ @@ -190,6 +192,9 @@ func (c *Config) Init() { if c.CommonName == "" { c.CommonName = "Step Online CA" } + if c.CRL != nil && c.CRL.Generate && c.CRL.CacheDuration == nil { + c.CRL.CacheDuration = DefaultCRLCacheDuration + } c.AuthorityConfig.init() }