aries-cloudagent-python icon indicating copy to clipboard operation
aries-cloudagent-python copied to clipboard

Add seed command line parameter but use only if also an "allow insecure seed" parameter is set

Open DaevMithran opened this issue 2 years ago • 2 comments

Signed-off-by: DaevMithran [email protected]

Updated pull request changes suggested by @TimoGlastra

  • Raising an http bad request error when a seed is passed in the body and wallet-allow-insecure-seed is not enabled
  • Updated schema for wallet/did/create

DaevMithran avatar Apr 06 '22 11:04 DaevMithran

Codecov Report

Merging #1714 (2d86c5d) into main (186c3f4) will increase coverage by 0.00%. The diff coverage is 75.00%.

@@           Coverage Diff           @@
##             main    #1714   +/-   ##
=======================================
  Coverage   95.26%   95.26%           
=======================================
  Files         528      528           
  Lines       33109    33110    +1     
=======================================
+ Hits        31541    31542    +1     
  Misses       1568     1568           

codecov-commenter avatar Apr 06 '22 14:04 codecov-commenter

The error in the integration tests is unrelated to this PR (see issue #1832 ). Once we fix that, we'll trigger another integration run.

swcurran avatar Jun 24 '22 22:06 swcurran

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
3.2% 3.2% Duplication

sonarqubecloud[bot] avatar Aug 22 '22 20:08 sonarqubecloud[bot]

@ianco -- can you please review. Is this OK? Or should we not do this. We've not had a request for it for a while.

I'm thinking that there should be two new command line parameters (seed and "...insecure") here, but I don't see any documentation about those parameters.

Thanks

swcurran avatar Aug 22 '22 20:08 swcurran

The new seed parameter is for creating a new DID within an existing wallet (mainly for a new multi-tenant wallet) and is not related to the --seed startup parameter. (The former creates a new DID within a wallet, the latter establishes the public DID for the main wallet on startup). So I think this PR is ok.

ianco avatar Aug 22 '22 20:08 ianco

True about the seed parameter (doh!!) -- but doesn't there have to be an "allow_insecure_seed" parameter and guidance/help text for how to use that?

swcurran avatar Aug 22 '22 20:08 swcurran

True about the seed parameter (doh!!) -- but doesn't there have to be an "allow_insecure_seed" parameter and guidance/help text for how to use that?

Yes that already exists:

https://github.com/hyperledger/aries-cloudagent-python/blob/main/aries_cloudagent/config/argparse.py#L1453

ianco avatar Aug 22 '22 20:08 ianco