OAuth Working Group C. Smith Internet-Draft T. Hardjono Intended status: Standards Track MIT Expires: August 10, 2017 February 6, 2017 JSON Web Document (JWD) draft-smith-oauth-json-web-document-00 Abstract JSON Web Document (JWD) is a means of representing optionally signed and/or encrypted JSON content suitable for storage, retrieval, transmission, and display in a graphical user interface. The content of a JWD is used as the payload of a JSON Web Signature (JWS) structure or as the plaintext of a JSON Web Encryption (JWE) structure. Requirements Language 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 RFC 2119 [RFC2119]. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on August 10, 2017. Copyright Notice Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents Smith & Hardjono Expires August 10, 2017 [Page 1] Internet-Draft JWD February 2017 (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2 3. JWS Document Serialization . . . . . . . . . . . . . . . . . 3 4. JWS Flattened Document Serialization . . . . . . . . . . . . 3 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 6. Security Considerations . . . . . . . . . . . . . . . . . . . 4 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 4 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 4 8.1. Normative References . . . . . . . . . . . . . . . . . . 4 8.2. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Appendix A. Example Signed JWD . . . . . . . . . . . . . . . . . 4 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 5 1. Introduction JWD introduces a new set of serializations to JWS and JWE called the Document Serializations. These serializations follow the form of the JSON Serialization and Flattened JSON Serialization described in JWS Section 7.2 [1], except that the payload, integrity-protected header, and non-integrity-protected header contents are all represented as unencoded JSON values and MUST NOT be base64url-encoded. Signatures present in the data structure MUST be base64url-encoded. Signatures are computed using base64url-encoded JSON values for the payload and integrity-protected headers as in JWS. For a given payload and JOSE Header, the signature(s) of a JWD MUST be identical to signatures computed for semantically equivalent JWT serializations. 2. Terminology This specification uses terms defined in the JSON Web Token [JWT], JSON Web Signature [JWS], and JSON Web Encryption [JWE] specifications. These terms are defined by this specification: JSON Web Document (JWD) Smith & Hardjono Expires August 10, 2017 [Page 2] Internet-Draft JWD February 2017 A data structure representing a digitally signed, MACed, or encrypted JSON document. JWS Document Serialization A representation of the JWD as a JSON document. Unlike the JWS JSON Serialization, the JWS Document Serialization represents the JWS Payload and integrity-protected JOSE Header parameters as unencoded JSON values. This representation simplifies storage and retrieval of signed content with document stores and search engines, as well as display in applications. 3. JWS Document Serialization { "payload": , "signatures": [ { "protected": , "header": , "signature": "" }, ... { "protected": , "header": , "signature": "" } ] } Figure 1 4. JWS Flattened Document Serialization { "payload": , "protected": , "header": , "signature": "" } Figure 2 Smith & Hardjono Expires August 10, 2017 [Page 3] Internet-Draft JWD February 2017 5. IANA Considerations TBD 6. Security Considerations TBD 7. Acknowledgements TBD 8. References 8.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May 2015, . [RFC7516] Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)", RFC 7516, DOI 10.17487/RFC7516, May 2015, . [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, . 8.2. URIs [1] https://tools.ietf.org/html/rfc7515#section-7.2 Appendix A. Example Signed JWD Smith & Hardjono Expires August 10, 2017 [Page 4] Internet-Draft JWD February 2017 { "protected": { "alg": "ES512", "jku": "https://example.com/jwks" }, "payload": { "a": "Please don't BASE64URL encode me!", "b": "I need to be indexed!", "c": "I need to be rendered!" }, "signature": "" } Figure 3 Authors' Addresses Christian Smith MIT Email: csmth@mit.edu Thomas Hardjono MIT Email: hardjono@mit.edu Smith & Hardjono Expires August 10, 2017 [Page 5]