Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cli commands and options to wacryptolib #43

Open
pakal opened this issue Feb 17, 2023 · 0 comments
Open

Add cli commands and options to wacryptolib #43

pakal opened this issue Feb 17, 2023 · 0 comments

Comments

@pakal
Copy link
Member

pakal commented Feb 17, 2023

The idea is, with the Python-Click lib already in place, to extend the main.py of the wacryptolib, with new options and commands.

Most of these operations are already supported by witness-angel-components code, so we have to repatriate this code (e.g. in a new wacryptolib/operations.py module), and take the opportunity to test it unitarily AND via the CLI (so in subprocess, but briefly).

To think about: do we always pass files and uuids as "--arguments"? Or do we pass them as positional arguments to simplify?

$ CURRENTLY: python -m wacryptolib
Commands:
decrypt Turn a cryptainer file back into its original media file.
encrypt Turn a media file into a secure cryptainer.
summarize Display a summary of a cryptoconf (or cryptainer) structure.

New global options to add:

"--gateway" (witness angel gateway url)
"--cryptainer-storage" (cryptainers storage folder)

Examples of new (sub)commands to add :


foreign-keystores list [--format=plain/json] [keystore-uid] Lists the/an imported keystores and their keys
foreign-keystores import-from-web <keystore-uuid> # Import a public keystore from the web registry
foreign-keystores import-from-usb # Imports the keystores found on the connected USB keys

local-key-factory list [--format=plain/json] # List the key pairs available in the local Factory

cryptainers list [--format=plain/json] [--include-pending] # Lists the cryptainers available in the local folder, with unfinished (containing a tilde) or finished only
cryptainers purge -max-cryptainer-quota/max-cryptainer-count/max-cryptainer-age # Purges excess cryptainers against these criteria
cryptainers decrypt <cryptainer-uuid> [options] # Shortcut to decrypt a cryptainer from storage
cryptainers summarize <cryptainer-uuid> [options] # Shortcut to summarize a cryptainer from storage

cryptainers request-decryption-authorization <cryptainer-uuid> [<cryptainer uuid>...] --message=... --key-gardian-uuid=... # Sends an authorization request to these key keepers for these cryptainers, API TO DISCUSS, requires a device-uuid
view-decryption-authorizations <device-uuid>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant