storage

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrReadingCredentials = errors.New("unable to read credentials from keyring")
View Source
var ErrWritingCredentials = errors.New("unable to write credentials to keyring")

Functions

func IsKeyringAvailable

func IsKeyringAvailable() bool

IsKeyringAvailable returns true if the keyring is available on the system

Types

type KeyringStorageProvider

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

func NewKeyringStorageProvider

func NewKeyringStorageProvider(machineName string) *KeyringStorageProvider

func (*KeyringStorageProvider) PurgeCredentials

func (k *KeyringStorageProvider) PurgeCredentials() error

func (*KeyringStorageProvider) ReadAuthnToken

func (k *KeyringStorageProvider) ReadAuthnToken() ([]byte, error)

func (*KeyringStorageProvider) ReadCredentials

func (k *KeyringStorageProvider) ReadCredentials() (string, string, error)

func (*KeyringStorageProvider) StoreAuthnToken

func (k *KeyringStorageProvider) StoreAuthnToken(token []byte) error

func (*KeyringStorageProvider) StoreCredentials

func (k *KeyringStorageProvider) StoreCredentials(login string, password string) error

type NetrcStorageProvider

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

func NewNetrcStorageProvider

func NewNetrcStorageProvider(netRCPath, machineName string) *NetrcStorageProvider

func (*NetrcStorageProvider) PurgeCredentials

func (s *NetrcStorageProvider) PurgeCredentials() error

PurgeCredentials purges credentials from the specified .netrc file

func (*NetrcStorageProvider) ReadAuthnToken

func (s *NetrcStorageProvider) ReadAuthnToken() ([]byte, error)

ReadAuthnToken fetches the cached conjur access token. We only do this for OIDC since we don't have access to the Conjur API key and this is the only credential we can save.

func (*NetrcStorageProvider) ReadCredentials

func (s *NetrcStorageProvider) ReadCredentials() (string, string, error)

func (*NetrcStorageProvider) StoreAuthnToken

func (s *NetrcStorageProvider) StoreAuthnToken(token []byte) error

StoreAuthnToken stores the conjur access token. We only do this for OIDC since we don't have access to the Conjur API key and this is the only credential we can save.

func (*NetrcStorageProvider) StoreCredentials

func (s *NetrcStorageProvider) StoreCredentials(login string, password string) error

StoreCredentials stores credentials to the specified .netrc file

Jump to

Keyboard shortcuts

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