Skip to content
Snippets Groups Projects

Adding db persistence for all SecretFormat of vault keys as well as supporting derivations

Merged Nicolas80 requested to merge vault-db-persistence-and-derivation-support into master
  • Added "/.idea" exclusion in .gitignore (for when using JetBrains IDEs)
  • Added dialoguer dependency for easier user input handling (see in inputs.rs)
  • Added sea-orm dependency to allow having DB entity mappings and use a local sqlite file database
  • Added rstest test dependency for parameterized tests support
  • Added derivation tests for each SecretFormat (including cesium v1 key derivation, using sp_core::ed25519::Pair)
  • Made a lot of changes to add vault_account and vault_derivation db tables to persist vault keys & derivations
  • Added support for KeyPair::Ed25519 linking to sp_core::ed25519::Pair which can be created from secret seed retrieved from nacl::sign::Keypair (which is created from cesium id + secret)
    • This was necessary to allow deriving keys from "cesium v1" keys (to be reviewed - it might be a bad idea to permit that from a security point of view)
  • Only kept original (substrate) keyfiles support for migration (use "vault list-files" and "vault migrate")
  • Added possibility to give either "-a" Address or "-v" Vault Name as general option
  • Added extra commands in Vault
    • list-files: (deprecated)List available key files (needs to be migrated with command "vault migrate" in order to use them)
    • migrate: (deprecated)Migrate old key files into db (will have to provide password for each key)
    • 'list' now has sub-commands 'all' or 'root' to show all keys or only root keys (without derivation path)
    • use: "Use specific vault key (changes the config address)", which will have the same behaviour as gcli <-a <Address>|-v <VaultName>> config save (left a FIXME in there to review)
    • derivation: Add a derivation to an existing (root) vault key
    • rename: Give a meaningful vault name to a vault key or derivation
    • remove: Remove a vault key (and potential derivations if it's a root key)
  • Had to bubble up "await" and "async" in a lot of places
  • ...

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Hugo Trentesaux
  • Hugo Trentesaux
  • Hugo Trentesaux
  • Hugo Trentesaux
  • Hugo Trentesaux
  • Hugo Trentesaux
    • Resolved by Nicolas80

      Voici une relecture de plus.

      Les concepts de secrets, crypto, et dérivations semblent encore un peu frais. J'espère que les discussions sur le forum permettront d'arriver à un modèle clair permettant une utilisation simple et un code concis.

      Il reste encore quelques "TODO", comptes-tu les traiter ? Je pourrai faire une prochaine relecture quand tu auras pris en compte celle-ci ^^

  • Nicolas80 added 1 commit

    added 1 commit

    • f132287f - Small refactorings from MR comments

    Compare with previous version

  • Nicolas80 added 1 commit

    added 1 commit

    • 9c57fb7c - Small cleanup for data's db connection; adding method connect_db that returns...

    Compare with previous version

  • Nicolas80 added 1 commit

    added 1 commit

    • 9c3c3564 - Small cleanup for `vault use` command

    Compare with previous version

  • Nicolas80 added 1 commit

    added 1 commit

    • 223ec22b - Small cleanup for `vault use` command and saving Config

    Compare with previous version

  • Nicolas80 added 1 commit

    added 1 commit

    Compare with previous version

  • Nicolas80 added 2 commits

    added 2 commits

    • 3d7b15c0 - * Added sc_cli::arg_enums::CryptoScheme partial copy in keys.rs
    • a47779c7 - * Added replacement options for `import` and `derive`

    Compare with previous version

  • Nicolas80 added 1 commit

    added 1 commit

    • 0c1a3104 - * Added replacement options for `import` and `derive`

    Compare with previous version

  • Nicolas80 added 1 commit

    added 1 commit

    Compare with previous version

  • Nicolas80 added 1 commit

    added 1 commit

    • f9f1d609 - * Small clean up of `clap` arguments

    Compare with previous version

  • Nicolas80 added 1 commit

    added 1 commit

    • ab6169b1 - * Small clean up of `clap` arguments

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading