istio.io/istio@v0.0.0-20240520182934-d79c90f27776/security/pkg/cmd/constants.go (about)

     1  // Copyright Istio Authors
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package cmd
    16  
    17  import "time"
    18  
    19  const (
    20  	// DefaultSelfSignedCACertTTL is the default TTL of self-signed CA root certificate.
    21  	DefaultSelfSignedCACertTTL = 3650 * 24 * time.Hour
    22  
    23  	// DefaultSelfSignedRootCertCheckInterval is the default interval a self-signed
    24  	// CA checks and rotates its root certificate.
    25  	DefaultSelfSignedRootCertCheckInterval = 1 * time.Hour
    26  
    27  	// DefaultRootCertGracePeriodPercentile is the default length of root certificate
    28  	// rotation grace period, configured as the ratio of the certificate TTL.
    29  	DefaultRootCertGracePeriodPercentile = 20
    30  
    31  	// ReadSigningCertRetryInterval specifies the time to wait between retries on reading the signing key and cert.
    32  	ReadSigningCertRetryInterval = time.Second * 5
    33  
    34  	// ReadSigningCertRetryMax specifies the total max time to wait between retries on reading the signing key and cert.
    35  	ReadSigningCertRetryMax = time.Second * 30
    36  
    37  	// DefaultMaxWorkloadCertTTL is the default max TTL of issued workload certificates.
    38  	DefaultMaxWorkloadCertTTL = 90 * 24 * time.Hour
    39  
    40  	// DefaultWorkloadCertTTL is the default TTL of issued workload certificates.
    41  	DefaultWorkloadCertTTL = 24 * time.Hour
    42  )