-
Notifications
You must be signed in to change notification settings - Fork 6
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
Explore compatibility with CACAO #24
Comments
There is a lot of context here that I lack to provide meaningful feedback, but I'd be happy to have a call to try and get on the same page if you'd be interested in doing it. Nuances aside settling on common representation does sound like good idea, but again I wonder what the tradeoffs are. @oed Is there comparison of UCANs and CACAO written up somewhere ? I have read through the link and ceramic blog post but honestly I'm not sure I understand what the limitations it spoke to. |
CACAO is a way to represent a SIWE messge + signature in IPLD as @ukstv will provide more details as he has already thought about how UCANs could potentially be stored as a CACAO.
Yep, that's what I would like to figure out as well! |
I tend to believe, UCANs and CACAOs are the same semantically, even the schemas are similar. The major differences are:
Here is the first attempt to store UCANs as CACAO: https://hackmd.io/@ukstv/Hy9bQB-Hc/edit It includes some comparison of UCANs with CACAO. Here we disregarded canonicalization. I personally thought that we might converge towards canonicalization everywhere, which seems not to be the case. I understand now it is important for backwards compatibility reason. So, maybe the way to go is to add a type like The contents would be semantically identical to your approach, with few differences:
Would be nice to discuss a possible convergence in a call. |
In the ADL you are suggesting @Gozala, it seems like only According to the UCAN spec:
Is this intentional? Seems like the ADL should support any DID that possible UCAN implementations may use? |
That is probably an oversight on my end. We need issuer to be |
Well, there are other DID methods that supports signing JWTs! As long as the DID has one Verification Method that contains the public key that signs the JWT it is totally valid. |
Oh actually now that I think about it's bit ingrained into data model, current we represents issuer and audience as multicodec code tagged public keys. That said I'd be amendable to revisit this. More broadly, our current thinking is than instead of putting different DID's into UCANs we will just associate those with some That way actors can map one with another, but all the invocations would stick to public keys. |
I lack context here and in no way opposed to supporting other methods. That said I think current interfaces at least are flexible enough to support other methods. Lines 17 to 22 in d7ec23a
Lines 35 to 38 in d7ec23a
Which is basically Verification is out of scope here as that requires more that just signature validations so I think we expand support to arbitrary DIDs if that is desired. |
I'm less worried about this particular API and more about the byte representation in IPLD. We'll discuss this in our call next week however :) |
I'm nut sure I fully understand this point. We have to format data model into JWT form and than sign that with private key, which I agree is unfortunate but feel like not too terrible of price to pay for the compatibility. I might lack context in regards to compatibly with blockchains signatures or DIDs however.
I don't understand this point, it could be that UCANs are more limited than CACAO is, however we seem to find them to be a good fit for our use cases. In regards to "sign in with blockchain" we think of it as capability to associate a blockchain account with a specific did:key (as per linked access/identify doc). |
That is more or less what we do here. On top we have a view layer that abstracts underlying encoding through an interface that more or less matches the IPLD schema. |
Sure lets discuss and find ways to improve. |
Closing this since discussion has moved to https://github.com/ucan-wg/ucan-cacao |
Thanks for your comment here @Gozala
We are currently exploring if it might make sense to have a common
dag-cbor
representation for both SIWE and UCAN. Currently it's possible to encode a SIWE message and signature as CACAO. From my surface level understanding of your ADL approach it seems like that is pretty similar to what CACAO is doing for SIWE.Would love your thoughts on this!
The text was updated successfully, but these errors were encountered: