@@ -2435,9 +2435,21 @@ request.
24352435
24362436A third-party Directory Service is a back-end service used to federate
24372437multiple OCM Servers and facilitate the Invite flow. It is expected to
2438- expose, via anonymous HTTPS GET, a signed JWS document [RFC7515], where
2439- the signing key MUST be made available offline and the payload MUST
2440- adhere to the following format :
2438+ expose, via anonymous HTTPS GET, a signed JWS document [RFC7515] using
2439+ the Flattened JWS JSON Serialization. The corresponding public
2440+ verification key MUST be distributed out of band. The private signing
2441+ key MUST remain confidential.
2442+
2443+ The JWS Protected Header MUST contain an `alg` value of `ES256`.
2444+ Producers MUST use ES256 to sign the document, and consumers MUST
2445+ support ES256 and reject any other algorithm. As required by the JWS
2446+ JSON Serialization, the values of the `protected`, `payload`, and
2447+ ` signature` members are Base64url-encoded strings. They are not JSON
2448+ objects. Consumers MUST verify the signature before interpreting the
2449+ decoded payload.
2450+
2451+ After Base64url decoding, the `payload` value MUST be a UTF-8 encoded
2452+ JSON object that adheres to the following format :
24412453
24422454* REQUIRED: `federation` - a human-readable name for the list of OCM
24432455 Servers exposed by the Directory Service
@@ -2453,33 +2465,48 @@ adhere to the following format:
24532465 - MUST NOT include userinfo, query, or fragment
24542466 - REQUIRED : ` displayName` - a human-readable name
24552467 for the OCM Server
2456- Example :
2468+
2469+ The following is an example of the decoded JWS payload. It is shown
2470+ before Base64url encoding so that its structure is readable :
2471+
2472+ ~~~
2473+ {
2474+ " federation " : " The ScienceMesh Directory" ,
2475+ " servers " : [
2476+ {
2477+ " url " : " https://ocm-server.example.org" ,
2478+ " displayName " : " OCM Server 1"
2479+ },
2480+ {
2481+ " url " : " https://ocm-server.example.com:4443" ,
2482+ " displayName " : " OCM Server 2"
2483+ },
2484+ {
2485+ " url " : " http://192.168.1.1:8080" ,
2486+ " displayName " : " OCM Server 3"
2487+ }
2488+ ]
2489+ }
2490+ ~~~
2491+ {: type="json"}
2492+
2493+ The document returned by the Directory Service has the following wire
2494+ format. Placeholder values are used to keep the encoded content
2495+ readable in this specification :
24572496
24582497~~~
24592498{
2460- " payload " : {
2461- " federation " : " The ScienceMesh Directory" ,
2462- " servers " : [
2463- {
2464- " url " : " https://ocm-server.example.org" ,
2465- " displayName " : " OCM Server 1"
2466- },
2467- {
2468- " url " : " https://ocm-server.example.com:4443" ,
2469- " displayName " : " OCM Server 2"
2470- },
2471- {
2472- " url " : " http://192.168.1.1:8080" ,
2473- " displayName " : " OCM Server 3"
2474- }
2475- ]
2476- },
2477- " protected " : {"alg": "ES256"},
2478- " signature " : " ..."
2499+ " payload " : " <base64url-encoded UTF-8 JSON payload>" ,
2500+ " protected " : " eyJhbGciOiJFUzI1NiJ9" ,
2501+ " signature " : " <base64url-encoded ES256 signature>"
24792502}
24802503~~~
24812504{: type="json"}
24822505
2506+ The `protected` value above is the Base64url encoding of
2507+ ` {"alg":"ES256"}` . The `payload` value contains the Base64url encoding
2508+ of the UTF-8 representation of the decoded payload shown above.
2509+
24832510
24842511# Appendix D: Object models
24852512
0 commit comments