-
Notifications
You must be signed in to change notification settings - Fork 517
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
🐛 Ensure supported DID before calling Rotate #3380
Conversation
Signed-off-by: ff137 <ff137@proton.me>
Resolves: openwallet-foundation#3379 Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
My attempted solution, when passing a qualified did sov, results in:
... Seems this is the scenario for a did:sov that's not posted to the ledger Everything seems to work fine for did:peer:2 and did:peer:4. did:key returns an unresolvable didcomm service problem report. Will investigate more, and try improve some things |
Signed-off-by: ff137 <ff137@proton.me>
RotateAck is not correctly configured. Somewhere it is trying to load class "Ack", instead of RotateAck:
Found it here: 6bf8fc8 |
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks pretty good. Quick nitpick on handling errors raised by pydid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Signed-off-by: ff137 <ff137@proton.me>
Quality Gate passedIssues Measures |
) * 🎨 Make `ensure_supported_did` method public Signed-off-by: ff137 <ff137@proton.me> * 🐛 Ensure supported DID before calling Rotate Resolves: openwallet-foundation#3379 Signed-off-by: ff137 <ff137@proton.me> * ✅ Fix existing tests Signed-off-by: ff137 <ff137@proton.me> * ✅ Test coverage for new DID validation Signed-off-by: ff137 <ff137@proton.me> * 🎨 Fix lying method return type Signed-off-by: ff137 <ff137@proton.me> * 🐛 Fix message type class mapping Signed-off-by: ff137 <ff137@proton.me> * ✨ Handle pydantic.ValidationError when resolving did Signed-off-by: ff137 <ff137@proton.me> * 🎨 Replace pydantic.ValidationError with ValueError Signed-off-by: ff137 <ff137@proton.me> --------- Signed-off-by: ff137 <ff137@proton.me> Co-authored-by: Stephen Curran <swcurran@gmail.com>
Resolves #3379 and #3381
I'm open to alternatives. I first thought to just call DID.validate, and raise BadRequest if that fails, but since
ensure_supported_did
is called downstream, and the client would not immediately know if the DID is unresolvable, I figured that everything may as well be validated in the route, before being sent to the RotateHandler.That means
ensure_supported_did
will now be called twice. Perhaps the 2nd call can now be removed, since it's now just called earlier. Open to suggestions