Repository navigation
Expand file tree
/
Copy pathspec.yaml
More file actions
2122 lines (2119 loc) · 83.6 KB
/
Copy pathspec.yaml
File metadata and controls
2122 lines (2119 loc) · 83.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.3
info:
title: Open Cloud Mesh API
description: >
Open Cloud Mesh OpenAPI Specification.
The semantic of the Protocol Specification is detailed in the OCM Internet-Draft document
published at the [IETF Datatracker](https://datatracker.ietf.org/doc/draft-ietf-ocm-open-cloud-mesh).
version: 1.5.0
x-logo:
url: logo.png
servers:
- url: https://{ocm_endpoint}
description: >
The root of the Open Cloud Mesh API, dynamically resolved by taking the `endpoint`
value returned by the Discovery endpoint.
variables:
ocm_endpoint:
default: cloud.example.org/ocm
paths:
/.well-known/ocm:
servers:
- url: https://cloud.example.org
description: The origin used for OCM API discovery.
get:
summary: Discovery endpoint
description: >
Following [RFC8615], this endpoint returns the properties and
capabilities offered by an OCM Server. See [OCM API Discovery](https://datatracker.ietf.org/doc/html/draft-ietf-ocm-open-cloud-mesh#ocm-api-discovery)
for more details.
responses:
"200":
description: The API endpoint, version, public key, and capabilities of this OCM
Server
content:
application/json:
schema:
$ref: "#/components/schemas/Discovery"
/mls/key-packages:
get:
summary: Retrieve an MLS KeyPackage for a user
description: >
Returns MLS KeyPackages for a user as defined by
[KeyPackage Distribution](https://datatracker.ietf.org/doc/html/draft-ietf-ocm-mls-federated-groups#keypackage-distribution).
This path is relative to the OCM endpoint returned by discovery; for
example, an endpoint of `https://cloud.example.org/ocm` resolves this
path to `https://cloud.example.org/ocm/mls/key-packages`.
The request and successful response MUST use HTTP Message Signatures
according to that specification.
parameters:
- name: userId
in: query
required: true
description: Full OCM Address of the user whose KeyPackage is requested.
schema:
$ref: "#/components/schemas/OCMAddress"
example: [email protected]
- name: senderDomain
in: query
required: true
description: OCM Server Address of the requesting server.
schema:
$ref: "#/components/schemas/OCMServerAddress"
example: requester.example.org
responses:
"200":
description: A signed response containing KeyPackages for the user.
headers:
Content-Digest:
required: true
description: RFC 9530 digest of the response body.
schema:
type: string
Signature-Input:
required: true
description: RFC 9421 response signature input.
schema:
type: string
Signature:
required: true
description: RFC 9421 response signature.
schema:
type: string
content:
application/json:
schema:
$ref: "#/components/schemas/KeyPackageResponse"
"400":
description: Missing or invalid query parameters.
content:
application/json:
schema:
$ref: "#/components/schemas/400"
"401":
description: The request signature is missing, invalid, or replayed.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: The verified sender is not permitted by local policy.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"429":
description: The requester has exceeded the KeyPackage request limit.
headers:
Retry-After:
description: Time to wait before making another request.
schema:
type: string
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/mls/ratchet-tree:
get:
summary: Retrieve the ratchet tree of an MLS group epoch
description: >
Returns the ratchet tree of one epoch of a federated group, as defined by
[Group State Retrieval](https://datatracker.ietf.org/doc/html/draft-ietf-ocm-mls-federated-groups#group-state).
Served by Admin Servers to the Member Server that received a Welcome for
that epoch, and to any other server named in a leaf credential of that
epoch's tree. This path is relative to the OCM endpoint returned by
discovery. The request and successful response MUST use HTTP Message
Signatures according to that specification.
parameters:
- name: mlsGroupId
in: query
required: true
description: Base64url-encoded MLS group_id without padding.
schema:
type: string
example: UmVzZWFyY2hHcm91cA
- name: epoch
in: query
required: true
description: Epoch whose ratchet tree is requested.
schema:
type: integer
format: int64
minimum: 0
example: 42
- name: senderDomain
in: query
required: true
description: OCM Server Address of the requesting server.
schema:
$ref: "#/components/schemas/OCMServerAddress"
example: requester.example.org
responses:
"200":
description: A signed response containing the ratchet tree.
headers:
Content-Digest:
required: true
description: RFC 9530 digest of the response body.
schema:
type: string
Signature-Input:
required: true
description: RFC 9421 response signature input.
schema:
type: string
Signature:
required: true
description: RFC 9421 response signature.
schema:
type: string
content:
application/json:
schema:
$ref: "#/components/schemas/RatchetTreeResponse"
"400":
description: Missing or invalid query parameters.
content:
application/json:
schema:
$ref: "#/components/schemas/400"
"401":
description: The request signature is missing, invalid, or replayed.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"404":
description: >
The epoch is not retained, or the verified sender is not named in a
leaf credential of that epoch's tree. The two cases are deliberately
indistinguishable.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"429":
description: The requester has exceeded the request limit.
headers:
Retry-After:
description: Time to wait before making another request.
schema:
type: string
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/mls/commits:
get:
summary: Retrieve missed Commits of an MLS group
description: >
Returns the Commits of a federated group sent in the given epoch and
later, in epoch order, as defined by
[Group State Retrieval](https://datatracker.ietf.org/doc/html/draft-ietf-ocm-mls-federated-groups#group-state).
Served by Admin Servers to servers named in a leaf credential of the
tree of epoch `from`. The sequence ends at the latest Commit the server
holds or at the Commit removing the requester's last leaf; the server
MAY stop after any entry, and the requester repeats the request from
the epoch following the last entry. An empty `commits` array means the
requester is current. This path is relative to the OCM endpoint
returned by discovery. The request and successful response MUST use
HTTP Message Signatures according to that specification.
parameters:
- name: mlsGroupId
in: query
required: true
description: Base64url-encoded MLS group_id without padding.
schema:
type: string
example: UmVzZWFyY2hHcm91cA
- name: from
in: query
required: true
description: >
Epoch in which the first requested Commit was sent, that is, the
requester's current epoch.
schema:
type: integer
format: int64
minimum: 0
example: 42
- name: senderDomain
in: query
required: true
description: OCM Server Address of the requesting server.
schema:
$ref: "#/components/schemas/OCMServerAddress"
example: requester.example.org
responses:
"200":
description: A signed response containing the Commits.
headers:
Content-Digest:
required: true
description: RFC 9530 digest of the response body.
schema:
type: string
Signature-Input:
required: true
description: RFC 9421 response signature input.
schema:
type: string
Signature:
required: true
description: RFC 9421 response signature.
schema:
type: string
content:
application/json:
schema:
$ref: "#/components/schemas/CommitsResponse"
"400":
description: Missing or invalid query parameters.
content:
application/json:
schema:
$ref: "#/components/schemas/400"
"401":
description: The request signature is missing, invalid, or replayed.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"404":
description: >
Epoch `from` is not retained, or the verified sender is not named in
a leaf credential of that epoch's tree. The two cases are
deliberately indistinguishable.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"429":
description: The requester has exceeded the request limit.
headers:
Retry-After:
description: Time to wait before making another request.
schema:
type: string
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/shares:
post:
summary: Share Creation Notification endpoint
description: >
This endpoint is used by a Sending Server to notify a Receiving Server that
a new Share has been created. See [Share Creation Notification](https://datatracker.ietf.org/doc/html/draft-ietf-ocm-open-cloud-mesh#share-creation-notification)
for more details.
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/NewShare"
description: The JSON object to create a new share at the consumer side.
required: true
responses:
"201":
description: >
Consumer successfully received the share. The response might contain
the display name of the recipient of the share for general user
experience improvement.
content:
application/json:
schema:
type: object
properties:
recipientDisplayName:
type: string
description: >
Display name of the recipient
example: John Doe
recipientPublicKeys:
type: array
items:
type: string
description: >
The public key(s) of the recipient. This value MUST be provided
in case the Share Creation Notification includes the `ssh` protocol.
"400":
description: >
Bad request due to invalid parameters, e.g. when `shareWith` is not
found or required properties are missing.
content:
application/json:
schema:
$ref: "#/components/schemas/400"
"401":
description: Sender cannot be authenticated as a trusted service.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Sender is not authorized to create shares.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"501":
description: The Receiver doesn't support incoming external shares, the share
type or the resource type is not supported.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"503":
description: The Receiver is temporary unavailable (e.g. due to planned
maintenance).
headers:
Retry-After:
description: >
Indication for the client when the service could be requested
again in HTTP Date format as used by the Internet Message
Format [RFC5322] (e.g. `Wed, 21 Oct 2015 07:28:00 GMT`) or the
number of seconds (e.g. 3000 if you the service is expected to
be available again within 50 minutes).
schema:
type: string
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/notifications:
post:
summary: General Notification endpoint
description: >
Notifications and requests concerning Resources, Collections, Recipients
or Federation membership.
See [Notifications](https://datatracker.ietf.org/doc/html/draft-ietf-ocm-open-cloud-mesh#notifications)
for details.
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/NewNotification"
examples:
requestShare:
summary: A recipient requests shares from a collection
value:
notificationType: REQUEST_SHARE
resourceType: collection
shareType: user
senderDomain: alice.example.org
collectionId: research-data-123
notification:
collection:
owner: [email protected]
shareWith: [email protected]
permissions:
- read
contactWasRemoved:
summary: A user removed a single contact
value:
notificationType: CONTACT_REMOVED
shareType: user
senderDomain: alice.example.org
notification:
message: User is not a trusted contact any longer
user:
userId: [email protected]
targetUserId: [email protected]
shareWasAccepted:
summary: A recipient accepted a share
value:
notificationType: SHARE_ACCEPTED
resourceType: file
shareType: user
senderDomain: sender.example.org
notification:
message: Recipient accepted the share
file:
providerId: 7c084226-d9a1-11e6-bf26-cec0c932ce01
shareWasUnshared:
summary: A provider removed a share
value:
notificationType: SHARE_UNSHARED
resourceType: file
senderDomain: sender.example.org
notification:
file:
providerId: 7c084226-d9a1-11e6-bf26-cec0c932ce01
userLeft:
summary: A user left the sending server
value:
notificationType: USER_REMOVED
shareType: user
senderDomain: alice.example.org
notification:
message: User left the system
user:
userId: [email protected]
mlsWelcome:
summary: MLS Welcome envelope (illustrative content)
value:
notificationType: MLS_WELCOME
shareType: community
senderDomain: cloud.example.org
notification:
community:
mlsGroupId: 51dc30ddc473d43a6011e9ebba6ca770
userId: [email protected]
content: base64 MLS welcome
customType:
summary: An implementer-defined notification type
value:
notificationType: EXAMPLE_CUSTOM_EVENT
resourceType: file
senderDomain: sender.example.org
notification:
message: Something happened
file:
customKey: customValue
ocmServerWasAdded:
summary: An OCM server was added to a federation
value:
notificationType: OCM_SERVER_ADDED
resourceType: federation
senderDomain: ocm-server.example.org
notification:
message: Your OCM Server is now part of our federation
federation:
federationId: sciencemesh
name: The ScienceMesh Directory
url: https://cloud.example.org
ocmServerLeft:
summary: An OCM server left a federation
value:
notificationType: OCM_SERVER_REMOVED
resourceType: federation
senderDomain: ocm-server.example.org
notification:
message: We are leaving this federation
federation:
federationId: sciencemesh
name: The ScienceMesh Directory
url: https://ocm-server.example.org
description: The JSON object with a new notification
required: true
responses:
"201":
description: >
Notification accepted. The response has no body. Receipt does
not guarantee a state change or distributed completion.
"400":
description: >
Invalid notification envelope or malformed payload for a known
notification type.
content:
application/json:
schema:
$ref: "#/components/schemas/400"
"401":
description: Requestor cannot be authenticated.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Requestor is not authorized to send notifications.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"404":
description: >
The notification refers to a missing target (share, user, etc.), or the requestor
does not have rights to access it.
"501":
description: >
Notifications or the requested operation are not implemented
by the receiver.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"503":
description: >
The receiver is temporary unavailable (e.g. due to planned
maintenance).
headers:
Retry-After:
description: >
Indication for the client when the service could be requested
again in HTTP Date format as used by the Internet Message Format
[RFC5322] (e.g. `Wed, 21 Oct 2015 07:28:00 GMT`) or the number
of seconds (e.g. 3000 if you the service is expected to be
available again within 50 minutes).
schema:
type: string
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/invite-accepted:
post:
summary: Invitation Acceptance endpoint
description: >
This optional endpoint is used to inform the Sender that an Invitation was accepted.
See [Invite flow](https://datatracker.ietf.org/doc/html/draft-ietf-ocm-open-cloud-mesh#invite-flow)
for more details.
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/AcceptedInvite"
description: The JSON object to notify the OCM provider that an invite has been
accepted.
required: true
responses:
"200":
description: Invitation Acceptance Request successful (see [Invite Acceptance
Response](https://datatracker.ietf.org/doc/html/draft-ietf-ocm-open-cloud-mesh#invite-acceptance-response-details))
content:
application/json:
schema:
$ref: "#/components/schemas/AcceptedInviteResponse"
"400":
description: The Invitation Token is invalid or does not exist (see [Invite
Acceptance
Response](https://datatracker.ietf.org/doc/html/draft-ietf-ocm-open-cloud-mesh#invite-acceptance-response-details))
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: Invite Receiver OCM Server is not trusted to accept this Invite
(see [Invite Acceptance
Response](https://datatracker.ietf.org/doc/html/draft-ietf-ocm-open-cloud-mesh#invite-acceptance-response-details))
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"409":
description: Invitation already accepted (see [Invite Acceptance
Response](https://datatracker.ietf.org/doc/html/draft-ietf-ocm-open-cloud-mesh#invite-acceptance-response-details))
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
components:
parameters:
id:
name: id
in: path
description: Unique ID to identify the share at the consumer side.
required: true
schema:
type: string
page:
name: page
in: query
required: false
description: >
Default parameter to handle paging through collections. However, this
parameter is NOT mandatory, as clients should use the HAL navigation
links (e.g. `_links.next.href`) to paginate. These links enable the
possibility to use vendor specific pagination.
schema:
type: integer
default: 1
schemas:
"400":
type: object
allOf:
- $ref: "#/components/schemas/Error"
- properties:
validationErrors:
type: array
items:
type: object
properties:
name:
type: string
example: shareWith
message:
type: string
description: >
A validation error message which is understandable for
both humans and machines (e.g. no use of special
characters) providing more information on the cause of the
validation error.
example: NOT_FOUND
Error:
type: object
required:
- message
properties:
message:
type: string
description: >
An error message which is understandable for both humans and
machines (e.g. no use of special characters) providing more
information on the cause of the error.
example: RESOURCE_NOT_FOUND
KeyPackageEntry:
type: object
required:
- mediaType
- encoding
- content
properties:
mediaType:
type: string
enum:
- message/mls
example: message/mls
encoding:
type: string
enum:
- base64url
example: base64url
content:
type: string
description: Base64url-encoded MLS KeyPackage without padding.
example: ZXhhbXBsZS1tbHMta2V5LXBhY2thZ2U
KeyPackageResponse:
type: object
required:
- userId
- keyPackages
properties:
userId:
allOf:
- $ref: "#/components/schemas/OCMAddress"
description: Full OCM Address of the user represented by the KeyPackages.
example: [email protected]
keyPackages:
type: array
items:
$ref: "#/components/schemas/KeyPackageEntry"
RatchetTreeResponse:
type: object
required:
- mlsGroupId
- epoch
- ratchetTree
properties:
mlsGroupId:
type: string
description: Base64url-encoded MLS group_id without padding.
example: UmVzZWFyY2hHcm91cA
epoch:
type: integer
format: int64
minimum: 0
description: Epoch whose ratchet tree is returned.
example: 42
ratchetTree:
type: object
required:
- encoding
- content
properties:
encoding:
type: string
enum:
- base64url
example: base64url
content:
type: string
description: >
Base64url-encoded TLS serialisation of the ratchet_tree value
defined in RFC 9420 Section 12.4.3.3, without padding.
example: ZXhhbXBsZS1yYXRjaGV0LXRyZWU
CommitEntry:
type: object
required:
- epoch
- content
properties:
epoch:
type: integer
format: int64
minimum: 0
description: Epoch in which the Commit was sent.
example: 42
proposals:
type: array
description: >
Base64url-encoded MLS PublicMessages carrying the proposals the
Commit covers by reference, in the order of the references in the
Commit. Present whenever the Commit covers at least one proposal
by reference.
items:
type: string
example: ZXhhbXBsZS1tbHMtcHJvcG9zYWw
content:
type: string
description: Base64url-encoded MLS PublicMessage carrying the Commit.
example: ZXhhbXBsZS1tbHMtY29tbWl0
CommitsResponse:
type: object
required:
- mlsGroupId
- commits
properties:
mlsGroupId:
type: string
description: Base64url-encoded MLS group_id without padding.
example: UmVzZWFyY2hHcm91cA
commits:
type: array
description: Commits in increasing epoch order, without gaps.
items:
$ref: "#/components/schemas/CommitEntry"
Discovery:
type: object
required:
- enabled
- apiVersion
- endPoint
- resourceTypes
properties:
enabled:
type: boolean
description: Whether the OCM service is enabled at this endpoint
apiVersion:
type: string
description: The OCM API version this endpoint supports
example: 1.5.0
endPoint:
type: string
description: The URI of the OCM API available at this endpoint
example: https://cloud.example.org/ocm
provider:
type: string
description: A friendly branding name of this endpoint
example: MyCloudStorage
resourceTypes:
type: array
description: |
A list of all supported resource types with their access protocols.
Each resource type is identified by its `name`: the list MUST NOT
contain more than one resource type object per given `name`.
items:
type: object
properties:
name:
type: string
description: >
A supported resource type (file, calendar, contact, ...).
Implementations MUST offer support for at least one resource type,
where `file` is the commonly supported one.
Each resource type is identified by its `name`: the list MUST NOT
contain more than one resource type object per given `name`.
Other values are to be registered in the "OCM Resource Types"
registry (see the IANA Considerations section of the OCM
Internet-Draft).
example: file
shareTypes:
type: array
description: |
The supported recipient share types.
MUST contain `"user"` at a minimum, plus optionally
`"group"` and `"community"`.
items:
type: string
enum:
- user
- group
- community
example:
- user
protocols:
type: object
description: >
The supported protocols to access shared resources at this endpoint.
Implementations MUST support at least `webdav` for `file` resources,
any other combination of resources and protocols is optional.
properties:
webdav:
type: string
description: >
The top-level WebDAV path at this endpoint. In order to access
a remote shared resource, implementations SHOULD use this path
as a prefix (see sharing examples).
webdav-receive:
type: object
required:
- uri
description: >
Implementations that support receiving WebDAV shares SHOULD
advertise them here. Note though that older implementations MAY
not support this property.
properties:
uri:
type: string
description: >
This property signals that this endpoint is capable of
receiving `webdav` shares with the given URI format.
The value MUST be either `"absolute"` or `"relative"`.
enum:
- absolute
- relative
webapp:
type: object
description: >
Implementations that support sending WebApp shares MUST advertise
them here, with an empty object as value.
webapp-receive:
type: object
required:
- targets
description: >
Implementations that support receiving WebApp shares MUST
advertise them here.
properties:
targets:
type: array
minItems: 1
description: >
The ways this endpoint is able to present a webapp
share to the user when acting as receiver.
- "blank" signals that this endpoint supports opening
the URI in a top-level browsing context, such as a
new window or tab, or a full page navigation in the
current window.
- "iframe" signals that this endpoint supports
embedding the URI in an iframe within its own UI,
when the Sending Server allows framing by this
receiver.
items:
type: string
enum:
- blank
- iframe
ssh:
type: string
description: >
The top-level address in the form `host:port` of an endpoint
that supports ssh and scp with a public/private key based
authentication.
ssh-receive:
type: object
description: >
Implementations that support receiving SSH shares MUST
advertise them here, with an empty object as value.
additionalProperties:
oneOf:
- type: string
- type: object
description: >
Any additional protocol supported for this resource type SHOULD
be advertised here, where the value MAY correspond to a top-level
URI to be used for that protocol, or any other relevant
attribute required for that protocol. Similarly, additional
receiving capabilities for custom protocols SHOULD be advertised.
Additional protocols are to be registered in the "OCM Protocols"
registry (see the IANA Considerations section of the OCM
Internet-Draft).
example:
webdav: /remote/dav/ocm/
webdav-receive: {
"uri": "absolute"
}
webapp: {}
webapp-receive: {
"targets": ["blank", "iframe"]
}
talk: /apps/spreed/api/
capabilities:
type: array
description: >
The optional capabilities exposed at this endpoint according to the
present specifications.
items:
type: string
enum:
- enforce-mfa
- exchange-token
- http-sig
- invites
- invite-wayf
- notifications
- protocol-object
example:
- protocol-object
- invites
- http-sig
criteria:
type: array
description: |
The criteria for accepting a Share Creation Notification.
As all Receiving Servers should require the use of TLS in API calls,
it is not necessary to expose that as a criterium.
items:
type: string
enum:
- must-use-http-sig
- must-exchange-token
- denylist
- allowlist
- must-invite
example:
- allowlist
- must-invite
jwksUri:
type: string
format: uri
description: >
Optional URL of a JWK Set document [RFC7517] containing the
public keys this OCM Server uses for HTTP Message Signatures
[RFC9421]. The URL is discovered from this field; it is not a
fixed path in the OCM API. If the `http-sig` capability is
exposed, the jwksUri MUST be advertised in the discovery
response and MUST use https, though implementations MAY fall
back to HTTP in testing setups.
example: https://cloud.example.org/ocm/jwks
tokenEndPoint:
type: string
format: uri
description: >
Optional URL of the Token Exchange endpoint hosted by the
Sending Server. The URL is discovered from this field; it is not
a fixed path in the OCM API. The Receiving Server POSTs here to
obtain a short-lived bearer token in exchange for an authorization
code (the share's `sharedSecret`), following the authorization_code
grant of [RFC6749]. If the `exchange-token` capability is exposed,
the tokenEndPoint MUST be advertised in the discovery response.
The request MUST be signed with an HTTP Message Signature
[RFC9421] by the Receiving Server. See TokenRequest and
TokenResponse for the request/response contract and the Code Flow
section of the OCM Internet-Draft for normative procedure.
**HTTP Responses:**
- 200: Token issued (application/json with TokenResponse schema)
- 400: Token denied (application/json OAuth error object with
`{ "error": "<code>" }` where code is one of invalid_request,
invalid_client, invalid_grant, unauthorized_client, or
unsupported_grant_type)
example: https://cloud.example.org/ocm/token
directoryEndPoint:
type: string
format: uri
description: >
Optional URL of the Directory Endpoint hosted by this OCM Server,
where it exposes the Federations it is a member of, along with
their membership. The URL MUST use https, though implementations
MAY fall back to HTTP in testing setups.
The presence of this field is the only signal that an OCM Server