salt.cache.localfs_key

Backward compatible shim layer for pki interaction

New in version 3008.0.

The localfs_key is a shim driver meant to allow the salt.cache subsystem to interact with the existing master pki folder/file structure without any migration from previous versions of salt. It is not meant for general purpose use and should not be used outside of the master auth system.

The main difference from before is the 'state' of the key, ie accepted/rejected is now stored in the data itself, as opposed to the cache equivalent of a bank previously.

store and fetch handle ETL from new style, where data itself contains key state, to old style, where folder and/or bank contain state. flush/list/contains/updated are left as nearly equivalent to localfs, without the .p file extension to work with legacy keys via banks.

salt.cache.localfs_key.contains(bank, key, cachedir, **kwargs)

Checks if the specified bank contains the specified key.

salt.cache.localfs_key.fetch(bank, key, cachedir, **kwargs)

Fetch and construct state data for a given minion based on the bank and id

salt.cache.localfs_key.flush(bank, key=None, cachedir=None, **kwargs)

Remove the key from the cache bank with all the key content. flush can take a legacy bank or a keys/denied_keys modern bank

salt.cache.localfs_key.init_kwargs(kwargs)

setup kwargs for cache functions

salt.cache.localfs_key.list_(bank, cachedir, **kwargs)

Return an iterable object containing all entries stored in the specified bank.

salt.cache.localfs_key.store(bank, key, data, cachedir, user, **kwargs)

Store key state information. storing a accepted/pending/rejected state means clearing it from the other 2. denied is handled separately

salt.cache.localfs_key.updated(bank, key, cachedir, **kwargs)

Return the epoch of the mtime for this cache file