ERIS over CoAP #8
coap into main
fc2e66543e
to a50bb65dfd
a50bb65dfd
to 02899da0c1
I don't know how to express this normatively so I'll say it here. I don't want to specify any encryption here. If you need to keep secret the references of the ERIS blocks you are transporting over the wire than you have some serious problems and encryption would be a marginal improvement at best.
Some suggestions:
ERIS CoAP Store
I suggest defining something like a ERIS CoAP store that has a URL. This URL is then the base for paths/verbs defined.
E.g. A store URL could be coap://example.com/my-eris-store, coaps://store-host.com/8908a9b5-6ea6-4d28-88a6-a3a4669bcda0 or coap+ws://bli-blups.org/eris-coap-ws.
I think this is already implicitly assumed, but I think it's good to make it explicit.
This also makes definition of additional paths (in this EER or future EERs) easy. E.g.:
filterpath that returns a filter of all blocks in the storequotapath that returns available quote for the specific storechokeandinterestsubscription paths a la BitTorrent
This store URL is also something which could then be shared for peer discovery.
Block paths
Relative to the ERIS CoAP store URL, I would suggest moving the block paths to either blocks/ or blake2b/.
Block size
I'd suggest using the Size1 CoAP option (https://www.rfc-editor.org/rfc/rfc7252#section-5.10.9) in requests to get blocks and making it optional.
I suggest defining something like a ERIS CoAP store that has a URL. This URL is then the base for paths/verbs defined.
...
This also makes definition of additional paths (in this EER or future EERs) easy.
Yes, I would support namespacing the blocks into blake2b. We should probably be using the .well-known convention and service discovery to document and validate the protocol.
I'd suggest using the Size1 CoAP option in requests to get blocks and making it optional.
I saw this option and wasn't sure if using it in requests was appropriate, but looks like it should be fine.
How about constructing URLs with the block references as a URI-Query option and the block-size as Size1? - .../blocks?H77AGSYKAVTQPUHODJTQA7WZPTWGTTKLRB2GLMF5H53NEKFJ3FUQ
That seems more "Constrained RESTful". Now we can list the .../blocks path in /.well-known/coreand stores can be found with "resource discovery".
I like blocks better than blake2b (or blake2b256).
I saw this option and wasn't sure if using it in requests was appropriate, but looks like it should be fine.
Yeah, semantics of Size1 is not quite clear - well, confusing actually.
In RFC 7959: Block-Wise Transfers in the Constrained Application Protocol (CoAP) it says about Size1:
In a request carrying a Block1 Option, to indicate the current
estimate the client has of the total size of the resource
representation, measured in bytes ("size indication").
If you cut the Block1 thing out, it seems to match our usage. It's the estimated size of the requested block.
I think we're ok with using Size1.
About Service Discovery: We're talking about service discovery as described in section 7 of the CoAP RFC (RFC 7262). Which defers to RFC 6690: Constrained RESTful Environments (CoRE) Link Format, where the .well-known/core enpdoint is defined.
So to discover a ERIS block store, a client first does a request to /.well-known/core:
REQ: GET /.well-known/core
RES: 2.05 Content
</eris/>;if="http://purl.org/eris/coap",
</blocks/sub-stores/12312312/>;if="http://purl.org/eris/coap"
This returns two block stores one at /eris and one at /block/sub-store/12331231/. http:/purl.org/eris/coap would link to the document that defines the ERIS CoAP block store.
Now, IMHO, it is ok if the endpoint to get a block is:
/eris/blocks/H77AGSYKAVTQPUHODJTQA7WZPTWGTTKLRB2GLMF5H53NEKFJ3FUQ/
or
/eris/blocks??H77AGSYKAVTQPUHODJTQA7WZPTWGTTKLRB2GLMF5H53NEKFJ3FUQ
I have a slight preference for the path vs query-option, but it's minor.
I think what you were suggesting is more like:
/eris/H77AGSYKAVTQPUHODJTQA7WZPTWGTTKLRB2GLMF5H53NEKFJ3FUQ/
or
/eris?H77AGSYKAVTQPUHODJTQA7WZPTWGTTKLRB2GLMF5H53NEKFJ3FUQ
I'm in favor of the top as it allows a bit more extensibility. We can add paths for block storage management and syncing, e.g.: /eris/filter or /eris/quota.
I figured that with CoRE it wasn't possible to put a link in /.well-known/core and specify that there are more paths behind it (the blocks), but it would be proper to say there is an explicit path that can be queryied for blocks.
I want to be able to add /eris/filter and /eris/quota, what I mean is that there is no /eris/blocks/H77AGSYKAVTQPUHODJTQA7WZPTWGTTKLRB2GLMF5H53NEKFJ3FUQ rather /eris/blocks?H77AGSYKAVTQPUHODJTQA7WZPTWGTTKLRB2GLMF5H53NEKFJ3FUQ.
I figured that with CoRE it wasn't possible to put a link in
/.well-known/coreand specify that there are more paths behind it (the blocks), but it would be proper to say there is an explicit path that can be queryied for blocks.
Ah, I see. I assumed that it is possible to specify a top-path where resources are sub-paths. But I think you're right and it is more proper to indicate a complete path and every resource individually.
what I mean is that there is no /eris/blocks/H77AGSYKAVTQPUHODJTQA7WZPTWGTTKLRB2GLMF5H53NEKFJ3FUQ rather /eris/blocks?H77AGSYKAVTQPUHODJTQA7WZPTWGTTKLRB2GLMF5H53NEKFJ3FUQ.
Ok, makes sense now.
I want to be able to add /eris/filter and /eris/quota
These would be additional entries in the list returned by .well-known/core? If discovery even makes sense, probably no reason to make the qoota endpoint discoverable.
I might have had a slightly different peer-discover in mind. Use cases:
- Indicate the CoAP block store in a XMPP profile. This is to indicate that blocks of content published by this account can probably be dereferenced from this block store.
- In a Metalink file that specifies multiple URLs and a ERIS URN for a file (see #6).
- In an end-user application where a CoAP block store can be specified to get/put blocks.
In all cases it would be nice if a single URL suffices and the resources /blocks, /filter etc. can be assumed to be relative to the specified URL.
In the last case the URL might be a capability that allows a certain amount of blocks to be stored (e.g. coap+tcp://my-block-store.net/SECRET-THAT-ALLOWS-ME-TO-STORE-STUFF/).
For those use cases it would be nice to specify one "store URL".
In all cases it would be nice if a single URL suffices and the resources /blocks, /filter etc. can be assumed to be relative to the specified URL.
Yes, I think we should let the URL prefix be arbitrary for where /blocks are, if we understand each other correctly.
In all cases it would be nice if a single URL suffices and the resources /blocks, /filter etc. can be assumed to be relative to the specified URL.
Yes, I think we should let the URL prefix be arbitrary for where
/blocksare, if we understand each other correctly.
Yup, I think we agree on that.
What I would additionally like is to give the prefix a name. E.g.:
Store URL
The ERIS CoAP Store URL is an absolute URL. All resource endpoints defined for an ERIS CoAP store are defined relative to the store URL. For example if the store URL is
coap+tls://discordia.net/stores/1312/then the blocks endpoint is located atcoap+tls://discordia.net/stores/1312/blocks.A single host may host mutliple ERIS CoAP stores.
The ERIS CoAP Store URL is a convenient way to share the location of all store functionality and may be used in end-user applications or protocols to share locations of stores.
For the purposes of multicast requests we may want a common URL path for requesting blocks, so that a request for a block can be made directly at a multicast address rather than making a request to /.well-known/core and then parsing responses for other ERIS nodes. I need to read the specs again but I think we can have a dedicated multicast group (or something like that) to dispatch /blocks in, and that would essentially give us a dedicated namespace.
6c7e138349
to a03cc88a0a
I've made some edits and pushed to a7cfe693c8. See diff and rendered view
Changes:
- Introduce a store URL concept. Resources (such as
blocks) are defined relative to the store URL. Store URL can be capabilities that handle authorization and quota. - Add a
.well-known/erisstore. - Add examples to the
GETandPUTrequests on blocks. - Add note on bi-directionality of CoAP
- Move security notes to a section "Security Considerations"
@emery: wdyt?
@pukkamustard Good by me.
Merged with a7cfe693c8
Pull request closed
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?