securestore

package
v0.1.400 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 7

Documentation

Index

Constants

View Source
const (
	SecureStoreConfigKey = "securestore"       // OCM_CONFIG key to enable secure OS store
	KindInternetPassword = "Internet password" // MacOS Keychain item kind
	ItemKey              = "RedHatSSO"
	CollectionName       = "login" // Common OS default collection name
	MaxWindowsByteSize   = 2500    // Windows Credential Manager has a 2500 byte limit
)

Variables

View Source
var (
	ErrNoBackendsAvailable = fmt.Errorf("no backends available, expected one of %v", allowedBackends)
)

Functions

func AvailableBackends

func AvailableBackends() []string

AvailableBackends provides a slice of all available backend keys on the current OS.

Note: CGO_ENABLED=1 is required for OSX Keychain and darwin builds

The first backend in the slice is the first one that will be used.

func GetConfigFromKeyring

func GetConfigFromKeyring() ([]byte, error)

GetConfigFromKeyring will retrieve the credentials from the first priority OS secure store.

Note: CGO_ENABLED=1 is required for OSX Keychain and darwin builds

func RemoveConfigFromKeyring added in v0.1.399

func RemoveConfigFromKeyring() error

RemoveConfigFromKeyring will remove the credentials from the first priority OS secure store.

Note: CGO_ENABLED=1 is required for OSX Keychain and darwin builds

func UpsertConfigToKeyring

func UpsertConfigToKeyring(creds []byte) error

UpsertConfigToKeyring will upsert the provided credentials to first priority OS secure store.

Note: CGO_ENABLED=1 is required for OSX Keychain and darwin builds

Types

This section is empty.

Jump to

Keyboard shortcuts

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