-
Notifications
You must be signed in to change notification settings - Fork 512
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
feat: emit did:peer:2 in DID Exchange #2578
feat: emit did:peer:2 in DID Exchange #2578
Conversation
973acb8
to
8dec969
Compare
Kudos, SonarCloud Quality Gate passed! |
141220c
to
dafe953
Compare
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
89a8c67
to
4d4b505
Compare
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
@ianco I made a change to the integration tests to allow me to pass an arbitrary flag down through the layers to the start up of the agent. Thoughts on this approach? It seemed like it would be simpler to do this than to add flags all the way down the stack. |
Yes I think this is a good idea. Will this work when running the alice/faber demo as well? |
I haven't gotten myself familiar enough with the demo yet to say for sure 😅 So that probably means it's not usable from the demo at this point. |
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
No problem ping me when the PR is ready for review and I'll take a look ... |
Merged in #2687. |
This PR implements did:peer:2 support for DID Exchange. If the
--emit-did-peer-2
flag is set, ACA-Py will create and send a did:peer:2 DID instead of an unqualified DID and an attached Document in DID Exchange messages.This PR also implements the
did_rotate~attach
from the proposed DID Exchange v1.1. It will include thedid_rotate~attach
attribute on responses when relevant and will expect to receive them on responses as well.To achieve this, the following changes were made:
wallet.create_key
.create_key
is just a more genericcreate_signing_key
. Literally no difference in implementation; it just seemed an inappropriate name for how it was being used. I can be convinced that we should not do this.wallet.store_did
. This enables us to more easily create DIDs outside of the wallet. Thewallet.create_local_did
method is starting to get a bit complicated. Rather than shoehorning all DID creation into the wallet interface, I think it makes sense to transition to a system where the wallet creates the primitives (such as keys) but then the creation of the DID itself is performed outside of the wallet. This was especially necessary because, in order to create a did:peer:2, we also need service info which can differ per connection (mediation used or not, for instance) and the wallet is simply not aware of the concept of services nor the context of the connection and associated mediation records. As part of an early pass, I even went as far as to introduce a DID Registration interface (which makes this attempt perhaps my third one in recent memory). I continue to struggle to create an interface that is generic enough to enable registering DIDs using plugged in registrars but still actually be useful. The requirements between methods varies so widely that the interface becomes nearly useless (at least in the context of ACA-Py). I'm finding it more reasonable to simply call a specific "registrar" directly. In these changes for did:peer:2, this is simply calling into the did-peer-2 library'sgenerate
method.--emit-did-peer-2
flag and associated setting.text/string
mime type, as is used in thedid_rotate~attach
.PEER2
DID Method definitionOpening as a draft since, at the time of opening, this hasn't been thoroughly exercised by tests yet.