Address comments from code review

pull/1484/head
Mariano Cano 10 months ago
parent c7c7decd5e
commit cce7d9e839
No known key found for this signature in database

@ -35,8 +35,8 @@ var (
// DefaultEnableSSHCA enable SSH CA features per provisioner or globally // DefaultEnableSSHCA enable SSH CA features per provisioner or globally
// for all provisioners. // for all provisioners.
DefaultEnableSSHCA = false DefaultEnableSSHCA = false
// DefaultDisableSmallstepExtensions disables the Smallstep extensions in // DefaultDisableSmallstepExtensions is the default value for the
// the certificate. // DisableSmallstepExtensions provisioner claim.
DefaultDisableSmallstepExtensions = false DefaultDisableSmallstepExtensions = false
// DefaultCRLCacheDuration is the default cache duration for the CRL. // DefaultCRLCacheDuration is the default cache duration for the CRL.
DefaultCRLCacheDuration = &provisioner.Duration{Duration: 24 * time.Hour} DefaultCRLCacheDuration = &provisioner.Duration{Duration: 24 * time.Hour}

@ -115,8 +115,8 @@ func (c *Claimer) IsDisableRenewal() bool {
return *c.claims.DisableRenewal return *c.claims.DisableRenewal
} }
// IsDisableSmallstepExtensions returns if the Smallstep extensions, like the // IsDisableSmallstepExtensions returns whether Smallstep extensions, such as
// provisioner extension, should be excluded from the certificate. // the provisioner extension, should be excluded from the certificate.
func (c *Claimer) IsDisableSmallstepExtensions() bool { func (c *Claimer) IsDisableSmallstepExtensions() bool {
if c.claims == nil || c.claims.DisableSmallstepExtensions == nil { if c.claims == nil || c.claims.DisableSmallstepExtensions == nil {
return *c.global.DisableSmallstepExtensions return *c.global.DisableSmallstepExtensions

@ -444,8 +444,9 @@ func newProvisionerExtensionOption(typ Type, name, credentialID string, keyValue
} }
} }
// WithControllerOptions returns the provisionerExtensionOption options from the // WithControllerOptions updates the provisionerExtensionOption with options
// controller. Currently only the claim DisableSmallstepExtensions is used. // from the controller. Currently only the DisableSmallstepExtensions
// provisioner claim is used.
func (o *provisionerExtensionOption) WithControllerOptions(c *Controller) *provisionerExtensionOption { func (o *provisionerExtensionOption) WithControllerOptions(c *Controller) *provisionerExtensionOption {
o.Disabled = c.Claimer.IsDisableSmallstepExtensions() o.Disabled = c.Claimer.IsDisableSmallstepExtensions()
return o return o

Loading…
Cancel
Save