credential

package
v1.11.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AKPairProvider

type AKPairProvider struct {
	// contains filtered or unexported fields
}

func NewAKPairProvider

func NewAKPairProvider(ak string, sk string) *AKPairProvider

func (*AKPairProvider) Name

func (a *AKPairProvider) Name() string

func (*AKPairProvider) Resolve

func (a *AKPairProvider) Resolve() (*Credential, error)

type Credential

type Credential struct {
	Credential auth.Credential
	Expiration time.Time
}

type EncryptedCredentialInfo

type EncryptedCredentialInfo struct {
	AccessKeyID     string `json:"access.key.id"`
	AccessKeySecret string `json:"access.key.secret"`
	SecurityToken   string `json:"security.token"`
	Expiration      string `json:"expiration"`
	Keyring         string `json:"keyring"`
}

type EncryptedCredentialProvider

type EncryptedCredentialProvider struct {
	// contains filtered or unexported fields
}

func NewEncryptedCredentialProvider

func NewEncryptedCredentialProvider(credentialPath, secretNamespace, secretName string) *EncryptedCredentialProvider

NewEncryptedCredentialProvider get token from file or secret. default filepath /var/addon/token-config

func (*EncryptedCredentialProvider) Name

func (*EncryptedCredentialProvider) Resolve

func (e *EncryptedCredentialProvider) Resolve() (*Credential, error)

type Interface

type Interface interface {
	Resolve() (*Credential, error)
	Name() string
}

type MetadataProvider

type MetadataProvider struct {
}

func NewMetadataProvider

func NewMetadataProvider() *MetadataProvider

NewMetadataProvider get ramRole from metadata

func (*MetadataProvider) Name

func (m *MetadataProvider) Name() string

func (*MetadataProvider) Resolve

func (m *MetadataProvider) Resolve() (*Credential, error)

type StsTokenCredentialProvider added in v1.5.7

type StsTokenCredentialProvider struct {
	StsTokenCredential *credentials.StsTokenCredential
}

func NewStsTokenCredentialProvider added in v1.5.7

func NewStsTokenCredentialProvider(ak, sk, token string) *StsTokenCredentialProvider

func (*StsTokenCredentialProvider) Name added in v1.5.7

func (*StsTokenCredentialProvider) Resolve added in v1.5.7

func (e *StsTokenCredentialProvider) Resolve() (*Credential, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL