forked from orifinkelman-zz/cdni-extensions
-
Notifications
You must be signed in to change notification settings - Fork 1
/
draft-finkelman-cdni-triggers-sva-extensions.xml
2084 lines (1760 loc) · 84.5 KB
/
draft-finkelman-cdni-triggers-sva-extensions.xml
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
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="4"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<rfc category="std" docName="draft-finkelman-cdni-triggers-sva-extensions-05" updates='8007' ipr="trust200902">
<front>
<title abbrev="CDNI Control Interface / Triggers Extensions">CDNI Control Triggers Interface Extensions</title>
<author fullname="Ori Finkelman" initials="O." surname="Finkelman">
<organization>Qwilt</organization>
<address>
<postal>
<street>6, Ha'harash</street>
<city>Hod HaSharon</city>
<region></region>
<code>4524079</code>
<country>Israel</country>
</postal>
<phone></phone>
<email>ori.finkelman.ietf@gmail.com</email>
</address>
</author>
<author fullname="Sanjay Mishra" initials="S." surname="Mishra">
<organization>Verizon</organization>
<address>
<postal>
<street>13100 Columbia Pike</street>
<city>Silver Spring</city>
<region>MD</region>
<code>20904</code>
<country>USA</country>
</postal>
<phone></phone>
<email>sanjay.mishra@verizon.com</email>
</address>
</author>
<author fullname="Nir B. Sopher" initials="N.B." surname="Sopher">
<organization>Qwilt</organization>
<address>
<postal>
<street>6, Ha'harash</street>
<city>Hod HaSharon</city>
<region></region>
<code>4524079</code>
<country>Israel</country>
</postal>
<phone></phone>
<email>nir@apache.org</email>
</address>
</author>
<date/>
<abstract>
<t>
This document updates RFC 8007 to include generic extensions and more
granular content matching options, required by the Open Caching architecture.
The Open Caching architeccture is a use case of Content Delivery Network
Interconnection (CDNI) in which the commercial Content Delivery Network (CDN) is
the upstream CDN (uCDN) and the ISP caching layer serves as the downstream
CDN (dCDN). This document defines extensions to the Content Delivery Network
Interconnection (CDNI) Control Interface/Triggers. These extensions are derived
from requirements raised by Open Caching architecture but are also applicable
to CDNI use cases in general.</t>
</abstract>
<note title="Requirements Language">
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in <xref
target="RFC2119">RFC 2119</xref>.</t>
</note>
</front>
<middle>
<section title="Introduction">
<t>The Streaming Video Alliance <xref target="SVA" format="default"/> is a global association
that works to solve streaming video challenges in an effort to improve end-user experience
and adoption. The Open Caching Working Group <xref target="OCWG" format="default"/> of the
Streaming Video Alliance <xref target="SVA" format="default"/> is focused on the delegation
of video delivery requests from commerical CDNs to a caching layer at the ISP's network.
Open Caching architecture is a specific use case of CDNI where the commercial CDN is the
upstream CDN (uCDN) and the ISP caching layer is the downstream CDN (dCDN). The Open
Caching Content Management Operations Specification <xref target="OC-CM" format="default"/>
defines objects and extensions required by Open Caching architecture for granular content
management operations such as new content selection options.
This document defines the objects and extensions required for granular content management
operations. For that purpose it extends CDNI Control Interface / Triggers <xref target="RFC8007"/>
by adding new content selection options to the trigger specification and specifying a generic
extension mechanism that enables adding future functions for controlling the trigger execution.
This document also defines and initial set of extension objects. This document gives examples
for the extensions specified herein, for complete examples of the trigger interface usage see
Section 6 of <xref target="RFC8007"/>.
</t>
<t>The CDNI Metadata Interface is described in <xref target="RFC8006"/>.</t>
<t>The CDNI Footprint and Capability Interface is described in <xref target="RFC8008"/>.</t>
<t>The CDNI Control Interface / Triggers is described in <xref target="RFC8007"/>.</t>
<t>For consistency with other CDNI documents, this document follows the CDNI convention
of uCDN (upstream CDN) and dCDN downstream CDN) to represent the commercial CDN and
ISP caching layer, respectively.</t>
<section anchor="terminology" title="Terminology">
<t>This document reuses the terminology defined in <xref target="RFC6707"/>,
<xref target="RFC8006"/>, <xref target="RFC8007"/>, and <xref target="RFC8008"/>.</t>
<t>Additionally, the following terms are used throughout this document
and are defined as follows:</t>
<t><list style="symbols">
<t>HLS - HTTP Live Streaming</t>
<t>DASH - Dynamic Adaptive Streaming Over HTTP</t>
<t>MSS - Microsoft Smooth Streaming</t>
</list></t>
</section>
<section anchor="structure" title="Structure of this document">
<t>
The remainder of this document is organized as follows:
</t>
<t><list style="symbols">
<t><xref target="overview"/> gives an overview of the extensions specified in this document.</t>
<t><xref target="cit-version-v2"/> specifies version 2 of the CDNI Control Interface / Triggers. </t>
<t><xref target="trigger-extension-objects"/> specifies an initial set of trigger extension objects.</t>
<t><xref target="footprint-and-capabilities"/> specifies Footprint and Capability objects for CI/T version
and extensions.</t>
<t><xref target="IANA"/> list the IANA considerations of this document.</t>
<t><xref target="Security"/> describes the security considerations for the specified properties and extensions.</t>
</list></t>
</section>
</section>
<section anchor="overview" title="Interfaces Extensions Overview">
<t>
This document defines extensions for the CDNI Control Interface / Triggers (CI/T) <xref target="RFC8007"/>
and defines FCI objects as per the CDNI Footprint and Capabilities Interface <xref target="RFC8008"/>.
</t>
<section title="CDNI Control Interface / Triggers Extensions">
<section title="CI/T Objects">
<t>
This document specifies version 2 of the CI/T commands and objects.
In this context the CI/T commands and objects as were specified in
<xref target="RFC8007"/> are considered to be version 1.
</t>
</section>
<section anchor="trigger-spec" title="Trigger Specification">
<t>
This document specifies version 2 of the Trigger Specification which is an enhancement of
the Trigger Specification that includes all properties as defined in Section 5.2.1 of
<xref target="RFC8007"/> as well as the additional properties required by the use cases
listed below in <xref target="content-selection"/> and <xref target="trigger-extensibility"/>.
</t>
</section>
<section anchor="content-selection" title="Content Selection">
<t>
The trigger specification as defined in Section 5.2.1 of <xref target="RFC8007"/> provides means to
select content objects by matching a full content URL or patterns with wildcards.
This document specifies two additional selection options:
</t>
<t><list style="symbols">
<t>
Regular Expression - Using regex a uCDN can create more complex rules to select the
content objects for the cases of "invalidation" and "purge". For example, purging specific
content within a specific directory path.
</t>
<t>
Content Playlist - Using video playlist files, a uCDN can trigger an operation that will
be applied to a collection of distinct media files in a format that is natural for a
streaming video content provider. A playlist may have several formats, specifically
HTTP Live Streaming (HLS) *.m3u8 manifest <xref target="RFC8216"/>, Microsoft Smooth Streaming (MSS)
*.ismc client manifest <xref target="MSS"/>, and Dynamic Adaptive Streaming over HTTP (DASH)
*.mpd file <xref target="MPEG-DASH">[ISO/IEC 23009-1:2014]</xref>.
</t>
</list></t>
</section>
<section anchor="trigger-extensibility" title="Trigger Extensibility">
<t>
The CDNI Control Interface / Triggers <xref target="RFC8007"/> defines a set of properties
and objects used by the trigger commands. In this document we define an extension mechanism
to the triggers interface that enables the application to add various functions that allow
finer control over the trigger execution. This document specifies a generic trigger extension
object wrapper for managing individual CDNI trigger extensions in an opaque manner.
</t>
<t>This document also registers CDNI Payload Types <xref target="RFC7736"/> under the namespace CIT
for the initial set of trigger extension types:
<list style="symbols">
<t>CIT.LocationPolicy (for controlling the locations in which the trigger is executed)</t>
<t>CIT.TimePolicy (for scheduling a trigger to run in a specific time window)</t>
</list>
</t>
<t>Example use cases<list style="symbols">
<t>Pre-position with cache location policy</t>
<t>Purge content with cache location policy</t>
<t>Pre-position at a specific time</t>
<t>Purge by content acquisition time (e.g. purge all content acquired in the past X hours)</t>
</list></t>
</section>
<section anchor="error-handling" title="Error Handling">
<t>
This document extends the CI/T Error Handling (see Section 4.7 of <xref target="RFC8007"/>) to support
the following:
</t>
<t><list style="symbols">
<t>
Playlists and Regexs - report errors that happened due to specific playlists and/or regexs.
</t>
<t>
Extension errors - report an error that happened due to an extension object.
</t>
<t>
Error propagation - enable the uCDN to traceback an error to the dCDN in which it occurred.
</t>
</list></t>
</section>
</section>
<section title="CDNI Footprint and Capabilities Interface Extensions">
<t>
Extending the trigger mechanism with optional properties requires the ability for the
dCDN to advertise which optional properties it supports.
</t>
<t>
The CDNI Footprint and Capabilities Interface <xref target="RFC8008"/> enables the dCDN to advertise the
capabilities it supports across different footprints. This document introduces FCI objects to support the
advertisement of these optional properties.
</t>
<t>Example use cases<list style="symbols">
<t>Trigger types: Advertise which trigger types are supported by the dCDN.
CDNI defines three trigger types (purge, invalidate, pre-position),
but it does not necessarily mean that all dCDNs support all of them.
The uCDN may prefer to work only with dCDN that support what the uCDN needs.</t>
<t>Content selection rule types: Advertise which selection types are supported.
For example, if adding content regex as a means to match on content URLs,
not all dCDN would support it. For playlist mapping, advertise which types and versions
of protocols are supported, e.g. HLS.vX/DASH.vY/MSS.vX, DASH templates.
Note that the version string or schema are protocol specific.</t>
<t>Trigger extensions: Advertise which trigger extensions object types are supported
by the dCDN.</t>
</list></t>
</section>
</section>
<section anchor="cit-version-v2" title="CI/T Version 2">
<t>
<xref target="RFC8007"/> does not define a version number and versioning scheme.
We, therefore, designate the interface and objects as defined in Section 5 of
<xref target="RFC8007"/> as version 1. The following sections define version 2 of
the CI/T objects and their properties as extensions of version 1.
</t>
<section anchor="cit-objects-v2" title="CI/T Objects V2">
<t>
Version 2 of the CI/T interface requires the support of the following objects:
</t>
<t><list style="symbols">
<t>
CI/T Commands v2: A trigger command request using the payload type ci-trigger-command.v2.
Version 2 MUST only use "trigger.v2" objects as defined in <xref target="trigger-spec-v2"/>,
instead of "trigger" objects. All other properties of the trigger command v2 are as defined
in Section 5.1.1 of <xref target="RFC8007"/>.
</t>
<t>
Trigger Status Resource v2: A trigger status resource response using the payload type
ci-trigger-status.v2. Version 2 MUST only use "trigger.v2" objects as defined in
<xref target="trigger-spec-v2"/>, instead of a "trigger" object, as well as "errors.v2"
array as defined in <xref target="error-description-v2"/>, instead of a "errors" array.
All other properties of the trigger status v2 are as defined in Section 5.1.2 of
<xref target="RFC8007"/>. The errors array "errors.v2" is a list of all errors that
occurred in any of the downstream CDNs along the execution path. When a downstream CDN,
dCDN-A, propagates a trigger to another downstream CDN, dCDN-B, it MUST also propagated
back all errors reported by dCDN-B in the trigger status resource and add them to its
own trigger status resource.
</t>
<t>
Trigger Collections: The payload type ci-trigger-collection is used with no changes
and as defined in 5.1.3 of <xref target="RFC8007"/>.
</t>
</list></t>
<t>Usage example of version 2 of trigger command</t>
<figure>
<artwork><![CDATA[
REQUEST:
POST /triggers HTTP/1.1
User-Agent: example-user-agent/0.1
Host: triggers.dcdn.example.com
Accept: */*
Content-Type: application/cdni; ptype=ci-trigger-command.v2
{
"trigger.v2": { <properties of a trigger.v2 object> },
"cdn-path": [ "AS64496:0" ]
}
RESPONSE:
HTTP/1.1 201 Created
Date: Wed, 04 May 2016 08:48:10 GMT
Content-Length: 467
Content-Type: application/cdni; ptype=ci-trigger-status.v2
Location: https://triggers.dcdn.example.com/triggers/0
Server: example-server/0.1
{
"errors.v2": [ { <properties of 1st error.v2 object> },
...,
{ <properties of Nth error.v2 object> }
],
"ctime": 1462351690,
"etime": 1462351698,
"mtime": 1462351690,
"status": "pending",
"trigger.v2": { <properties of a trigger.v2 object> }
}
]]></artwork>
</figure>
<t>Usage example of version 2 of trigger status for the trigger created in the
above trigger command example:</t>
<figure>
<artwork><![CDATA[
REQUEST:
GET /triggers/0 HTTP/1.1
User-Agent: example-user-agent/0.1
Host: triggers.dcdn.example.com
Accept: */*
RESPONSE:
HTTP/1.1 200 OK
Content-Length: 467
Expires: Wed, 04 May 2016 08:49:10 GMT
Server: example-server/0.1
ETag: "6990548174277557683"
Cache-Control: max-age=60
Date: Wed, 04 May 2016 08:48:10 GMT
Content-Type: application/cdni; ptype=ci-trigger-status.v2
{
"errors.v2": [ { <properties of 1st error.v2 object> },
...,
{ <properties of Nth error.v2 object> }
],
"ctime": 1462351690,
"etime": 1462351698,
"mtime": 1462351690,
"status": "pending",
"trigger.v2": { <properties of a trigger.v2 object> }
}
]]></artwork>
</figure>
</section>
<section anchor="error-handling-v2" title="Error Handling V2">
<t>
The CDNI CI/T interface defines a mechanism for error reporting (see Section 4.7 of <xref target="RFC8007"/>)
and an Error Description object for reporting errors (see Section 5.2.6 of <xref target="RFC8007"/>).
This document specifies version 2 of CI/T error handling in order to support the following:
</t>
<t><list style="symbols">
<t>
Extension errors - report an error that happened due to an extension object.
As extension objects are expected to be added to the interface as new requirements
comes along, it is expected that in some cases a dCDN may receive a trigger that it
cannot process or does not understand. It is essential for the trigger caller to be
able to understand when such errors occur so they can take actions to fix them.
This document adds a mechanism to report extension errors.
</t>
<t>
Error propagation - enable the uCDN to traceback an error to the dCDN in which it occurred.
CDNI triggers may be propagated over a chain of downstream CDNs. Let us take for example an
upstream (uCDN-A) CDN A that is delegating to a downstream CDN B (dCDN-B) and dCDN-B is delegating
to a downstream CDN C (dCDN-C). Triggers sent from uCDN-A to dCDN-B may be redistributed
from dCDN-B to dCDN-C and errors can happen anywhere along the path. Therefore, it might be essential for
uCDN-A that sets the trigger, to be able to trace back an error to the downstream CDN where it occurred.
This document adds a mechanism to propagate the ID of the faulty dCDN back to the uCDN by adding the CDN ID
to the error description. When a downstream dCDN-B propagates a trigger to another downstream
dCDN-C, it MUST also propagate back the errors received in the trigger status resource from dCDN-C by adding
them to the errors array in its own status resource to be sent back to the originating uCDN-A.
While propagating back the errors, and depending on the implementation, downstream dCDN-B MAY also
specify the dCDN-C CDN identifier, indicating that the error relates spefically to this CDN.
The trigger originating upstream CDN will receive an array of errors that occurred
in all the CDNs along the execution path, where each error MAY carrying its own CDN identifier.
</t>
</list></t>
</section>
<section anchor="cit-objects-properties-v2" title="Properties of CI/T Version 2 objects">
<t>
This section defines the values that can appear in the top-level
objects described in <xref target="cit-objects-v2"/>, and their encodings.
</t>
<section anchor="trigger-spec-v2" title="Trigger Specification Version 2 ">
<t>
Version 2 of the Trigger Specification adds the following properties on top
of the existing properties of the trigger specification defined in Section
5.2.1 of <xref target="RFC8007"/>.
</t>
<t><list style="empty">
<t>Property: content.regexs<list style="empty">
<t>Description: Regexs of content URLs to which the CI/T trigger command applies.</t>
<t>Type: A JSON array of RegexMatch objects (see <xref target="regex-match"/>).</t>
<t>Mandatory: No, but at least one of "metadata.*" or "content.*" MUST be present
and non-empty.</t>
</list></t>
<t>Property: content.playlists<list style="empty">
<t>Description: Playlists of content the CI/T trigger command applies to.</t>
<t>Type: A JSON array of Playlist objects (see <xref target="playlist"/>).</t>
<t>Mandatory: No, but at least one of "metadata.*" or "content.*" MUST be present
and non-empty.</t>
</list></t>
<t>Property: extensions<list style="empty">
<t>Description: Array of trigger extension data.</t>
<t>Type: Array of GenericTriggerExtension objects (see <xref target="generic-extension-object"/>).</t>
<t>Mandatory: No. The default is no extensions.</t>
</list></t>
</list></t>
<t>Example of an invalidation trigger.v2 with a list of regex objects, a list of playlist
objects, and extensions:</t>
<figure>
<artwork><![CDATA[
{
"trigger.v2": {
"type": "invalidate",
"content.regexs": [ <list of RegexMatch objects> ],
"content.playlists": [ <list of Playlist objects> ],
"extensions": [ <list of GenericTriggerExtension objects ]
},
"cdn-path": [ "AS64496:0" ]
}
]]></artwork>
</figure>
</section>
<section anchor="regex-match" title="RegexMatch">
<t>
A RegexMatch consists of a regular expression string a URI is matched against,
and flags describing the type of match. It is encoded as a JSON object with
following properties:
</t>
<t><list style="empty">
<t>Property: regex<list style="empty">
<t>Description: A regular expression for URI matching. </t>
<t>Type: A regular expression to match against the URI, i.e against the path-absolute
and the query string parameters <xref target="RFC3986"/>. The regular expression
string MUST be compatible with <xref target="PCRE841">PCRE</xref>.</t>
<t>Note: Because '\' has special meaning in JSON <xref target="RFC8259"/> as the escape
character within JSON strings, the regular expression character '\' MUST be escaped as '\\'.</t>
<t>Mandatory: Yes.</t>
</list></t>
<t>Property: case-sensitive<list style="empty">
<t>Description: Flag indicating whether or not case-sensitive matching should be used. </t>
<t>Type: JSON boolean. Either "true" (the matching is case sensitive) or "false"
(the matching is case insensitive).</t>
<t>Mandatory: No; default is case-insensitive match (i.e., a value of "false").</t>
</list></t>
<t>Property: match-query-string<list style="empty">
<t>Description: Flag indicating whether to include the query part of the URI when
comparing against the regex.</t>
<t>Type: JSON boolean. Either "true" (the full URI, including the query part,
should be compared against the regex) or "false" (the query part of the URI
should be dropped before comparison with the given regex).</t>
<t>Mandatory: No; default is "false". The query part of the URI MUST be dropped
before comparison with the given regex. This makes the regular expression simpler
and safer for cases in which the query parameters are not relevant for the match.</t>
</list></t>
</list></t>
<t>Example of a case sensitive, no query parameters, regex match against:</t>
<figure>
<artwork><![CDATA[
"^(https:\/\/video\.example\.com)\/([a-z])\/
movie1\/([1-7])\/*(index.m3u8|\d{3}.ts)$"
]]></artwork>
</figure>
<figure>
<artwork><![CDATA[
{
"regex": "^(https:\\/\\/video\\.example\\.com)\\/([a-z])\\/movie1\
\/([1-7])\\/*(index.m3u8|\\d{3}.ts)$",
"case-sensitive": true,
"match-query-string": false
}
]]></artwork>
</figure>
<t>This regex matches URLs of domain video.example.com where the path structure is
/(single lower case letter)/(name-of-title)/(single digit between 1 to 7)/(index.m3u8 or a 3 digit number with ts extension).
For example:</t>
<figure>
<artwork><![CDATA[
https://video.example.com/d/movie1/5/index.m3u8
or
https://video.example.com/k/movie1/4/013.ts
]]></artwork>
</figure>
</section>
<section anchor="playlist" title="Playlist">
<t>A Playlist consists of a full URL and a media protocol identifier.
An implementation that supports a specific playlist media protocol MUST be able to parse playlist
files of that protocol type and extract, possibly recursively, the URLs to all media objects
and/or sub playlist files, and apply the trigger to each one of them separately.</t>
<t>Playlist is encoded as a JSON object with following properties:</t>
<t><list style="empty">
<t>Property: playlist<list style="empty">
<t>Description: A URL to the playlist file.</t>
<t>Type: A URL represented as a JSON string.</t>
<t>Mandatory: Yes.</t>
</list></t>
<t>Property: media-protocol<list style="empty">
<t>Description: Media protocol to be when parsing and interpreting this playlist. </t>
<t>Type: MediaProtocol (see <xref target="media-protocol"/>).</t>
<t>Mandatory: Yes.</t>
</list></t>
</list></t>
<t>Example of a HLS playlist:</t>
<figure>
<artwork><![CDATA[
{
"playlist": "https://www.example.com/hls/title/index.m3u8",
"media-protocol": "hls"
}
]]></artwork>
</figure>
</section>
<section anchor="media-protocol" title="MediaProtocol">
<t>Media Protocol objects are used to specify registered type of media protocol
(see <xref target="IANA.CDNI.MediaProtocolReg"/>) used for protocol related
operations like pre-position according to playlist.</t>
<t>Type: JSON string</t>
<t>Example:</t>
<t>"dash"</t>
</section>
<section anchor="trigger-extensions" title="CI/T Trigger Extensions">
<t>
A "trigger.v2" object, as defined in <xref target="trigger-spec-v2"/> includes an
optional array of trigger extension objects. A trigger extension contain properties
that are used as directives for dCDN when executing the trigger command -- for example,
location policies, time policies and so on. Each such CDNI Trigger extension is a specialization
of a CDNI GenericTriggerExtension object. The GenericTriggerExtension object abstracts the basic
information required for trigger distribution from the specifics of any given property
(i.e., property semantics, enforcement options, etc.). All trigger extensions are optional,
and it is thus the responsibility of the extension specification to define a consistent default
behavior for the case the extension is not present.
</t>
<section anchor="enforcement-options" title="Enforcement Options">
<t>
The trigger enforcement options concept is in accordance with the metadata enforcement options
as defined in Section 3.2 of <xref target="RFC8006"/>.
</t>
<t>
The GenericTriggerExtension object defines the properties contained within it
as well as whether or not the properties are "mandatory-to-enforce".
If the dCDN does not understand or support a mandatory-to-enforce
property, the dCDN MUST NOT execute the trigger command. If the extension is
not mandatory-to-enforce, then that GenericTriggerExtension object can be
safely ignored and the trigger command can be processed in accordance
with the rest of the CDNI Trigger spec.
</t>
<t>
Although a CDN MUST NOT execute a trigger command if a
mandatory-to-enforce extension cannot be enforced, it could still be
safe to redistribute that trigger (the "safe-to-redistribute"
property) to another CDN without modification. For example, in the
cascaded CDN case, a transit CDN (tCDN) could convey
mandatory-to-enforce trigger extension to a dCDN. For a trigger extension
that does not require customization or translation (i.e., trigger extension
that is safe-to-redistribute), the data representation received off the wire
MAY be stored and redistributed without being understood or supported
by the tCDN. However, for trigger extension that requires translation,
transparent redistribution of the uCDN trigger values might not be
appropriate. Certain triggers extensions can be safely, though perhaps not
optimally, redistributed unmodified. For example, pre-position command might
be executed in suboptimal times for some geographies if transparently
redistributed, but it might still work.
</t>
<t>
Redistribution safety MUST be specified for each GenericTriggerExtension
property. If a CDN does not understand or support a given
GenericTriggerExtension property that is not safe-to-redistribute, the CDN
MUST set the "incomprehensible" flag to true for that GenericTriggerExtension
object before redistributing it. The "incomprehensible"
flag signals to a dCDN that trigger metadata was not properly transformed
by the tCDN. A CDN MUST NOT attempt to execute a trigger with an extension that has been
marked as "incomprehensible" by a uCDN.
</t>
<t>
tCDNs MUST NOT change the value of mandatory-to-enforce or
safe-to-redistribute when propagating a trigger to a dCDN. Although a
tCDN can set the value of "incomprehensible" to true, a tCDN MUST NOT
change the value of "incomprehensible" from true to false.
</t>
<t>
<xref target="tcdn-actions"/> describes the action to be taken by a tCDN for the
different combinations of mandatory-to-enforce ("MtE") and safe-to-redistribute
("StR") properties when the tCDN either does or does not understand the trigger
extension object in question:
</t>
<texttable anchor="tcdn-actions" title="Action to be taken by a tCDN for the different combinations of MtE and StR properties">
<ttcol align="left">MtE</ttcol>
<ttcol align="left">StR</ttcol>
<ttcol align="left">Extension object understood by tCDN</ttcol>
<ttcol align="left">Trigger action</ttcol>
<c>False</c>
<c>True</c>
<c>True</c>
<c>Can execute and redistribute.</c>
<c>False</c>
<c>True</c>
<c>False</c>
<c>Can execute and redistribute.</c>
<c>False</c>
<c>False</c>
<c>False</c>
<c>Can execute. MUST set "incomprehensible" to true when redistributing.</c>
<c>False</c>
<c>False</c>
<c>True</c>
<c>Can execute. Can redistribute after transforming the trigger extension
(if the CDN knows how to do so safely); otherwise, MUST set
"incomprehensible" to true when redistributing.</c>
<c>True</c>
<c>True</c>
<c>True</c>
<c>Can execute and redistribute.</c>
<c>True</c>
<c>True</c>
<c>False</c>
<c>MUST NOT execute but can redistribute..</c>
<c>True</c>
<c>False</c>
<c>True</c>
<c>Can execute. Can redistribute after transforming the trigger extension
(if the CDN knows how to do so safely); otherwise, MUST set
"incomprehensible" to true when redistributing.</c>
<c>True</c>
<c>False</c>
<c>False</c>
<c>MUST NOT serve. MUST set "incomprehensible" to true when redistributing.</c>
</texttable>
<t>
<xref target="dcdn-actions"/> describes the action to be taken by a dCDN for the different
combinations of mandatory-to-enforce and "incomprehensible" ("Incomp")
properties, when the dCDN either does or does not understand
the trigger extension object in question:
</t>
<texttable anchor="dcdn-actions" title="Action to be taken by a dCDN for the different combinations of MtE and Incomp properties">
<ttcol align="left">MtE</ttcol>
<ttcol align="left">Incomp</ttcol>
<ttcol align="left">Extension object understood by dCDN</ttcol>
<ttcol align="left">Trigger action</ttcol>
<c>False</c>
<c>False</c>
<c>True</c>
<c>Can execute.</c>
<c>False</c>
<c>True</c>
<c>True</c>
<c>Can execute but MUST NOT interpret/apply any trigger extension marked as "incomprehensible".</c>
<c>False</c>
<c>False</c>
<c>False</c>
<c>Can execute.</c>
<c>False</c>
<c>True</c>
<c>False</c>
<c>Can execute but MUST NOT interpret/apply any trigger extension marked as "incomprehensible".</c>
<c>True</c>
<c>False</c>
<c>True</c>
<c>Can execute.</c>
<c>True</c>
<c>True</c>
<c>True</c>
<c>MUST NOT execute.</c>
<c>True</c>
<c>False</c>
<c>False</c>
<c>MUST NOT execute.</c>
<c>True</c>
<c>True</c>
<c>False</c>
<c>MUST NOT execute.</c>
</texttable>
</section>
<section anchor="generic-extension-object" title="GenericExtensionObject">
<t>A GenericTriggerExtension object is a wrapper for managing individual CDNI
Trigger extensions in an opaque manner.</t>
<t><list style="empty">
<t>Property: generic-trigger-extension-type<list style="empty">
<t>Description: Case-insensitive CDNI Trigger extension object type.</t>
<t>Type: String containing the CDNI Payload Type <xref target="RFC7736"/> of the object contained
in the generic-trigger-extension-value property (see table in <xref target="IANA.CDNI.payload"/>).</t>
<t>Mandatory: Yes.</t>
</list></t>
<t>Property: generic-trigger-extension-value<list style="empty">
<t>Description: CDNI Trigger extension object.</t>
<t>Type: Format/Type is defined by the value of the
generic-trigger-extension-type property above.</t>
<t>Mandatory: Yes.</t>
</list></t>
<t>Property: mandatory-to-enforce<list style="empty">
<t>Description: Flag identifying whether or not the enforcement of
this trigger extension is mandatory.</t>
<t>Type: Boolean</t>
<t>Mandatory: No. Default is to treat the trigger extension as
mandatory-to-enforce (i.e., a value of True).</t>
</list></t>
<t>Property: safe-to-redistribute<list style="empty">
<t>Description: Flag identifying whether or not this trigger extension
can be safely redistributed without modification, even if
the CDN fails to understand the extension.</t>
<t>Type: Boolean</t>
<t>Mandatory: No. Default is to allow transparent
redistribution (i.e., a value of True).</t>
</list></t>
<t>Property: incomprehensible<list style="empty">
<t>Description: Flag identifying whether or not any CDN in the
chain of delegation has failed to understand and/or failed to
properly transform this trigger extension object. Note: This flag only
applies to trigger extension objects whose safe-to-redistribute property
has a value of False.</t>
<t>Type: Boolean</t>
<t>Mandatory: No. Default is comprehensible (i.e., a
value of False).</t>
</list></t>
</list></t>
<t>Example of a GenericTriggerExtension containing a specific trigger extension object:</t>
<figure>
<artwork><![CDATA[
{
"generic-trigger-extension-type":
<Type of this trigger extension object>,
"generic-trigger-extension-value":
{
<properties of this trigger extension object>
},
"mandatory-to-enforce": true,
"safe-to-redistribute": true,
"incomprehensible": false
}
]]></artwork>
</figure>
</section>
</section>
<section anchor="error-description-v2" title="Error Description Version 2">
<t>
Version 2 of the Error Description adds the "content.playlists", "content.regexs", "extensions" and "cdn"
properties on top of the existing properties of version 1 of the trigger Error Description as defined in
Section 5.2.6 of <xref target="RFC8007"/>.
</t>
<t><list style="empty">
<t>Properties: content.regexs, content.playlists<list style="empty">
<t>
Description: Content Regex and Playlist references copied from the Trigger Specification.
Only those regexs and playlists to which the error applies are included in each property,
but those references MUST be exactly as they appear in the request; the dCDN MUST NOT change
or generalize the URLs or Regexs. Note that these properties are added on top of the already
existing properties: "metadata.urls", "content.urls", "metadata.patterns" and "content.patterns".
</t>
<t>
Type: A JSON array of JSON strings, where each string is copied from a "content.regexs" or
"content.playlists" value in the corresponding Trigger Specification.
</t>
<t>
Mandatory: At least one of "content.regexs", "content.playlists", "metadata.urls", "content.urls",
"metadata.patterns" or "content.patterns" is mandatory in each Error Description object.
</t>
</list></t>
<t>Property: extensions<list style="empty">
<t>
Description: Array of trigger extension objects copied from the corresponding "extensions" array
from the Trigger Specification. Only those extensions to which the error applies are included, but
those extensions MUST be exactly as they appear in the request.
</t>
<t>
Type: Array of GenericTriggerExtension objects, where each extension object is copied
from the "extensions" array values in the Trigger Specification.
</t>
<t>
Mandatory: No. The "extensions" array SHOULD be used only if the error relates to
extension objects.
</t>
</list></t>
<t>Property: cdn<list style="empty">
<t>
Description: The CDN PID of the CDN where the error occurred. The "cdn" property is used
by the originating uCDN or by propagating dCDN in order to distinguish in which CDN the
error occured.
</t>
<t>Type: A non-empty JSON string, where the string is a CDN PID as defined in Section
4.6 of <xref target="RFC8007"/>.</t>
<t>Mandatory: Yes. In the case the dCDN does not like to expose this information,
it should provide its own CDN PID.
</t>
</list></t>
</list></t>
<t>Example of an Error Description object reporting a malformed Playlist:
</t>
<figure>
<artwork><![CDATA[
{
"content.playlists": [
{
"playlist": "https://www.example.com/hls/title/index.m3u8",
"media-protocol": "hls"
}
],
"description": "Failed to parse HLS playlist",
"error": "econtent",
"cdn": "AS64500:0"
},
]]></artwork>
</figure>
<t>Example of an Error Description object reporting an unsupported extension object:
</t>
<figure>
<artwork><![CDATA[
{
"errors.v2": [
{
"extensions": [
{
"generic-trigger-extension-type":
<Type of this erroneous trigger extension object>,
"generic-trigger-extension-value":
{
<properties of this erroneous trigger extension object>
},
}
],
"description": "unrecognized extension <type>",
"error": "eextension",
"cdn": "AS64500:0"
},
]
}
]]></artwork>
</figure>
</section>
<section anchor="error-code" title="Error codes">
<t>
This document adds the error code "eextension" to the error codes table defined in Section
5.2.6 of <xref target="RFC8007"/>. This error code designates that an error occurred while
parsing a generic trigger extension, or that the specific extension is not supported by the CDN.
A CDN that fails to execute a trigger due a generic extension object which is "mandatory-to-enforce"
MUST report it using the "errors.v2"