Versions in this module Expand all Collapse all v1 v1.0.0 Dec 28, 2024 Changes in this version + const DefaultCertSigner + const DefaultClusterID + const DefaultIsitoCaServiceAccountPath + const DefaultIstioCAEndpoint + const DefaultKubernetesServiceAccountPath + const DefaultRootCertPath + var CertTTL = f(os.Getenv("CERT_TTL"), "31536000") + var Domain = f(os.Getenv("DOMAIN"), "cluster.local") + var IstioCAEndpoint = f(os.Getenv("ISTIO_CA_ENDPOINT"), DefaultIstioCAEndpoint) + var PodNamespace = f(os.Getenv("POD_NAMESPACE"), "default") + var RootCertPath = f(os.Getenv("ROOT_CERT_PATH"), DefaultRootCertPath) + var ServiceAccountName = f(os.Getenv("SERVICE_ACCOUNT_NAME"), "default") + var ServiceAccountPath = f(os.Getenv("SERVICE_ACCOUNT_PATH"), DefaultIsitoCaServiceAccountPath) + var URIPrefix = f(os.Getenv("URI_PREFIX"), "spiffe://") + func NewSaTokenProvider(tokenPath string) (*saTokenProvider, error) + type AgentCertManager struct + func (c *AgentCertManager) GetCertificate() ([]tls.Certificate, error) + func (c *AgentCertManager) GetRootCertificate() (*x509.CertPool, error) + type CACertManager struct + Certs []tls.Certificate + NoAfter time.Time + RootNoAfter time.Time + Roots *x509.CertPool + func (c *CACertManager) GetCertificate() ([]tls.Certificate, error) + func (c *CACertManager) GetRootCertificate() (*x509.CertPool, error) + func (c *CACertManager) UpdateCert() error + func (c *CACertManager) UpdateRoot() error + type CertManager interface + GetCertificate func() ([]tls.Certificate, error) + GetRootCertificate func() (*x509.CertPool, error) + func NewCertManager() (CertManager, error)