563
563
</section >
564
564
</section >
565
565
566
- <section title =" Link Target Attributes" >
566
+ <section title =" Link Target Attributes" anchor = " targetAttributes " >
567
567
<t >
568
568
All properties in this section are advisory only. While keywords such
569
569
as "title" and "description" are used primarily to present the link
@@ -2382,28 +2382,35 @@ Link: <https://api.example.com/trees/1/nodes/456> rev=up
2382
2382
</section >
2383
2383
2384
2384
<section title =" Security Considerations" anchor =" security" >
2385
- <t ><cref >Need to reference the core and validation security considerations.</cref ></t >
2386
- <section title =' "self" Links' >
2385
+ <t >
2386
+ JSON Hyper-Schema defines a vocabulary for JSON Schema core and concerns all
2387
+ the security considerations listed there. As a link serialization format,
2388
+ the security considerations of <xref target =" RFC8288" >RFC 8288 Web Linking</xref >
2389
+ also apply, with appropriate adjustments (e.g. "anchor" as an LDO keyword rather
2390
+ than an HTTP Link header attribute).
2391
+ </t >
2392
+ <section title =" Target Attributes" >
2387
2393
<t >
2388
- When link relation of "self" is used to denote a full representation of an
2389
- object, the user agent SHOULD NOT consider the representation to be the
2390
- authoritative representation of the resource denoted by the target URI if
2391
- the target URI is not equivalent to or a sub-path of the URI used to request
2392
- the resource representation which contains the target URI with the "self"
2393
- link.
2394
+ As stated in <xref target =" targetAttributes" />, all LDO keywords describing
2395
+ the target resource are advisory and MUST NOT be used in place of
2396
+ the authoritative information supplied by the target resource in response
2397
+ to an operation. Target resource responses SHOULD indicate their own
2398
+ hyper-schema, which is authoritative.
2394
2399
</t >
2395
- </section >
2396
- <section title =" Target Attributes" >
2397
2400
<t >
2401
+ If the hyper-schema in the target response matches (by "$id") the hyper-schema
2402
+ in which the current LDO was found, then the target attributes MAY be
2403
+ considered authoritative.
2398
2404
<cref >
2399
- This whole section needs more work, but I do like having security
2400
- concerns around target interactions consolidated and addressed as a whole.
2405
+ Need to add something about the risks of spoofing by "$id", but given
2406
+ that other parts of the specification discourage always re-downloading
2407
+ the linked schema, the risk mitigation options are unclear.
2401
2408
</cref >
2402
2409
</t >
2403
2410
<t >
2404
- The "targetMediaType" property in link definitions defines the expected
2405
- format of the link's target.
2406
- However, this is advisory only, and MUST NOT be considered authoritative .
2411
+ Clients MUST NOT use the value of "targetSchema" to aid in the interpretation
2412
+ of the data received in response to following the link, as this leaves
2413
+ "safe" data open to re-interpretation .
2407
2414
</t >
2408
2415
<t >
2409
2416
When choosing how to interpret data, the type information provided by the
@@ -2421,11 +2428,29 @@ Link: <https://api.example.com/trees/1/nodes/456> rev=up
2421
2428
precautions for "targetSchema".
2422
2429
</t >
2423
2430
<t >
2424
- The "targetSchema" keyword has similar security concerns to that of
2425
- "targetMediaType".
2426
- Clients MUST NOT use the value of this property to aid in the interpretation
2427
- of the data received in response to following the link, as this leaves
2428
- "safe" data open to re-interpretation.
2431
+ Protocol meta-data values conveyed in "targetHints" MUST NOT be considered
2432
+ authoritative. Any security considerations defined by the protocol that
2433
+ may apply based on incorrect assumptions about meta-data values apply.
2434
+ </t >
2435
+ <t >
2436
+ Even when no protocol security considerations are directly applicable,
2437
+ implementations MUST be prepared to handle responses that do not
2438
+ match the link's "targetHints" values.
2439
+ </t >
2440
+ </section >
2441
+ <section title =' "self" Links' >
2442
+ <t >
2443
+ When link relation of "self" is used to denote a full representation of an
2444
+ object, the user agent SHOULD NOT consider the representation to be the
2445
+ authoritative representation of the resource denoted by the target URI if
2446
+ the target URI is not equivalent to or a sub-path of the URI used to request
2447
+ the resource representation which contains the target URI with the "self"
2448
+ link.
2449
+ <cref >
2450
+ It is no longer clear what was intended by the "sub-path" option in
2451
+ this paragraph. While paths are defined as a hierarchical system
2452
+ by RFC 3986, there semantics of the hierarchy are not defined.
2453
+ </cref >
2429
2454
</t >
2430
2455
</section >
2431
2456
</section >
0 commit comments