Repository navigation
Description
remark: this issue is regarding the regarding the OCS v2 draft 1 specification. please refer to OCS v2.draft1 comments overview for further information.
alternative service discovery
the service discovery is currently based on two informations:
- the instance base URI (e.g.
https://mycloud.com/mycloud/) - the defined service discovery location
/ocs-provider/)
the former is most notably retrieved from the user, when sharing a resource entering the Federation ID of the receiving party.
there are certain disadvantages in this setting:
- the namespace
/ocs-provider/can potentially be in conflict with an existing resource - automated discovery of the provider service list is not possible, e.g. based on the recipient's e-mail address.
existing services (calDAV, SPF, domainkey) do already provide solutions for this, using mainly two approaches:
- DNS based service locating
/.well-knownURL based service locating
the DNS approach has the advantage, that no tcp connection needs to be established and the results can be cached easily. the well-known approach has the advantage of providing more information, even an already established ressource /.well-known/host-meta[.json] (RFC 6415) might be used.
the disadvantage of both approaches is, that shared server hosting usually would not support such means. yet i think it would still make sense to implement such an approach in order to enable more flexibility for the implementation at well-established service providers (e.g. dropbox).
DNS SRV resource record
I would suggest a similar procedure as it is used for CalDAV and CardDAV as described in RFC 6764. it should be discussed, if the SRV record is useful. then a
_ocs._tcp SRV 0 1 443 mycloud.com
entry would be suggested (since OCS requires TLS, _ocss could also be used. RFC 6764 describes in section 6.3 that TXT records MUST be looked up if a SRV record was found. i would suggest, that this should be done even if we support SRV in the specification, but the entry is not found.
DNS TXT ressource record
the TXT record should be located at _ocs[s].mycloud.com, e.g.
_osc.mycloud.com. 300 IN TXT "v=osc1 inst=%2Fcloud psl1=ocs-provider"
RFC 6764 suggests to have one key value pair per TXT string, while e.g. SPF does specify that all strings have to be merged into one. while the 6764 approach is elegant in the way that data has not to be encapsulated, some DNS administration tools do not provide a way to insert the strings separately. thus, the 4408 approach will be easier to implement for the user. as a consequence, the values of a key/value pair hast to be url-encoded.
i suggest the following mandatory fields:
vshowing the format version of the TXT record, following SPF conventioninstis either- the base url of the cloud (which would be extracted in the Federation ID) and MUST start with either
/(%2F) when the standard https port (443) is used, or:{port}/(%3A[0-9]+%2F) when a custom port ([0-9]+) is used
- or an single
@when the record represents the e-mail domain.
- the base url of the cloud (which would be extracted in the Federation ID) and MUST start with either
psl{version}is pointing to the Provider Service List/Locator, with the given version ([0-9]*). if{version}is omitted, the PSL will provide the information on available versions and their respective location (to be defined in the specification). the value of this field MUST start with eitherhttps://(https%3A%2F%2F) in case the SL is on a different host,/(%2F) when the same port as the current connection is used, but the path given is absolute:{port}/(%3A[0-9]+%2F) when a different port ([0-9]+) is used (path will be absolute as well).- in any other case, the value is considered to be relative to the SL containing directory.
in case of the mail-instance, the supplied PSL should provide a function to map the e-mail address to a cloud-username. how this is done, needs to be specified. if it is not possible using the same PSL as for the actual service discovery, a separate UM (user mapper, um{version}) needs to be introduced and used instead of the psl{version} entry in the TXT record. this UM needs to return the e-mail address as received if the address cannot be mapped or is invalid in order to not be able to get any information. it would also be possible to return an symmetric encrypted user string which will then be decrypted by the server when the share is offered. in such a way even less information is exposed.
Well-Known URI
if a TXT record cannot be found, either .well-known/ocs-provider/ (which would have to be registered SHOULD be consulted. the content of this document could be either equivalent to a list of TXT records (one record per line) or in JSON/XML format (to be defined).
Activity
[-]OCS v2.draft1: alternate service discovery[/-][+]OCS v2.draft1: alternative service discovery[/+]LukasReschke commentedon Mar 1, 2016
Subscribing myself here.
DeepDiver1975 commentedon Jan 27, 2017
To some extend the API specification is continued here: https://github.com/GEANT/OCM-API
lock commentedon Aug 3, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.