Documentation ¶
Index ¶
- Constants
- type AwsClientImpl
- type Client
- type GcpClientImpl
- type OnPremClientImpl
- func (ci *OnPremClientImpl) GetAgentCredential() ([]byte, error)
- func (ci *OnPremClientImpl) GetCredentialType() string
- func (ci *OnPremClientImpl) GetDialOptions() ([]grpc.DialOption, error)
- func (ci *OnPremClientImpl) GetServiceIdentity() (string, error)
- func (ci *OnPremClientImpl) IsProperPlatform() bool
Constants ¶
const ( // AWSCertificatePem is the official public RSA certificate for AWS AWSCertificatePem = `` /* 1146-byte string literal not displayed */ )
const CitadelDNSSan = "istio-citadel"
CitadelDNSSan is the hardcoded DNS SAN used to identify citadel server. The user may use an IP address to connect to the mesh.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AwsClientImpl ¶
type AwsClientImpl struct {
// contains filtered or unexported fields
}
AwsClientImpl is the implementation of AWS metadata client.
func NewAwsClientImpl ¶
func NewAwsClientImpl(rootCert string) *AwsClientImpl
NewAwsClientImpl creates a new AwsClientImpl.
func (*AwsClientImpl) GetAgentCredential ¶
func (ci *AwsClientImpl) GetAgentCredential() ([]byte, error)
GetAgentCredential retrieves the instance identity document as the agent credential used by node agent
func (*AwsClientImpl) GetCredentialType ¶
func (ci *AwsClientImpl) GetCredentialType() string
GetCredentialType returns the credential type as "aws".
func (*AwsClientImpl) GetDialOptions ¶
func (ci *AwsClientImpl) GetDialOptions() ([]grpc.DialOption, error)
GetDialOptions returns the GRPC dial options to connect to the CA.
func (*AwsClientImpl) GetServiceIdentity ¶
func (ci *AwsClientImpl) GetServiceIdentity() (string, error)
GetServiceIdentity extracts service identity from userdata. This function should be pluggable for different AWS deployments in the future.
func (*AwsClientImpl) IsProperPlatform ¶
func (ci *AwsClientImpl) IsProperPlatform() bool
IsProperPlatform returns whether the AWS platform client is available.
type Client ¶
type Client interface { GetDialOptions() ([]grpc.DialOption, error) // Whether the node agent is running on the right platform, e.g., if gcpPlatformImpl should only // run on GCE. IsProperPlatform() bool // Get the service identity. GetServiceIdentity() (string, error) // Get node agent credential GetAgentCredential() ([]byte, error) // Get type of the credential GetCredentialType() string }
Client is the interface for implementing the client to access platform metadata.
type GcpClientImpl ¶
type GcpClientImpl struct {
// contains filtered or unexported fields
}
GcpClientImpl is the implementation of GCP metadata client.
func (*GcpClientImpl) GetAgentCredential ¶
func (ci *GcpClientImpl) GetAgentCredential() ([]byte, error)
GetAgentCredential returns the GCP JWT for the serivce account.
func (*GcpClientImpl) GetCredentialType ¶
func (ci *GcpClientImpl) GetCredentialType() string
GetCredentialType returns the credential type as "gcp".
func (*GcpClientImpl) GetDialOptions ¶
func (ci *GcpClientImpl) GetDialOptions() ([]grpc.DialOption, error)
GetDialOptions returns the GRPC dial options to connect to the CA.
func (*GcpClientImpl) GetServiceIdentity ¶
func (ci *GcpClientImpl) GetServiceIdentity() (string, error)
GetServiceIdentity gets the identity of the GCE service.
func (*GcpClientImpl) IsProperPlatform ¶
func (ci *GcpClientImpl) IsProperPlatform() bool
IsProperPlatform returns whether the client is on GCE.
type OnPremClientImpl ¶
type OnPremClientImpl struct {
// contains filtered or unexported fields
}
OnPremClientImpl is the implementation of on premise metadata client.
func NewOnPremClientImpl ¶
func NewOnPremClientImpl(rootCert, key, certChain string) (*OnPremClientImpl, error)
NewOnPremClientImpl creates a new OnPremClientImpl.
func (*OnPremClientImpl) GetAgentCredential ¶
func (ci *OnPremClientImpl) GetAgentCredential() ([]byte, error)
GetAgentCredential passes the certificate to control plane to authenticate
func (*OnPremClientImpl) GetCredentialType ¶
func (ci *OnPremClientImpl) GetCredentialType() string
GetCredentialType returns "onprem".
func (*OnPremClientImpl) GetDialOptions ¶
func (ci *OnPremClientImpl) GetDialOptions() ([]grpc.DialOption, error)
GetDialOptions returns the GRPC dial options to connect to the CA.
func (*OnPremClientImpl) GetServiceIdentity ¶
func (ci *OnPremClientImpl) GetServiceIdentity() (string, error)
GetServiceIdentity gets the service account from the cert SAN field.
func (*OnPremClientImpl) IsProperPlatform ¶
func (ci *OnPremClientImpl) IsProperPlatform() bool
IsProperPlatform returns whether the platform is on premise.