-
Notifications
You must be signed in to change notification settings - Fork 516
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
Creating askar subwallet with wallet_key_derivation
creates broken wallet
#2682
Comments
@andrewwhitehead ^^^ |
Error that happens when using token from broken wallet ^ |
The request for an askar wallet with this parameter included should be prevented and the swagger docs should be updated to have a valid payload for an askar wallet instead of indy. For me, it works OK when the
Response:
The resulting subwallets work fine. I am a bit confused by the part in the OP saying that the subwallet type was specified by changing the type from indy to askar with the wallet_key_derivation param .... The subwallet type is specified with the It looks like when the base wallet is I'm not sure if the I also wonder if there are any tests which cover the case where an |
Hi. To add clarification. My subwallet is failing with the same payload you posted.
It works fine if I have the payload without the
I'm not sure what's going on. Possibly it's an environment issue. It's happening for me with faber demo and when I launch from vscode. I don't seem to have any other issues. |
Was looking at this again and the error is still happening for me from the faber demo with the payload
but I could see an exception Not sure if anyone has any insight into why this might be happening for me? I'll keep this open for now and see if I can figure anything else out, but I'm not sure how I could be doing anything wrong to cause this. |
The default wallet key derivation uses Argon2 to calculate the raw key, a method which is meant to be resistant to brute force attacks on weak passwords. When using the RAW key derivation method, the key is not run through Argon2: it must be the 32-byte wallet decryption key itself, encoded in base58. In Python, new random keys can be generated with It seems like in this case when the key derivation method is provided when creating the subwallet, it is either ignored during the creation process, or a random key is being used instead of the provided key (because the provided key is not in the right format). I think that ideally, if the key derivation method is set to RAW, then the key should not be provided at all, and a random key should be generated and stored in the root wallet instead. If a key is provided, then it must be a valid RAW key. |
Going to close. If we want to generate a random key it can be brought up in a new ticket. |
If you create a subwallet with POST
multitenancy/wallet
by changing the type from indy to askar with thewallet_key_derivation
param which is in the sample payload it will get a ProfileSessionUnavailable error. However, the wallet is still created, but in a broken state. Any call to the api with the created token will receive a 500 error.I beleive this option shouldn't be used with an askar wallet?
The request for an askar wallet with this parameter included should be prevented and the swagger docs should be updated to have a valid payload for an askar wallet instead of indy.
The text was updated successfully, but these errors were encountered: