Account storage support: authentication, revocation
- https://askubuntu.com/a/14536
- Storage per currency, per account name
-
$XDG_DATA_HOME
|$HOME/.local/share/silkaj/${currency}
-
${account_name}
: defined by the user, passed via general/specific option-a/--account
revocation.txt
-
authentication_file_${format}.json
: Silkaj would discover which format is it, v1 formats will be dropped at some point
-
Implementation
Account storage
-
Introduce global -a/--account
option -
Storage class into silkaj/storage.py
with teststests/units/test_storage.py
Authentication
Read from --auth-*
method, store into account storage:
silkaj --account <account> authentication --auth-*
Need special handling of --auth-*
and --account
options separately in the authentication selection handling for the authentication
command. Other commands using the authentication should read only from --account
. The authentication
command is kind of a converter command from --auth-*
methods to account storage.
Use authentication
command as an importer from scattered files to this account storage structure
-
Move --auth-*
options asauthentication
specific options?- Con: Would no longer allow easy authentication on other commands
- Pro: Would force more secure account storage usage, conversion
-
Set authentication methods as MutuallyExclusive
-
Implementation in authentication
command to store in the account storage -
Support a better default authentication file format creation in the storage than seedhex
?-
Implement (E)WIF authfile saving #173 (closed)
-
-
Discover which authfile format it is: v1 (seedhex, pubsec), v2 (encrypted json) -
authentication_file_ed25519.txt
,authentication_file_sr25519.json
-
-
Write tests
Revocation
# read auth file, write revocation file
silkaj --account <account> wot revocation create
# read revocation file
silkaj --account <account> wot revocation {verify,publish}
-
create
read authfile from--account
and write revocation file into--account
-
verify
/publish
: consume file from general--account
option -
Write tests
Importer command?
account import
- import already generated auth and revocation files to an account?
New Account label
-
replace Storage
label
Documentation
-
Write documentation how this works (input as general option, output as command-specific option) -
Update README.md§Features
withAccount (storage)
andAuthentication methods
.
account
commands
-
account list
command
def list(self):
for root, dirnames, filenames in self.path.parent.walk():
print(root, dirnames, filenames)
- list available accounts per currencies: there contents, auth file, revocation file
- following implementations can all be done with Unix commands. To be done in a follow-up ticket?
- instead of a copy to the right place?
-
account remove $account
: remove complete account, remove only authentication or revocation file? account rename $old_name $new_name
Edited by Moul