<?xml version="1.0" encoding="utf-8"?><?xml-model href="rfc7991bis.rnc"?><?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>

<!DOCTYPE rfc [
  <!ENTITY nbsp "&#160;">
  <!ENTITY zwsp "&#8203;">
  <!ENTITY nbhy "&#8209;">
  <!ENTITY wj "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="exp" docName="draft-frank-purchase-exchange-format-01" ipr="trust200902" obsoletes="" updates="" submissionType="IETF" xml:lang="en" version="3">

<!-- comments by the author: email is present in IANA Considerations (remove before publishing), front->author (published at bottom under Author's Address) -->

<front>
 <title abbrev="PEF">Purchase Exchange Format (PEF)</title>
 <seriesInfo name="Internet-Draft" value="draft-frank-purchase-exchange-format-01"/>
 <author fullname="Maximilian Josef Frank" initials="M. J." role="editor" surname="Frank"><address>
   <postal><country>Germany</country></postal>
   <email>contact@script4all.com</email>
  </address></author>
 <date year="2022"/>
 <area>General</area>
 <workgroup>Internet Engineering Task Force</workgroup>
 <keyword>media purchase</keyword><keyword>purchase</keyword><keyword>exchange</keyword><keyword>transfer</keyword>
 <abstract><t>This document defines the purchase exchange format (PEF), which consists of signed purchase records, to enable sharing, verification, and transfer of information about license ownership.  This enables sharing of subscriptions, rentals, and one-time-purchases across platforms as well as deleting or switching accounts of (media) service providers without loosing or double-purchasing products.  It can also be applied to non-media items and physical objects like family-shared rentals of tools or proof of purchase for guarantee claims.</t></abstract>
</front>

<middle>
 <section><name>Introduction</name>
  <t>The purchase exchange format (PEF) defines the format of signed purchase records, to enable sharing, verification, and transfer of information about license ownership.  This enables to</t>
  <ul>
  <li>simplify and automate digital inheritance or (family) sharing across platforms (see <xref target="Example.Family.Sharing"/>),</li>
  <li>delete or switch accounts of (media) service providers without loosing purchases (also for data portability or correlation with EU Digital Markets Act),</li>
  <li>save television recordings or similar without storing the actual content,</li>
  <li>offer account-less services through modification, up- and download of records in purchase exchange format,</li>
  <li>differentiate between levels e.g. an upgrade is needed for watching a purchased movie in cinema.</li>
  </ul>
  
  <t>When purchasing media like videos, apps, or similar on different platforms, there may be overlapping purchases e.g. free content which is paid at a different streaming service, or subscriptions of different services with overlapping contents or rentals.  By this you would pay multiple times for the same product.  A signed list of purchases being exchanged between the service providers could avoid double-purchase of the same media items, by e.g. lowering the price of a subscription by the amount the media item would cost.  Furthermore it may be a problem to change operating system platforms, if you would have to pay for apps in the new app store again, whereas you already have purchased the same items in the old one.  A signed list of purchases being acknowledged by service providers could tackle this issue, whilst supporting fair competition.</t>

  <t>The purchase doesn't need to be about digital media.  It can also be about physical objects (like a tool).  By this both family sharing of rentals and simplification of guarantee claims are enabled.  You can find an example in <xref target="Example.Rental.Physical"/>.  With the purchase of a physical object mostly also comes a bill, which would prove ownership for e.g. guarantee claims.  However this application is subject to local jurisdiction.  Therefore this document focuses on digital items.</t>

  <section><name>Requirements Language</name>
   <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <xref target="BCP14"/> when, and only when, they appear in all capitals, as shown here.</t></section>
 </section>

 <section><name>Terminology</name>
  <t>Naming conventions throughout this document of attributes include use for offline or non-media purchases.</t>
  <dl newline="true">
  <dt>Product object</dt><dd>JSON object containing product data, see <xref target="Product.Objects"/></dd>
  <dt>Record</dt><dd>JSON object containing purchase information and a list of product objects, see <xref target="Record"/></dd>
  <dt>Signed Record</dt><dd>JSON Web Signature (JWS) in JSON Serialisation format (<xref target="RFC7515" section="3.2"/>) containing a record as payload, see <xref target="Signed.Record"/></dd>
  <dt>License</dt><dd>License in sense of this document means any grant to use a service.  This can also be an implicit license to use a tool for a limited time (i.e. a rental of the tool).  See <xref target="Example.Rental.Physical"/> for examples on physical objects.</dd>
  </dl>
 </section>

 <section anchor="Record"><name>Record</name>
  <t>Each record <bcp14>MUST</bcp14> be a JSON object <xref target="RFC8259"/> for later conversion to a JWS payload (see <xref target="Signed.Record"/>).</t>
  <t>The following properties/claims of a record are <bcp14>REQUIRED</bcp14>:</t>
  <dl newline="true">
  <dt>iss</dt><dd>issuer, as defined in <xref target="RFC7519" section="4.1.1"/>.  As the format in this document is for exchanging information, this field must be in string representation of Distinguished Names format <xref target="RFC4514"/> (e.g. "CN=Example Company").  For further examples have a look at the appendix <xref target="Example.Records"/>.</dd>
  <dt>iat</dt><dd>timestamp of issuing for bookkeeping and maybe some legal requirements, as defined in <xref target="RFC7519" section="4.1.6"/></dd>
  </dl>
  <t>The following properties of a record are <bcp14>OPTIONAL</bcp14>:</t>
  <dl newline="true">
  <dt>jti</dt><dd>id e.g. to identify the transaction in the seller's bookkeeping, as defined in <xref target="RFC7519" section="4.1.7"/>.  For maintaining uniqueness across records in a simple way it is <bcp14>RECOMMENDED</bcp14> to use accessible URIs e.g. "https://seller.example/category/012345".</dd>
  </dl>

  <section><name>Timely Restrictions</name>
   <t>Timely restrictions are useful for rentals or subscriptions of items.  The following properties of a purchase object are <bcp14>OPTIONAL</bcp14>:</t>
   <dl newline="true">
   <dt>nbf</dt><dd>timestamp from when the items are licensed for use, as defined in <xref target="RFC7519" section="4.1.5"/></dd>
   <dt>exp</dt><dd>timestamp when the items' license will expire, as defined in <xref target="RFC7519" section="4.1.4"/></dd>
   <dt>exi</dt><dd>seconds after which the record expires after first use or issuing, e.g. for time-flexible subscriptions or vouchers, as defined in <xref target="RFC9200" section="5.10.3"/></dd>
   </dl>
  </section>

  <section anchor="License.Holder"><name>License Holder</name>
   <t>JWSs can be easily copied.  Thus it is <bcp14>RECOMMENDED</bcp14> to include the license holder into the record.  For enabling anonymous usage of this format, this is not mandatory.  The following properties of a record are <bcp14>OPTIONAL</bcp14> and to be implemented as defined in <xref target="OpenID.Connect.Core" section="5.1" relative="#StandardClaims"/>:</t>

   <ul>
   <li>name</li>
   <li>given_name</li>
   <li>middle_name</li>
   <li>family_name</li>
   <li>birthdate</li>
   <li>locale</li>
   <li>address<br/><br />
    It is <bcp14>NOT RECOMMENDED</bcp14> to use the address property/claim, as it may be difficult to re-acknowledge/re-issue a signed record after change of address.
   </li>
   </ul>

   <t>To enable features like family sharing across different service providers, only the property/claim "family_name" and "locale" <bcp14>MAY</bcp14> be present.  See <xref target="Example.Family.Sharing"/> for an example.</t>

   <t>This list of license holder properties is not exhaustive, so you can add your own properties.  Nevertheless all properties <bcp14>MUST</bcp14> be compatible with <xref target="OpenID.Connect.Core"/>.  An example is given in <xref target="Example.Custom.Identity"/>.  Please be aware of the privacy considerations in <xref target="Privacy"/> for identifying data.</t>
  </section>
 </section>

 <section anchor="Product.Objects"><name>Product Objects</name>
  <t>The <bcp14>REQUIRED</bcp14> property/claim "items" <bcp14>MUST</bcp14> have a JSON array (as defined in <xref target="RFC8259" section="5"/>) as value, containing product objects.  Product objects are JSON objects (see <xref target="RFC8259" section="4"/>) with specific properties as defined in this section.  For signing multiple product objects in a single signed record see <xref target="Example.Multiple.Objects"/>.</t>

  <section anchor="Product.Objects.Identifier"><name>Identifier "id"</name>
   <t>Each product object <bcp14>MUST</bcp14> have the property "id".  This is a string containing a unique URI-style product identifier (see <xref target="STD66"/>).  For example "https://database.example/category/1234" may be a valid id.  Each id contains a prefix defining the product type (e.g. https://database.example/category/") concatenated with the actual value (e.g. "1234").  Every identifier <bcp14>MUST</bcp14> be accessible.  That means any used URI scheme must be registered according to <xref target="RFC7595"/> and the URI resource <bcp14>MUST</bcp14> be accessible via the URI.  For example if the identifier is "https://example.com/movie/123", then this url <bcp14>MUST</bcp14> be accessible via a browser revealing further information about the product, leading to a page for purchasing the product, or similar.</t>
   <t>Below you can find a list of <bcp14>RECOMMENDED</bcp14> identifiers for each type:</t>

   <dl newline="true">
   <dt>movie</dt><dd>Prefix: https://imdb.com/title/<br/>
    Identifier: <xref target="IMDb"/> ID<br/>
    Example: https://imdb.com/title/tt1254207</dd>
   <dt>music</dt><dd>Prefix: https://isrcsearch.ifpi.org/#!/search?tab=lookup&amp;isrcCode=<br/>
    Identifier: uppercase <xref target="ISRC"/>, only alphanumeric characters<br/>
    Example: https://isrcsearch.ifpi.org/#!/search?tab=lookup&amp;isrcCode=AA6Q72000047<br/><br/>

    or<br/><br/>

    Prefix: https://isni.org/isni/<br/>
    Identifier: uppercase <xref target="ISNI"/><br/>
    Example: https://isni.org/isni/000000012146438X</dd>
   <dt>book</dt><dd>Prefix: https://isbndb.com/book/<br/>
    Identifier: alphanumeric-only <xref target="ISBN"/><br/>
    Example: https://isbndb.com/book/123456789X</dd>
   <dt>app (F-Droid app store)</dt><dd>Prefix: https://f-droid.org/packages/<br/>
    Identifier: application identifier<br/>
    Example: https://f-droid.org/packages/org.unifiedpush.example</dd>
   <dt>physical product</dt><dd>Prefix: https://barcodelookup.com/<br/>
    Identifier: <xref target="GTIN"/> (former EAN)<br/>
    Example: https://barcodelookup.com/0123456789005</dd>
   </dl>

   <t>Some items may have multiple identifiers e.g. an application being present in multiple app stores.  To tackle issues with cross platform acknowledgement of licenses you <bcp14>SHOULD</bcp14> include additional information e.g. title (see <xref target="Product.Objects.Additional.Information"/>), and use official databases where available.  With the above extendable identifier scheme you can …</t>

   <ul>
   <li>set up your own namespace by using your website as prefix e.g. "https://example-shop.com/" (see <xref target="Example.Rental.Physical"/> for physical objects), and</li>
   <li>enable content creators to have product data stored on their own servers and have others just referring to them.  An example would be a film studio creating movies while storing and updating title, licenses, or similar on its own servers.  An external streaming service now can refer to this data and automatically receives updates (e.g. movie version, name in different languages, …).  This reduces redundancy.</li>
   </ul>
  </section>

  <section anchor="Product.Objects.Additional.Information"><name>Additional Information</name>
   <t>It is <bcp14>RECOMMENDED</bcp14>, but for the sake of brevity not mandatory, to include helpful information as object properties.  This might be necessary if the id prefix is not common, for still being able to identify a product e.g. a movie.  If used, the following properties <bcp14>MUST</bcp14> be used with consistent naming:</t>

   <dl newline="true">
   <dt>title</dt><dd>product title e.g. movie title or song name</dd>
   <dt>year</dt><dd>year of creation</dd>
   <dt>creator</dt><dd>creator of product e.g. the film studio, song author</dd>
   </dl>

   <t>Other properties with the same meaning as one of the keys above <bcp14>MUST NOT</bcp14> use different key names.  This means for example "song-name" is prohibited, because "title" is to be used instead.</t>
  </section>
 </section>

 <section anchor="Signed.Record"><name>Signed Record</name>
  <t>Above record doesn't provide data integrity.  Thus the security of records depend on JSON Web Signatures (JWS) <xref target="RFC7515"/> as their carrier.  A signed record is a JWS with its payload being a representation of the record according to Step 2 of <xref target="RFC7519" section="7.1"/>.  Do not confuse the payload with the actual value of the "payload" property of a JWS.  To allow for JSON representations of signed records the more strict specification of a JSON Web Token <xref target="RFC7519"/> is not used.  It is <bcp14>REQUIRED</bcp14> to use JWSs with asymmetric encryption keys, otherwise signatures couldn't be verified by others without giving up confidentiality of the signature key.  Unsecured JWSs as defined in <xref target="RFC7515" section="2"/> <bcp14>MUST NOT</bcp14> be used.</t>
  <t>To identify the JWSs as signed purchase records, it is <bcp14>RECOMMENDED</bcp14> to set the "typ"-claim to the Content-Type "TBD1" (without quotation marks) in its compact form as defined in <xref target="RFC7515" section="4.1.9"/>.</t>
 </section>

 <section anchor="File.Format.Sync"><name>File Format and Synchronisation</name>
  <t>JWSs and thus signed records are signed by only one entity, because a product is bought from only one seller (single person or group as a whole).  To allow the exchange of multiple purchases bought from each a different seller, there may be different formats of exchanging multiple signed records.</t>

  <section><name>File</name>
   <t>A file containing the signed records <bcp14>MUST</bcp14> be in JSON Lines format <xref target="JSON.Lines"/>, and use appropriate file name suffixes (i.e. .jsonl or derivatives through e.g. compression like .json.gz).  There <bcp14>MUST</bcp14> be zero or one signed records on each line.  See <xref target="Example.File"/> for an example.</t>
   <t>Synchronisation <bcp14>MAY</bcp14> be supported by product vendors or services through WebDAV file synchronisation <xref target="RFC4918"/>.  In this case license holders <bcp14>SHOULD</bcp14> be able to specify their own storage location, e.g. ones own cloud storage.  If this method is used, editors <bcp14>MUST</bcp14> take action against synchronisation issues e.g. synchronous writing of two different vendors.  If necessary, the strategy for avoiding collisions <bcp14>MUST</bcp14> be the "merge" method i.e. keeping entries from both vendors on collision.</t>
   <t>It is highly <bcp14>RECOMMENDED</bcp14> to restrict file access to read-and-append-only without rewriting the file.  Entries <bcp14>SHALL</bcp14> be terminated by other means than deletion e.g. by expiration timestamps, to allow:</t>

   <ul>
   <li>keeping a history of purchases,</li>
   <li>enable (immutable) streaming of the purchase exchange format line by line (see <xref target="JSON.Lines"/>) with empty lines as connection keep-alive,</li>
   <li>avoid file writing collisions by appending signed records without knowing the file content.</li>
   </ul>
  </section>

  <section><name>Client Certificate</name>
   <t>Another option would be to use the existing X.509 client certificate authentication mechanism, where a website or service provider requests a certificate containing the signed records as custom payload (see extensions <xref target="RFC5280" section="5.2"/>) from the license holder's browser.</t>
   <t>On each change of the list of signed records the license holder would have to upload one's certificate to a vendor, which adds the new signed records.  The vendor reissues a new certificate containing the new list of signed records as payload, and offers it as download to the license holder for installing.</t>
  </section>
 </section>

 <section><name>Experimental Use</name>
  <t>This format is mainly about sharing and cross-service verification of license ownership (inter-service) than proving a purchase for guarantee claims or refund (intra-service).  Thus it is intended to coexist with other signature or verification technologies, which may fall under bookkeeping law or similar.  The format described in this document is not meant to fall under such regulations.</t>

  <t>Adaptors of this format are requested to experiment with the following of its methods or properties.</t>

  <section><name>Evolving Methods of Sharing and Synchronisation</name>
   <t>As seen in <xref target="File.Format.Sync"/> there are different ways to store and exchange signed records.  Additionally to the suggested methods there <bcp14>MAY</bcp14> evolve other standards of sharing signed records.  To simplify research on the evolvement of those methods, adapters <bcp14>SHOULD</bcp14> update <xref target="File.Format.Sync"/>.  For example evolving methods may contain two-party techniques (i.e. communication only between service provider and license holder e.g. via file down- and upload) or involve third parties (identity service provider, cloud storage provider via WebDAV, and others).</t>
  </section>

  <section><name>Evolving Common Product Identifiers</name>
   <t>This document should motivate to find a consensus of commonly used product identifiers for <xref target="Product.Objects.Identifier"/>.  Even though the suggestions for identifier prefixes relate to publicly accessible databases, there <bcp14>MAY</bcp14> evolve proprietary formats as long as every system knows to which product an identifier refers.  On consensus of identifier prefixes this document …</t>
   <ul>
   <li><bcp14>MUST</bcp14> be updated, if it replaces a suggested identifier prefix, or</li>
   <li><bcp14>SHOULD</bcp14> be updated, if a new identifier prefix is added.</li>
   </ul>
  </section>

  <section><name>Industry Support</name>
   <t>It may be difficult to gain wide industry support.  Nevertheless this may not be a reason to dismiss this document, as protocols and technologies more and more evolve to open standards providing better interoperability.  This document contributes to the movement.</t>

   <t>There are already service providers, which try to bundle offers of other service providers into one subscription e.g. MagentaTV bundles classic television with the offers of Amazon Prime Video, RTL+ and others (as of December 2022).  This bundling requires (1) communication between the services, i.e. at least showing offers of other service providers, and (2) verification of eligibility of an offer for a certain user.  The format specified in this document enables at least two things:</t>

   <ol>
   <li>Unlimited offers by enabling the inclusion of any other service provider, without having to implement another proprietary or vendor-specific format</li>
   <li>Saving costs for a content delivery network at each service provider by using each other's infrastructure based on geolocation</li>
   <li>Integrating each others service providers' offers and thus creating a unified and immersive experience to the user.</li>
   </ol>

   <t>Especially as there is a trend to found creator-owned streaming offers of movie creators (e.g. Disney+ by Walt Disney Studios, Paramount+ by Paramount Studios, …), people might tend to select only one subscription for financial reasons.  A single subscription may cost less than multiple subscriptions at different streaming service providers.  This would lead to less offers for the user per price unit, loss of paid license fees for other service providers' offers, and less customers per service provider by preventing indirect customers.  Indirect customers in this sense mean customers on a service provider A watching e.g. a movie offered by service provider B, where service provider B earns a small compensation for providing the movie on service A.</t>
  </section>

  <section><name>Peer-to-Peer Support</name>
   <t>The following suggestions are primarily for use on the license holder side, who has no force over copyright decisions.  Thus their realisation may depend on the local jurisdiction.</t>

   <t>When extrapolating the concept of sharing resources, you could even transfer this format to peer to peer applications like WebTorrent.  Unfortunately there are many media items shared via WebTorrent, which infringe copyright.  By ensuring via the format in this document, that a WebTorrent client, which receives a media item, is also a license holder of this item, there may be ways to allow the use of WebTorrent for media streaming without copyright infringement.</t>

   <t>This would also allow to use media items, without both having to store them on a local disk as well as being bound to a single service provider.  For example television recordings, which may be provided by different service providers, may be stored as signed records (in some jurisdictions with expiry date) for watching them at a later time.  When the license holder would like to watch those recordings, it can go to any service provider, verify its license ownership with the signed record, and watch the recording.</t>
  </section>
 </section>

 <section anchor="IANA"><name>IANA Considerations</name>
  <section><name>Media Type Registration</name>
   <t>IANA is asked to assign the media type "application/pef" in the "Media Types" registry in the manner described in <xref target="RFC6838"/>, which can be used to identify a JWS as a signed record in purchase exchange format.  The subtype name replaces the placeholder TBD1 as used in <xref target="Signed.Record"/>.</t>
   <ul>
   <li>Type name: application</li>
   <li>Subtype name: pef</li>
   <li>Required parameters: N/A</li>
   <li>Optional parameters: N/A</li>
   <li>Encoding considerations: 8bit; as JWS <xref target="RFC7515"/></li>
   <li>Security considerations: this document <xref target="Security"/></li>
   <li>Interoperability considerations: N/A</li>
   <li>Published specification: this document</li>
   <li>Applications that use this media type: N/A</li>
   <li>Fragment identifier considerations: N/A</li>
   <li><t>Additional information:</t>
    <ul empty="true" spacing="compact">
    <li>Deprecated alias names for this type: N/A</li>
    <li>Magic number(s): N/A</li>
    <li>File extension(s): .jsonl, .ndjson</li>
    <li>Macintosh file type codes: TEXT</li>
    </ul>
   </li>
   <li>Person &amp; email address to contact for further information: Maximilian Josef Frank, contact@script4all.com (REMOVE EMAIL BEFORE PUBLISHING)</li>
   <li>Intended usage: COMMON</li>
   <li>Restrictions on usage: N/A</li>
   <li>Author: Maximilian Josef Frank</li>
   <li>Change controller: Maximilian Josef Frank</li>
   <li>Provisional registration: no</li>
   </ul>

   <t>Dismissal of registration should not affect publication of this document.</t>
  </section>

  <section><name>Comment on "JSON Web Token Claims" Registry</name>
   <t>As the underlying format of signed records are JWSs instead of JWTs, there is no formal need to register the property/claim "items", containing a list of items for which to prove license-ownership (see <xref target="Product.Objects"/>).</t>
  </section>
 </section>
    
 <section anchor="Security"><name>Security Considerations</name>
  <t>All the security considerations of JSON Web Signatures <xref target="RFC7515"/>, also apply to this specification.</t>

  <section><name>Authorization</name>
   <t>As signed records can be signed by anyone with custom keys, you <bcp14>MUST</bcp14> check its signature for authorization to issue purchases.  For this a root storage of authorized certificates <bcp14>MAY</bcp14> be used in combination with a certificate chain and the "x5c"-claim of JWS as defined in <xref target="RFC7515" section="4.1.6"/>.  These certificates may be used to sign the public keys of the actual product sellers, whose signed keys are used to sign the actual purchase record.</t></section>

  <section><name>License Holder</name>
   <t>If the license holder (see <xref target="License.Holder"/>) is encoded into the record, there may be issues with perfect authentication solely by the license holder information.  Subjects with exactly same names and birthdates could use each other's licenses, if they also possess the signed record.  As both possession of the signed record and knowledge of name and birthdate is required to abuse this circumstance, the risk is deemed to be low.</t>
   <t>Vendors <bcp14>MAY</bcp14> encode additional personal information into a record to strengthen authenticity, while maintaining portability and account-less use of the purchase exchange format.</t></section>
 </section>

 <section anchor="Privacy"><name>Privacy Considerations</name>
  <t>This section uses terms from <xref target="RFC6973"/>.</t>
  <t>It may be possible to create a fingerprint from the list of purchases and their properties (date, seller, etc.).  This could be used to track/identify the user (individual) across services, but also over time on the same service - even though the user uses the service provider's service without an account.  To mitigate this issue, …</t>
  <ul>
  <li>the file containing all signed records <bcp14>MAY</bcp14> be split into multiple files, so that only the relevant signed records are uploaded to the service provider, and</li>
  <li>signed records <bcp14>MAY</bcp14> be re-issued to modify the issuing date in regular intervals to reduce persistent attributes, and</li>
  <li>there <bcp14>SHOULD NOT</bcp14> be any unique identifiers for identifying the license holder, i.e. no customer numbers or IDs.  You <bcp14>SHOULD</bcp14> rather use the suggested claims/properties in <xref target="License.Holder"/>, because you cannot identify a person uniquely (some people might have the same name), but still can verify the persons license.</li>
  </ul>
 </section>
</middle>

<back>
 <references><name>References</name>
  <references><name>Normative References</name>
   <referencegroup anchor="BCP14" target="https://www.rfc-editor.org/info/bcp14">
    <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.2119.xml"/>
    <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8174.xml"/>
   </referencegroup>
   <reference anchor="GTIN" target="https://www.gs1.org/genspecs"><front>
    <title>GS1 General Specifications</title>
    <author><organization>GS1 Germany</organization></author>
    <date year="2014"/>
    </front></reference>
   <reference anchor="IMDb" target="https://imdb.com"><front>
    <title>The Internet Movie Database</title>
    <author><organization>IMDb.com, Inc.</organization></author>
    </front></reference>
   <reference anchor="ISBN" target="https://isbn-international.org"><front>
    <title>International Standard Book Number</title>
    <author><organization>International ISBN Agency</organization></author>
    </front></reference>
   <reference anchor="ISNI" target="https://isni.org"><front>
    <title>International Standard Name Identifier</title>
    <author><organization>ISNI International Agency (ISNI-IA) Ltd.</organization></author>
    </front></reference>
   <reference anchor="ISRC" target="https://isrc.ifpi.org"><front>
    <title>International Standard Recording Code</title>
    <author><organization>International ISRC Agency</organization></author>
    </front></reference>
   <reference anchor="JSON.Lines" target="https://jsonlines.org"><front>
    <title>JSON Lines</title>
    <author fullname="Ian Ward" initials="I." surname="Ward"><organization/></author>
    </front></reference>
   <reference anchor="OpenID.Connect.Core" target="https://openid.net/specs/openid-connect-core-1_0.html"><front>
    <title>OpenID Connect Core v1</title>
    <author><organization>The OpenID Foundation</organization></author>
    <date year="2014"/>
    </front></reference>
   <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.4514.xml"/>
   <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.4918.xml"/>
   <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.5280.xml"/>
   <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6838.xml"/>
   <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6973.xml"/>
   <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8259.xml"/>
   <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.7515.xml"/>
   <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.7519.xml"/>
   <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.7595.xml"/>
   <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.9200.xml"/>
   <xi:include href="https://bib.ietf.org/public/rfc/bibxml9/reference.STD.0066.xml"/>
  </references>
  <references><name>Informative References</name>
  </references>
 </references>
    
 <section anchor="Example.Records"><name>Example: Records</name>
  <t>All examples use the following JWS header:</t>
  <figure><name>JWS header</name><sourcecode type="json" markers="false"><![CDATA[
{
 "alg":"ES256"
}
  ]]></sourcecode></figure>

  <t>For the signature the following ES256 keys are used:</t>
  <figure><name>Signature keys</name><sourcecode type="pkcs8" markers="false"><![CDATA[
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEVs/o5+uQbTjL3chynL4wXgUg2R9
q9UU8I5mEovUf86QZ7kOBIjJwqnzD1omageEHWwHdBO6B+dFabmdT9POxg==
-----END PUBLIC KEY-----

-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgevZzL1gdAFr88hb2
OF/2NxApJCzGCEDdfSp6VQO30hyhRANCAAQRWz+jn65BtOMvdyHKcvjBeBSDZH2r
1RTwjmYSi9R/zpBnuQ4EiMnCqfMPWiZqB4QdbAd0E7oH50VpuZ1P087G
-----END PRIVATE KEY-----
  ]]></sourcecode></figure>


  <section anchor="Example.Family.Sharing"><name>Family-Shared Movie Rental</name>
   <t>The following example represents a record for the purchase of</t>

   <ul>
   <li>the movie "Big Buck Bunny" referenced in the <xref target="IMDb"/> via "https://imdb.com/title/tt1254207"</li>
   <li>purchased on the 1st January 2022 at 00:00:00 GMT</li>
   <li>issued by a fictional service provider called "Example Media Company" (see "iss" property/claim in <xref target="Record"/>)</li>
   <li>shared among the "Doe" family (see absence of first name or other license holder properties <xref target="License.Holder"/>)</li>
   <li>as a rental from the time of purchase until the same day at 23:59:59 GMT (inclusive).</li>
   </ul>

   <t>Please note that per definition in <xref target="RFC7519" section="4.1.4"/> the value of "exp" is the next second after the last valid second.</t>

   <figure><name>Example record</name><sourcecode type="json" markers="false"><![CDATA[
{
 "iss": "CN=Example Media Company",
 "iat": 1640995200,
 "exp": 1641081600, 
 "family_name": "Doe",
 "items": [
  {
   "id": "https://imdb.com/title/tt1254207"
  }
 ]
}
   ]]></sourcecode></figure>

   <t>The example yields the following signed record:</t>
   <figure><name>Example signed record</name><sourcecode type="json" markers="false"><![CDATA[
{
 "protected": "eyJhbGciOiJFUzI1NiJ9",
 "payload": "eyJpc3MiOiJDTj1FeGFtcGxlIE1lZGlhIENvbXBhbnkiLCJpYXQiOjE2
NDA5OTUyMDAsImV4cCI6MTY0MTA4MTYwMCwiZmFtaWx5X25hbWUiOiJEb2UiLCJpdGVtc
yI6W3siaWQiOiJodHRwczovL2ltZGIuY29tL3RpdGxlL3R0MTI1NDIwNyJ9XX0",
 "signature": "q9-F4ZZPSf9VJOGvTuMeuSCtgcZC1hNl2k6PLVlmT8DnjDMj1TKyS0
Fh0bvJbjoZ4OaKCqzeXW1o9QHBHJN8BA"
}
   ]]></sourcecode></figure>
  </section>


  <section anchor="Example.Rental.Physical"><name>Rental of a Physical Object</name>
   <t>This format may also be used for proving guarantee claims or sharing rentals of tools.  By this any family member can lend and return the drill e.g. in the same household.  The following demonstrates a rental of a physical object i.e. …</t>
   <ul>
   <li>the rental from 1st January 2022 at 00:00:00 GMT to same day 23:59:59 GMT (inclusive)</li>
   <li>of a drill with product ID 1234</li>
   <li>at the local store "Example Tools Rental Store" with website "https://drill-store.example" used for product identifiers</li>
   <li>for use at the address Example Street 123, 12345 Example-City, Example-Country.</li>
   </ul>

   <t>As the Example Tools Rental Store doesn't have many items, it uses the top level folder in the url path for product IDs.  In this case this follows the schema "https://drill-store.example/{ID}" instead of "https://drill-store.example/{CATEGORY}/{ID}".</t>

   <figure><name>Example record</name><sourcecode type="json" markers="false"><![CDATA[
{
 "iss": "CN=Example Tools Rental Store",
 "iat": 1640995200,
 "exp": 1641081600, 
 "address": {
  "street_address": "Example Street 123",
  "locality": "Example-City",
  "country": "Example-Country"
 },
 "items": [
  {
   "id": "https://drill-store.example/1234"
  }
 ]
}
   ]]></sourcecode></figure>

   <t>The example yields the following signed record:</t>
   <figure><name>Example signed record</name><sourcecode type="json" markers="false"><![CDATA[
{
 "protected": "eyJhbGciOiJFUzI1NiJ9",
 "payload": "eyJpc3MiOiJDTj1FeGFtcGxlIFRvb2xzIFJlbnRhbCBTdG9yZSIsImlh
dCI6MTY0MDk5NTIwMCwiZXhwIjoxNjQxMDgxNjAwLCJhZGRyZXNzIjp7InN0cmVldF9hZ
GRyZXNzIjoiRXhhbXBsZSBTdHJlZXQgMTIzIiwibG9jYWxpdHkiOiJFeGFtcGxlLUNpdH
kiLCJjb3VudHJ5IjoiRXhhbXBsZS1Db3VudHJ5In0sIml0ZW1zIjpbeyJpZCI6Imh0dHB
zOi8vZHJpbGwtc3RvcmUuZXhhbXBsZS8xMjM0In1dfQ",
 "signature": "24wxHovyPZBAa57KlFCchnhsCIBv7AfRmjLFYRrQi-1lyvrEt5xtEZ
nsZntZUxW9751-XT0dYsR_yylQSVdhPg"
}
   ]]></sourcecode></figure>
  </section>


  <section anchor="Example.Custom.Identity"><name>Custom Identity Fields</name>
   <t>The following example shows adding custom license holder properties in compliance with <xref target="OpenID.Connect.Core"/>.  The following demonstrates the …</t>

   <ul>
   <li>purchase of the movie "Big Buck Bunny" referenced in the <xref target="IMDb"/> via "https://imdb.com/title/tt1254207"</li>
   <li>by a user with email john.doe@example.com</li>
   <li>on the 1st January 2022 at 00:01:05 GMT</li>
   <li>at the streaming provider Example Streaming Provider.</li>
   </ul>

   <figure><name>Example record</name><sourcecode type="json" markers="false"><![CDATA[
{
 "iss": "CN=Example Streaming Provider",
 "iat": 1640995265,
 "email": "john.doe@example.com",
 "items": [
  {
   "id": "https://imdb.com/title/tt1254207"
  }
 ]
}
   ]]></sourcecode></figure>

   <t>The example yields the following signed record:</t>
   <figure><name>Example signed record</name><sourcecode type="json" markers="false"><![CDATA[
{
 "protected": "eyJhbGciOiJFUzI1NiJ9",
 "payload": "eyJpc3MiOiJDTj1FeGFtcGxlIFN0cmVhbWluZyBQcm92aWRlciIsImlh
dCI6MTY0MDk5NTI2NSwiZW1haWwiOiJqb2huLmRvZUBleGFtcGxlLmNvbSIsIml0ZW1zI
jpbeyJpZCI6Imh0dHBzOi8vaW1kYi5jb20vdGl0bGUvdHQxMjU0MjA3In1dfQ",
 "signature": "wASbTxXnPyhfBaMPI26ha3tyPvDDOHdxY6aXSej3umBKLl5cu68mcE
AjkCJG7uo1HwOI_LOnBG8gLbzv4sHULw"
}
   ]]></sourcecode></figure>

   <t>This signed record can now be uploaded to a different streaming service to not have to purchase the movie again at the other streaming service.</t>
  </section>


  <section anchor="Example.Voucher.Birthday"><name>Birthday Voucher</name>
   <t>The following demonstrates a voucher for</t>

   <ul>
   <li>a birthday gift of category "wood" and vendor-specific id "1234"</li>
   <li>by Example Toys Store, which has its website on "https://toy-store.example",</li>
   <li>for people born on 1st January 2000 GMT+0000</li>
   <li>valid to fetch from the 1st January 2022 at 00:00:00 GMT to same day 23:59:59 GMT (inclusive).</li>
   </ul>

   <figure><name>Example record</name><sourcecode type="json" markers="false"><![CDATA[
{
 "iss":"CN=Example Toys Store",
 "iat":1640995200,
 "exp":1641081600,
 "birthdate":"2000-01-01",
 "items":[
  {
   "id":"https://toy-store.example/wood/1234"
  }
 ]
}
   ]]></sourcecode></figure>

   <t>The example yields the following signed record:</t>
   <figure><name>Example signed record</name><sourcecode type="json" markers="false"><![CDATA[
{
 "protected": "eyJhbGciOiJFUzI1NiJ9",
 "payload": "eyJpc3MiOiJDTj1FeGFtcGxlIFRveXMgU3RvcmUiLCJpYXQiOjE2NDA5
OTUyMDAsImV4cCI6MTY0MTA4MTYwMCwiYmlydGhkYXRlIjoiMjAwMC0wMS0wMSIsIml0Z
W1zIjpbeyJpZCI6Imh0dHBzOi8vdG95LXN0b3JlLmV4YW1wbGUvd29vZC8xMjM0In1dfQ
",
 "signature": "vv4Cz2TfSxWuVqJZzER_h0wQq1MfRM9Dfsik9dAFuox0A_Zx1pxU8G
vtkPypY8RsfHcA97yCQbXE5hRS6KFdmg"
}
   ]]></sourcecode></figure>
  </section>

  <section anchor="Example.Multiple.Objects"><name>Multiple Objects</name>
   <t>If multiple records are issued by the same provider, they could also be unified into a single signed record.</t>

   <figure><name>Example record</name><sourcecode type="json" markers="false"><![CDATA[
{
 "iss": "CN=Example Streaming Provider",
 "iat": 1640995265,
 "media": [
  { "id": "https://imdb.com/title/tt1254207" },
  { "id": "https://imdb.com/title/tt1234567" }
 ]
}
   ]]></sourcecode></figure>

   <t>This results in the following signed record.</t>

   <figure><name>Example signed record</name><sourcecode type="json" markers="false"><![CDATA[
{
 "protected": "eyJhbGciOiJFUzI1NiJ9",
 "payload": "eyJpc3MiOiJDTj1FeGFtcGxlIFN0cmVhbWluZyBQcm92aWRlciIsImlh
dCI6MTY0MDk5NTI2NSwiaXRlbXMiOlt7ImlkIjoiaHR0cHM6Ly9pbWRiLmNvbS90aXRsZ
S90dDEyNTQyMDcifSx7ImlkIjoiaHR0cHM6Ly9pbWRiLmNvbS90aXRsZS90dDEyMzQ1Nj
cifV19",
 "signature": "735nWFtgfYZcpB7BmNUiaV5T7AWpuGAbF8cFwqPRHNWcN6rsxAjuTI
XQNEn4DY-zpGvh5fOubf9ARpZAil3bxg"
}
   ]]></sourcecode></figure>
  </section>
 </section>

 <section anchor="Example.File"><name>Example: File</name>
  <t>An example file containing all example signed records above in minified format (i.e. without whitespaces) is containing the following:</t>

  <figure><name>Example signed records file</name><sourcecode type="jsonl" markers="false"><![CDATA[
{"protected":"eyJhbGciOiJFUzI1NiJ9","payload":"eyJpc3MiOiJDTj1FeGFtcG
xlIE1lZGlhIENvbXBhbnkiLCJpYXQiOjE2NDA5OTUyMDAsImV4cCI6MTY0MTA4MTYwMCw
iZmFtaWx5X25hbWUiOiJEb2UiLCJpdGVtcyI6W3siaWQiOiJodHRwczovL2ltZGIuY29t
L3RpdGxlL3R0MTI1NDIwNyJ9XX0","signature": "q9-F4ZZPSf9VJOGvTuMeuSCtgc
ZC1hNl2k6PLVlmT8DnjDMj1TKyS0Fh0bvJbjoZ4OaKCqzeXW1o9QHBHJN8BA"}
{"protected":"eyJhbGciOiJFUzI1NiJ9","payload":"eyJpc3MiOiJDTj1FeGFtcG
xlIFRvb2xzIFJlbnRhbCBTdG9yZSIsImlhdCI6MTY0MDk5NTIwMCwiZXhwIjoxNjQxMDg
xNjAwLCJhZGRyZXNzIjp7InN0cmVldF9hZGRyZXNzIjoiRXhhbXBsZSBTdHJlZXQgMTIz
IiwibG9jYWxpdHkiOiJFeGFtcGxlLUNpdHkiLCJjb3VudHJ5IjoiRXhhbXBsZS1Db3Vud
HJ5In0sIml0ZW1zIjpbeyJpZCI6Imh0dHBzOi8vZHJpbGwtc3RvcmUuZXhhbXBsZS8xMj
M0In1dfQ","signature":"24wxHovyPZBAa57KlFCchnhsCIBv7AfRmjLFYRrQi-1lyv
rEt5xtEZnsZntZUxW9751-XT0dYsR_yylQSVdhPg"}
{"protected":"eyJhbGciOiJFUzI1NiJ9","payload":"eyJpc3MiOiJDTj1FeGFtcG
xlIFN0cmVhbWluZyBQcm92aWRlciIsImlhdCI6MTY0MDk5NTI2NSwiZW1haWwiOiJqb2h
uLmRvZUBleGFtcGxlLmNvbSIsIml0ZW1zIjpbeyJpZCI6Imh0dHBzOi8vaW1kYi5jb20v
dGl0bGUvdHQxMjU0MjA3In1dfQ","signature":"wASbTxXnPyhfBaMPI26ha3tyPvDD
OHdxY6aXSej3umBKLl5cu68mcEAjkCJG7uo1HwOI_LOnBG8gLbzv4sHULw"}
{"protected":"eyJhbGciOiJFUzI1NiJ9","payload":"eyJpc3MiOiJDTj1FeGFtcG
xlIFRveXMgU3RvcmUiLCJpYXQiOjE2NDA5OTUyMDAsImV4cCI6MTY0MTA4MTYwMCwiYml
ydGhkYXRlIjoiMjAwMC0wMS0wMSIsIml0ZW1zIjpbeyJpZCI6Imh0dHBzOi8vdG95LXN0
b3JlLmV4YW1wbGUvd29vZC8xMjM0In1dfQ","signature":"vv4Cz2TfSxWuVqJZzER_
h0wQq1MfRM9Dfsik9dAFuox0A_Zx1pxU8GvtkPypY8RsfHcA97yCQbXE5hRS6KFdmg"}
{"protected":"eyJhbGciOiJFUzI1NiJ9","payload":"eyJpc3MiOiJDTj1FeGFtcG
xlIFN0cmVhbWluZyBQcm92aWRlciIsImlhdCI6MTY0MDk5NTI2NSwiaXRlbXMiOlt7Iml
kIjoiaHR0cHM6Ly9pbWRiLmNvbS90aXRsZS90dDEyNTQyMDcifSx7ImlkIjoiaHR0cHM6
Ly9pbWRiLmNvbS90aXRsZS90dDEyMzQ1NjcifV19","signature":"735nWFtgfYZcpB
7BmNUiaV5T7AWpuGAbF8cFwqPRHNWcN6rsxAjuTIXQNEn4DY-zpGvh5fOubf9ARpZAil3
bxg"}
  ]]></sourcecode></figure>
 </section>
</back>
</rfc>