Documentation
¶
Index ¶
Constants ¶
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 )
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 ¶
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") )
var ErrCredentialStore = errors.New("credential store")
ErrCredentialStore is the static sentinel for credential-store failures.
var ErrListNotSupported = errors.New("listing credentials is not supported with keyring backend")
ErrListNotSupported indicates that listing credentials is not supported with keyring backend.
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.