-
Notifications
You must be signed in to change notification settings - Fork 204
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
Add support for RFC 0360: did:key Usage #497
Comments
I'll take a look at this one. For RFC 0211 usage of did:key maybe we can do something with Discover Features V2 to determine the key format to use. |
I'm having some headaches trying to find a proper way of implementing this while maintaining compatibility with older agents. IMHO, this did:key thing has introduced a breaking change in protocols but their version number is kept (and there is no new flag to explicitly indicate RFC 0360 support). And also it has been introduced some time before we implemented RFC 0211, so we can admit that our implementation (probably biased by ACA-Py's) was not according to the spec. It seems to me that a balanced solution would be to add a (yet another) flag in routing module that, when enabled, agent will encode keys in did:key for all related protocols (i.e Coordinate Mediation, Pick Up V1 and Pick Up V2). This flag will be default to false in 0.2.x to keep current behaviour. For next major version, I think it should default to true, to enforce alignment with AIP 2.0 in new AFJ deployments. Yes, I know this is controversial, as some AFJ contributors like @TimoGlastra and myself are not convinced of this approach of encoding keys 😛, but it could be useful to ensure compatibility with other agents that might no be aware of this backwards compatibility (especially considering that this RFC 0360 was accepted 1,5 years ago. BTW apart from routing protocols, is there any other protocol that we should still adapt? I'm not sure about Connections (RFC 0160) but I guess the other ones (OOB, DID Exchange, etc.) are already covered. |
I assume the breaking issue is when to send a key in @ianco @andrewwhitehead @shaangill025 @dbluhm -- we've got to make sure we are doing the same things in ACA-Py. And the comment above about ACA-Py implementation not being to spec. |
Yes, exactly. My concern is mainly with old agents that might not interpret correctly the keys we are sending to them if they are did:key encoded. For compatibility with ACA-Py, I guess we are mostly covered, as AFJ since 0.2.2 supports receiving both did:key or base58 keys in Coordinate Mediation protocol. However, there is a case where recipient might send a key to the mediator: Status and Delivery request in Pick Up V2 protocol. In AFJ we are not yet sending it (it's an optional field), but probably will in a future version, so it might worth taking a look at ACA-Py implementation of that protocol to make sure it could handle did:key in such case. |
@shaangill025 -- could you put the request in the previous comment at the top of your list -- can ACA-Py handle receiving a |
I think we can do maybe 3 things (and start with a flag):
|
The way that this was implemented from within ACA-Py (as I recall) is that only the Coordinate Mediation protocol deals with did:key at this time. Originally, I had it handling did:key at the routing level, providing the capability for all protocols to use did:key. However, per @dbluhm's recommendation to follow the principle of least change, I limited the scope to just the coordinate mediation protocol. As I recall, it should support both the old keys and the new did:key formats. This behavioral change was made in openwallet-foundation/acapy#1886 |
https://github.com/hyperledger/aries-rfcs/tree/b3a3942ef052039e73cd23d847f42947f8287da2/features/0360-use-did-key
The text was updated successfully, but these errors were encountered: