Identify values which are an OCM Address - #244
Conversation
There was a problem hiding this comment.
I have some observations:
- if we introduce and speak about
OCM Addresses, we should define them first. - Where
fieldwas used, IMHO it is more appropriate than repeatingOCM Address
Lastly, a "nitpick": it's should really be its everywhere.
The most important point clearly is 1), I can help if you prefer.
|
Great initiative! If you rebase on develop and fix the things raised by @glpatcern I think we can merge. |
Clarify which values are OCM Addresses, so implementers know which can be used for discovery.
2428e0e to
2a4841c
Compare
|
Regarding 2., maybe it would help to mention at least once that field is an OCM Address to make it clear why it has a "FQDN part" and why it may be used for discovery? |
|
Regarding 1. I would first like to discuss where we want to go before I try to update the definition: Currently the OCM Address is defined here: https://github.com/cs3org/OCM-API/blob/develop/IETF-RFC.md?plain=1#L103
Examples of invalid OCM Addresses as of the current spec as I understand it:
Examples of valid but misleading OCM Addresses:
|
Yes, based on the context, it could be any of those.
Newer versions of Nextcloud (v29 and later) are using
Why would this be an issue? the |
Yes, but they do still accept it, effectivly allowing a downgrade of Discovery to http (which I have to admit was convenient for testing)
I agree that is not a large problem, I mostly added that for completeness, but might e.g. result in duplicated entries in contact books or issues when naively checking a Directory Service. Btw. in the Directory Service Spec the "url" is said to be the FQDN of the OCM Server which is contradictory (the example also uses the URL, not the FQDN) Please tell me if I'm too picky here, I just think being precise would help compatibility. |
Oh, didn't know they allow it. IMO that's implementation dependent, as long as they support the "Canonical" form and could be able to send/receive from other implementors
Maybe a quick note about them being same is helpful for implementors reading the I-D
I concur |
I came up with a quick edit: (Also, since it's a URL, we might also address the A third-party Directory Service is a back-end service used to federate
multiple OCM Servers and facilitate the Invite flow. It is expected to
expose, via anonymous HTTP GET, a JSON document with the following
format:
- REQUIRED: `federation` - a human-readable name for the list of OCM
Servers exposed by the Directory Service
- REQUIRED: `servers` - a JSON array of objects to describe the list
of OCM Servers with the following string fields:
- REQUIRED: `url` - an absolute HTTPS URL identifying the OCM Server. It MUST:
- include scheme `https://`
- include host (FQDN)
- MAY include a non-default port
- MUST NOT include a base path (e.g., `/ocm`)
- MUST NOT include userinfo, query, or fragment
- REQUIRED: `displayName` - a human-readable name for the OCM ServerExample: {
"federation": "The ScienceMesh Directory",
"servers": [
{
"url": "https://ocm-server-1.example.org",
"displayName": "OCM Server 1"
},
{
"url": "https://ocm-server-2.example.org:4443",
"displayName": "OCM Server 2"
}
]
}What's the opinion on this? 😄 |
Sounds good! |
@MahdiBaghbani , please create a PR with that! Indeed, the description was a "quick" text where it was given for granted that the URL should contain the FQDN of the OCM Server, and a better spelling is definitely welcome. @KrausMatthias thanks for the contribution, I still have to review it but definitely goes in the right direction. |
glpatcern
left a comment
There was a problem hiding this comment.
I think it's all good here.
What remains (and could go in a separate PR) concerns the definition of OCM Address in the Terms: what I meant in my previous comment was that we could incorporate what an OCM Address can and cannot be, following the examples you discussed. E.g. the former use of Nextcloud with the prefix is not allowed, whereas a FQDN MAY be replaced by an IP - even just for testing purposes, and the port MAY be included as well.
Yes, absolutely. I appreciate that you have "fresh eyes" and are not biased as we are (I am at least) ;-) ...
We should then mention that the string is case-INsensitive. It would match expectations with how emails etc. are used.
Yes.
Then we could go for
The latter two would become valid, and would be useful in a testing scenario.
IMHO we could recommend
Again the user is opaque, it's not a URI.
Correct, except that |
mickenordin
left a comment
There was a problem hiding this comment.
Should this then reference https://www.rfc-editor.org/rfc/rfc3986#section-3.2.2 and https://www.rfc-editor.org/rfc/rfc3986#section-3.2.3?
I guess that would conflict with it being a opaque string. Is the opaque string utf-8 or limited to ascii? I will try to add a proposal for the OCM Address description on friday. |
I have been thinking about this all day, I think this has been overlooked during previous |
Yes, good idea.
You have a point :-) And I confirm the opaqueness is to be preferred: after all, the rationale here is that the user-identifying string only makes sense within a local system, not for the remote one, and therefore a remote system must treat it as opaque (and case sensitive then). For the charset, to keep maximum flexibility we should consider UTF-8 (I guess it's already the case for Seafile, given that it's commonly deployed in China).
Very good, looking forward to it. |
In fact, that was already the case for the unit tests we run in Reva, where we spin off two Reva daemons that invite each other on |
|
@KrausMatthias apologies, with merging another PR there are now a couple of conflicts, could you please resolve them so this can be merged? Feel free to open a separate PR for the "OCM Address definition proposal". |
|
@KrausMatthias, @glpatcern I've got some time, so I tried resolving the conflict. Also moved Mattias name in contributor names in alphabetical order, please check if I missed anything. |
Following discussion in cs3org#237 and cs3org#244
Following discussion in cs3org#237 and cs3org#244
Following discussion in cs3org#237 and cs3org#244
Following discussion in cs3org#237 and cs3org#244
Following discussion in cs3org#237 and cs3org#244
* Specify the OCM Address format Following discussion in #237 and #244 * Note explicitly there might be multiple @ signs in an OCM Address * Fix to upper case UTF-8 Co-authored-by: Giuseppe Lo Presti <giuseppe.lopresti@cern.ch> * Add Opt-In http discovery as fallback for testing setups * Drop mention of omitting default ports in favor of mention in Discovery Process Co-authored-by: Giuseppe Lo Presti <giuseppe.lopresti@cern.ch> * Drop suggestion to allow http fallback only as Opt-In Co-authored-by: Giuseppe Lo Presti <giuseppe.lopresti@cern.ch> --------- Co-authored-by: Matthias Kraus <info@opengeomesh.org> Co-authored-by: Giuseppe Lo Presti <giuseppe.lopresti@cern.ch>
Clarify which values are OCM Addresses, so implementers know which can be used for discovery.
I've tried to guess all usages of OCM Addresses, maybe in some places the explicit mention might be skipped for readability.