Versions in this module Expand all Collapse all v1 v1.0.2 Feb 22, 2024 v1.0.1 Feb 22, 2024 Changes in this version + const AccessFileDefaultName + const AccessFileDirPath + const CertificateValidityThreshold + const ClientCertName + const ClientTokenName + const ClientTokenPath + const CloudAgentServerPort + const DefaultServerContextTimeout + const DefaultWSSDFolder + const ServerName + const WssdConfigPath + func AccessFileToTls(accessFile WssdConfig) ([]byte, tls.Certificate, error) + func CertCheck(pemCert []byte) error + func GetCertificateDirPath() string + func GetCertificateFilePath() string + func GetLoginTokenPath() string + func GetMocConfigLocationName(subfolder, filename string) string + func GetWssdConfigLocation() string + func Hash(certificate *x509.Certificate) string + func LoginTypeToAuthType(authType string) common.AuthenticationType + func NewPublicKeyVerifier() *publicKeyVerifier + func PrintAccessFile(accessFile WssdConfig) error + func PrintAccessFileByName(accessFile WssdConfig, subfolder, filename string) error + func ReadAccessFileToTls(accessFileLocation string) ([]byte, tls.Certificate, error) + func RenewCertificates(server string, wssdConfigLocation string) error + func SaveToken(tokenStr string) error + func SetCertificateDirPath(certificateDirPath string) error + func SetCertificateFilePath(certificateFilePath string) error + func SetLoginTokenPath(loginConfigPath string) error + func TransportCredentialsFromFile(wssdConfigLocation string, server string) credentials.TransportCredentials + func TransportCredentialsFromNode(tlsCert tls.Certificate, serverCertificate []byte, server string) credentials.TransportCredentials + type Authorizer interface + WithRPCAuthorization func() credentials.PerRPCCredentials + WithTransportAuthorization func() credentials.TransportCredentials + func NewAuthorizerForAuth(tokenString string, certificate string, server string) (Authorizer, error) + func NewAuthorizerFromEnvironment(serverName string) (Authorizer, error) + func NewAuthorizerFromEnvironmentByName(serverName, subfolder, filename string) (Authorizer, error) + func NewAuthorizerFromInput(tlsCert tls.Certificate, serverCertificate []byte, server string) (Authorizer, error) + type BearerAuthorizer struct + func NewBearerAuthorizer(tp JwtTokenProvider, tc credentials.TransportCredentials) *BearerAuthorizer + func NewEmptyBearerAuthorizer() *BearerAuthorizer + func (ba *BearerAuthorizer) WithRPCAuthorization() credentials.PerRPCCredentials + func (ba *BearerAuthorizer) WithTransportAuthorization() credentials.TransportCredentials + type ClientType string + const Admin + const BareMetal + const ControlPlane + const ExternalClient + const LoadBalancer + const Node + type EnvironmentSettings struct + Values map[string]string + func GetSettingsFromEnvironment(serverName string) (s EnvironmentSettings) + func GetSettingsFromEnvironmentByName(serverName, subfolder, filename string) (s EnvironmentSettings, err error) + func (settings EnvironmentSettings) GetAuthorizer() (Authorizer, error) + func (settings EnvironmentSettings) GetManagedIdentityConfig() ManagedIdentityConfig + type JwtTokenProvider struct + RawData string + func NewEmptyTokenCredentialProvider() JwtTokenProvider + func NewTokenCredentialProvider(token string) JwtTokenProvider + func TokenProviderFromFile(tokenLocation string) (JwtTokenProvider, error) + func (c JwtTokenProvider) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) + func (c JwtTokenProvider) RequireTransportSecurity() bool + type LoginConfig struct + Certificate string + ClientType ClientType + CloudAuthPort int32 + CloudFqdn string + CloudPort int32 + Location string + Name string + Token string + Type LoginType + type LoginType string + const CASigned + const SelfSigned + func AuthTypeToLoginType(authType common.AuthenticationType) LoginType + type ManagedIdentityConfig struct + ClientTokenPath string + ServerName string + WssdConfigPath string + func (mc ManagedIdentityConfig) Authorizer() (Authorizer, error) + type Set struct + func NewSet() *Set + func (s *Set) Allow(pubKeyHashes ...string) error + func (s *Set) CheckAny(certificates []*x509.Certificate) error + type TransportCredentialsProvider struct + func NewEmptyTransportCredential() *TransportCredentialsProvider + func NewTransportCredentialFromAccessFile(serverName string, accessFile WssdConfig) (*TransportCredentialsProvider, error) + func NewTransportCredentialFromAccessFileLocation(serverName, accessFileLocation string) (*TransportCredentialsProvider, error) + func NewTransportCredentialFromAuthBase64(serverName string, rootCACertsBase64 string) (*TransportCredentialsProvider, error) + func NewTransportCredentialFromAuthFromPem(serverName string, caCertPem []byte) (*TransportCredentialsProvider, error) + func NewTransportCredentialFromBase64(serverName, clientCertificateBase64, clientKeyBase64 string, ...) (*TransportCredentialsProvider, error) + func NewTransportCredentialFromTlsCerts(serverName string, tlsCerts []tls.Certificate, rootCACertsPem []byte) (*TransportCredentialsProvider, error) + func (transportCredentials *TransportCredentialsProvider) GetTransportCredentials() credentials.TransportCredentials + type WssdConfig struct + ClientCertificate string + ClientCertificateType LoginType + ClientKey string + CloudCertificate string + IdentityName string + func GenerateClientCsr(loginconfig LoginConfig) (string, WssdConfig, error) + func GenerateClientKey(loginconfig LoginConfig) (string, WssdConfig, error) + func GenerateClientKeyWithName(loginconfig LoginConfig, subfolder, filename string) (string, WssdConfig, error)