credentials

package
v1.203.0-test.13 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: Apache-2.0 Imports: 18 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// KeyringDirPermissions is the default permission for keyring directory (read/write/execute for owner only).
	KeyringDirPermissions = 0o700
	// MinPasswordLength is the minimum required length for keyring passwords.
	MinPasswordLength = 8
)
View Source
const (
	// KeyringUser is the "account" used to store credentials in the keyring. Here we use atmos-auth to provide a consistent way to search for atmos credentials.
	KeyringUser = "atmos-auth"
)

Variables

View Source
var (
	// ErrPasswordTooShort indicates password does not meet minimum length requirement.
	ErrPasswordTooShort = errors.New("password must be at least 8 characters")
	// ErrUnsupportedCredentialType indicates the credential type is not supported.
	ErrUnsupportedCredentialType = errors.New("unsupported credential type")
	// ErrUnknownCredentialType indicates an unknown credential type was encountered.
	ErrUnknownCredentialType = errors.New("unknown credential type")
	// ErrCredentialsNotFound indicates credentials were not found for the given key.
	ErrCredentialsNotFound = errors.New("credentials not found")
	// ErrDataNotFound indicates data was not found for the given key.
	ErrDataNotFound = errors.New("data not found")
	// ErrPasswordRequired indicates a password is required but not provided.
	ErrPasswordRequired = errors.New("keyring password required")
)
View Source
var ErrCredentialStore = errors.New("credential store")

ErrCredentialStore is the static sentinel for credential-store failures.

View Source
var ErrListNotSupported = errors.New("listing credentials is not supported with keyring backend")

ErrListNotSupported indicates that listing credentials is not supported with keyring backend.

View Source
var ErrNotSupported = errors.New("not supported")

ErrNotSupported indicates an unsupported operation for this backend.

Functions

func NewCredentialStore

func NewCredentialStore() types.CredentialStore

NewCredentialStore creates a new credential store instance based on configuration. It selects the appropriate backend (system, file, or memory) based on: 1. ATMOS_KEYRING_TYPE environment variable (highest priority). 2. AuthConfig.Keyring.Type configuration. 3. Default to "system" for backward compatibility.

func NewCredentialStoreWithConfig added in v1.196.0

func NewCredentialStoreWithConfig(authConfig *schema.AuthConfig) types.CredentialStore

NewCredentialStoreWithConfig creates a credential store with explicit configuration.

func NewKeyringAuthStore

func NewKeyringAuthStore() types.CredentialStore

NewKeyringAuthStore creates a new system keyring-based auth store (for backward compatibility). Deprecated: Use NewCredentialStore() instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

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