-
Notifications
You must be signed in to change notification settings - Fork 521
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
Use did:key for recipient keys #1886
Use did:key for recipient keys #1886
Conversation
This is work for openwallet-foundation#1859 Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
This reverts commit d0b19d9. Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Also attempt to revert key formats before forwarding messages Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Add the RoutingKey Validator that supports both DIDKey and Raw Indy Public Keys for backwards compatibility reasons Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
@dbluhm It looks like I could have gotten away without modifying the MediationRecord. I would just have had to replace every instance of |
In the interest of the principle of least change, would this help us avoid needing to modify connections, didexchange, pack, etc.? Might be a bit of a pain to make that change now but if it results in a cleaner set of changes, that might be worth it. |
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1886 +/- ##
=======================================
Coverage 93.68% 93.68%
=======================================
Files 539 540 +1
Lines 34162 34187 +25
=======================================
+ Hits 32003 32027 +24
- Misses 2159 2160 +1 |
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
c827dd5
to
dc85e32
Compare
@dbluhm I believe that addresses your feedback |
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.
Looks good! I left some minor suggestions but they're not pressing. The only other comment coming to mind is that we should document that we receive did:key values but are storing the keys as base58 encoded strings still.
aries_cloudagent/protocols/coordinate_mediation/v1_0/manager.py
Outdated
Show resolved
Hide resolved
if recipient_key.startswith("did:key:"): | ||
self.recipient_key = recipient_key | ||
else: | ||
self.recipient_key = DIDKey.from_public_key_b58( | ||
recipient_key, KeyType.ED25519 | ||
).did |
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.
Perhaps a helper method similar to the normalize_public_key
method would be good since we perform this normalization several times throughout the messages.inner
package.
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
…-cloudagent-python into fix/RFC-0211-Compliance
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
70bb6e2
to
36f1230
Compare
SonarCloud Quality Gate failed.
|
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.
Looks good! Nice work!
@frostyfrog -- can you please check the failed integration test. It's a "can't find a DID" error which may be related to the PR (or not... :-) ). From the test: "7hAcme.agent | 2022-08-23 22:21:35,515 aries_cloudagent.connections.base_manager WARNING No corresponding DID found for recipient verkey: CcGfdN6DgibjWEU3kShAkHC6f1eyMAghfi8hknrZEZFF" |
Interesting that it's failing now. I'll take a look! |
When I pulled down the latest changes (the two merges), I was unable to reproduce the error locally. Opening up the logs from the failed test reveals that my changes may not be a likely cause here. There was an exception in the revocation code where ACA-Py received something that did not match the revocation schema. Logs below:
|
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.
LGTM!
If you pull these changes and attempt to use a mediator that has not been updated, you'll see problem reports bouncing back from the mediator on keylist update messages:
Mediators can account for clients that continue to use the original raw key format but the inverse is unfortunately more complicated to account for. |
I assume we should update the aries-mediator-service to use the latest? How is it determined what version of ACA-Py to use? Do we need to do an "-rc1" for that upgrade? @dbluhm -- do you have someone that can take that on? I assume that Indicio will be updating their public mediator? Thanks! |
Sure, I'll add that to the to-do list 🙂 cc @reflectivedevelopment |
As part of #1859, I have made it so the coordinate-mediation protocol uses did:key representation. Apologies that this took as long as it did. Implementing this impacted more of ACA-Py than I realized it would while keeping it compatible with existing agents.