awsc.config.storage.Keystore

class awsc.config.storage.Keystore(config)

Encrypted key storage for AWS credentials.

Attributes:
keylist_filepathlib.Path

Encrypted binary which stores the AWS credentials.

nonce_filepathlib.Path

Nonce file for the encryption.

noncebytes

The nonce value.

keylist_ciphercryptography.hazmat.primitives.cipher.Cipher

The cryptography cipher used to decrypt and encrypt the key storage.

keysdict

A list of decrypted key pairs, keyed by account name.

Methods

delete_key(name)

Deletes a key from the key storage and writes to disk.

do_unlock(password)

Unlock keystore with a password.

force_resolve(item)

Returns the named keypair.

get_all_ref_targets()

Enumerates all ref targets into a list.

get_permanent_credentials(item)

Returns the permanent credentials associated with a context.

get_ref_name(item)

Returns the ref of the named keypair, as this property is not accessible through __getitem__.

parse_keylist()

Attempts to parse the keylist file.

set_key(name, access, secret)

Upserts a key into the key storage and writes to disk.

set_ref(name, ref)

Upserts a reference key into the key storage and writes to disk.

set_temp(name, data)

Sets temporary credentials for a reference key.

unlock([silent])

Prompts the user to enter the password to access the key storage, and parses the keylist file.

write_keylist()

Writes the keylist to the keylist_file.

__init__(config)

Initializes a Keystore object.

Parameters:
configawsc.config.config.Configuration

The parent configuration object instance.

Methods

__init__(config)

Initializes a Keystore object.

delete_key(name)

Deletes a key from the key storage and writes to disk.

do_unlock(password)

Unlock keystore with a password.

force_resolve(item)

Returns the named keypair.

get_all_ref_targets()

Enumerates all ref targets into a list.

get_permanent_credentials(item)

Returns the permanent credentials associated with a context.

get_ref_name(item)

Returns the ref of the named keypair, as this property is not accessible through __getitem__.

parse_keylist()

Attempts to parse the keylist file.

set_key(name, access, secret)

Upserts a key into the key storage and writes to disk.

set_ref(name, ref)

Upserts a reference key into the key storage and writes to disk.

set_temp(name, data)

Sets temporary credentials for a reference key.

unlock([silent])

Prompts the user to enter the password to access the key storage, and parses the keylist file.

write_keylist()

Writes the keylist to the keylist_file.