This is was is called when you run sflvault connect s#1 or other sflvault ... commands.
It wraps all the functionality of querying the remote vault, decrypting and displaying the results.
This is the main SFLvault Client object.
It is used to script some access to the vault, to retrieve data, to store data, or to create a GUI interface on the top of it.
Whether you want to access a local or remote Vault server, this is the object you need.
Set up initial configuration for function calls
Parameters: |
|
---|
Connect to a distant machine (using SSH for now)
Get information to be edited
List customers in the vault and possibly corresponding to the needed id
Save the (potentially modified) customer to the Vault
Add a named group to the Vault. Return the group id.
Remove a group from the Vault, making sure no services are left behind.
Get information to be edited
Simply list the available groups
Save the (potentially modified) Group to the Vault
Add a machine to the database.
Get information to be edited
Save the (potentially modified) machine to the Vault
Search the database for query terms.
query: list of REGEXPs to be matched.
filters: dict with keys in [‘groups’, ‘machines’, ‘customers’] that limits the records returned to those matching those constraints. The values can be either int or str (representing an int).
verbose (bool): shows the notes and location attributes for services and machines.
Add a service to the Vault’s database.
machine_id: A m#id machine identifier.
parent_service_id: A s#id, parent service ID, to which you should connect before connecting to the service you’re adding. Specify 0 or None if no parent exist. If you set this, machine_id is disregarded.
url: URL of the service, with username, port and path if required
group_ids: Multiple group IDs the service is part of. See list-groups
notes: Simple text field, with notes.
secret: Password for the service. Plain-text.
metadata: Dictionary with metadata for services (depends on service).
Get information to be edited
Get information to be edited
Updates the password on the Vault for a certain service
Save the (potentially modified) service to the Vault
Set the function to ask for passphrase.
By default, it is set to _getpass, which asks for the passphrase on the command line, but you can create a new function, that would for example pop-up a window, or use another mechanism to ask for passphrase and continue authentication.
Show informations to connect to a particular service
List users
groups - if True, list groups for each user also
Change the password protecting the local private key.
Sets up the local configuration to communicate with the Vault.
Return an integer value for a given VaultID.
A VaultID can be one of the following:
Parameters: | check_alias – check for matching aliases if True, otherwise only the two first cases are treated. |
---|