Documentation
¶
Overview ¶
Package auth resolves OpenObserve credentials from configuration or secure storage. The pure credential model (header construction, validation, account keying) lives in the public pkg/auth; this package keeps the config/keychain-coupled resolution and re-exports the moved symbols so existing callers keep working unchanged.
Index ¶
Constants ¶
const ( SchemeBasic = pkgauth.SchemeBasic SchemeToken = pkgauth.SchemeToken SchemeSession = pkgauth.SchemeSession )
Auth scheme identifiers, re-exported from pkg/auth.
const ( BackendKeychain = "keychain" BackendFile = "file" )
Backend names reported by Save.
Variables ¶
var ErrSecretNotFound = errors.New("secret not found")
ErrSecretNotFound is returned by a Store when no secret exists for an account.
Functions ¶
func AccountKey ¶
AccountKey is re-exported from pkg/auth.
Types ¶
type Credential ¶
type Credential = pkgauth.Credential
Credential is re-exported from pkg/auth. Its methods (Header, Decorator, Validate, Redacted) come with the aliased type.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store persists secrets. It prefers the OS keychain and transparently falls back to a protected file under the config directory when the keychain is unavailable. Windows encrypts the fallback with per-user DPAPI; other platforms retain the existing 0600 file behavior.
func (*Store) Delete ¶
Delete removes the secret for account from both backends. Missing entries are not an error.
type StoreAccessError ¶ added in v0.7.0
StoreAccessError means the credential store could not be inspected. It is intentionally distinct from ErrSecretNotFound: a caller must not tell the user to reconfigure credentials when a sandbox merely hid the keychain.
func (*StoreAccessError) Error ¶ added in v0.7.0
func (e *StoreAccessError) Error() string
func (*StoreAccessError) Unwrap ¶ added in v0.7.0
func (e *StoreAccessError) Unwrap() error