Closed oed closed 5 months ago
I think using the URL would be the appropriate way here:
it avoids us having a dependency on IPFS specs,
Doesn't need to rely on the IPFS spec, just need more flexibility
it is self-describing and I suppose a resolving strategy is defined somewhere, and finally
It would break resolution in IPLD though. Generally you can query through an IPLD graph with a path: <cid-object1>/field/object2/field
where field
of object1 contains a CID. This works if the CID conforms to the IPLD data model, but not if you are using ipfs://<cid>
it avoids us having a dependency on IPFS specs,
Doesn't need to rely on the IPFS spec, just need more flexibility
Changing this would have a lot of consequences for the spec, and if we wouldn't refer to the IPFS spec, allowing this flexibility without a good reason is a hard sell.
it is self-describing and I suppose a resolving strategy is defined somewhere, and finally
It would break resolution in IPLD though. Generally you can query through an IPLD graph with a path:
<cid-object1>/field/object2/field
wherefield
of object1 contains a CID. This works if the CID conforms to the IPLD data model, but not if you are usingipfs://<cid>
I'm not really familiar with the IPFS concepts, so please excuse my ignorance, but from the outside, what you describe seems like a shortcoming of the URI scheme to me. Or is there something I'm missing?
There has been some discussion on this here: https://github.com/oauth-wg/oauth-sd-jwt-vc/pull/231#discussion_r1601608898
My questions above are still open - please address @oed
@danielfett so this issue actually got resolved by a PR to the dag-jose codec spec: https://github.com/ipld/ipld/pull/326
Essentially making the jose spec use ipfs://<cid>
instead of the object approach.
The issue described in #231 is different, basically it wants to avoid a self reference on the vct
field since that's incompatible with content addressing.
Currently the value for the
vct
field is defined as follows:This puts some unfortunate limitations on how the
vct
can be represented. IPLD is a data format that allows developers to represent "merkle dags", essentially arbitrary hash linked data structures. A key concept within IPLD is the concept of alink
, which is represented using the hash of the linked content (encoded as a "CID"). Specifically for dag-json, an link is represented as follows (example below points to a wikipedia mirror):It would be great if the
vct
could be represented as an immutable object referred to as a hash, and retain compatibility with existing IPLD tooling. Therefore, it would be great if the spec forvct
could be extended to support the following:An alternative approach that would be compatible with the current
vct
spec would be to represent the hash as an ipfs url, e.g.ipfs://bafymyhash...
. However, this would mean that compatibility is broken with existing tooling such as explore.ipld.io