Documentation
¶
Index ¶
- Constants
- func Region(cl string) string
- type CertificateAuthorityConfig
- type CertificateAuthorityServiceConfig
- type CitadelClient
- type ECDSA
- type GoogleCAClient
- type GoogleCASClient
- type KeyAlgorithm
- type MeshCAConfig
- type Options
- type RSA
- type TrustAnchor
- type TrustConfigSpec
- type TrustStore
- type WorkloadCertificateConfig
- type WorkloadCertificateConfigSpec
Constants ¶
View Source
const (
// CertSigner info
CertSigner = "CertSigner"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CertificateAuthorityConfig ¶
type CertificateAuthorityConfig struct { MeshCAConfig *MeshCAConfig `json:"meshCAConfig,omitempty"` CertificateAuthorityServiceConfig *CertificateAuthorityServiceConfig `json:"certificateAuthorityServiceConfig,omitempty"` }
type CertificateAuthorityServiceConfig ¶
type CertificateAuthorityServiceConfig struct { // Format: //privateca.googleapis.com/projects/PROJECT_ID/locations/SUBORDINATE_CA_LOCATION/caPools/SUBORDINATE_CA_POOL_NAME EndpointURI string `json:"endpointURI"` }
type CitadelClient ¶
type CitadelClient struct {
// contains filtered or unexported fields
}
func NewCitadelClient ¶
func NewCitadelClient(opts *Options) (*CitadelClient, error)
NewCitadelClient create a CA client for Citadel.
func (*CitadelClient) CSRSign ¶
func (c *CitadelClient) CSRSign(csrPEM []byte, certValidTTLInSec int64) ([]string, error)
CSR Sign calls Citadel to sign a CSR.
func (*CitadelClient) Close ¶
func (c *CitadelClient) Close()
type GoogleCAClient ¶
type GoogleCAClient struct { Location string // contains filtered or unexported fields }
func NewGoogleCAClient ¶
func NewGoogleCAClient(endpoint string, creds credentials.PerRPCCredentials) (*GoogleCAClient, error)
NewGoogleCAClient create a CA client for Google CA.
func (*GoogleCAClient) CSRSign ¶
func (cl *GoogleCAClient) CSRSign(csrPEM []byte, certValidTTLInSec int64) ([]string, error)
CSR Sign calls Google CA to sign a CSR.
func (*GoogleCAClient) Close ¶
func (cl *GoogleCAClient) Close()
type GoogleCASClient ¶
type GoogleCASClient struct {
// contains filtered or unexported fields
}
func NewGoogleCASClientRaw ¶
func NewGoogleCASClientRaw(capool string, creds credentials.PerRPCCredentials) (*GoogleCASClient, error)
func (*GoogleCASClient) CSRSign ¶
func (r *GoogleCASClient) CSRSign(csrPEM []byte, certValidTTLInSec int64) ([]string, error)
CSR Sign calls Google CAS to sign a CSR.
func (*GoogleCASClient) Close ¶
func (r *GoogleCASClient) Close()
func (*GoogleCASClient) GetRootCertBundle ¶
func (r *GoogleCASClient) GetRootCertBundle() ([]string, error)
GetRootCertBundle: Get CA certs of the pool from Google CAS API endpoint
type KeyAlgorithm ¶
type MeshCAConfig ¶
type MeshCAConfig struct { }
type Options ¶
type Options struct { CAEndpoint string CAEndpointSAN string TokenProvider credentials.PerRPCCredentials GRPCOptions []grpc.DialOption CertSigner string ClusterID string CARootPEM []byte TrustedRoots *x509.CertPool // ProvCert contains a long-lived 'provider' certificate that will be // exchanged with the workload certificate. // It is a cert signed by same CA (or a CA trusted by Istiod). // It is still exchanged because Istiod may add info to the cert. ProvCert string }
type TrustAnchor ¶
type TrustAnchor struct { SPIFFETrustBundleEndpoint string `json:"spiffeTrustBundleEndpoint,omitempty"` // Format: //privateca.googleapis.com/projects/PROJECT_ID/locations/ROOT_CA_POOL_LOCATION/caPools/ROOT_CA_POOL_NAME CertificateAuthorityServiceURI string `json:"certificateAuthorityServiceURI,omitempty"` PEMCertificate string `json:"pemCertificate,omitempty"` }
type TrustConfigSpec ¶
type TrustConfigSpec struct {
TrustStores []TrustStore `json:"trustStores"`
}
TrustConfig is the GKE config - when used outside GKE this is passed in the mesh-env
type TrustStore ¶
type TrustStore struct { TrustDomain string `json:"trustDomain"` TrustAnchors []TrustAnchor `json:"trustAnchors,omitempty"` }
type WorkloadCertificateConfig ¶
type WorkloadCertificateConfig struct { ApiVersion string `json:"apiVersion"` Kind string `json:"kind"` Spec WorkloadCertificateConfigSpec `json:"spec"` }
type WorkloadCertificateConfigSpec ¶
type WorkloadCertificateConfigSpec struct { CertificateAuthorityConfig CertificateAuthorityConfig `json:"certificateAuthorityConfig"` ValidityDurationSeconds int64 `json:"validityDurationSeconds,omitempty"` RotationWindowPercentage int64 `json:"rotationWindowPercentage,omitempty"` KeyAlgorithm *KeyAlgorithm `json:"keyAlgorithm,omitempty"` }
Click to show internal directories.
Click to hide internal directories.