[Acme] Message Type/Version Identifiers

Anders Rundgren <anders.rundgren.net@gmail.com> Thu, 18 December 2014 11:08 UTC

Return-Path: <anders.rundgren.net@gmail.com>
X-Original-To: acme@ietfa.amsl.com
Delivered-To: acme@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E09291A07BE for <acme@ietfa.amsl.com>; Thu, 18 Dec 2014 03:08:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5kYQwD0-Rsbq for <acme@ietfa.amsl.com>; Thu, 18 Dec 2014 03:08:20 -0800 (PST)
Received: from mail-wg0-x236.google.com (mail-wg0-x236.google.com [IPv6:2a00:1450:400c:c00::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 941EA1A6FBC for <acme@ietf.org>; Thu, 18 Dec 2014 03:08:14 -0800 (PST)
Received: by mail-wg0-f54.google.com with SMTP id l2so1268546wgh.41 for <acme@ietf.org>; Thu, 18 Dec 2014 03:08:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=RjWma5iOfNMW3pQT/OoLIBsre7jtgJ2qs+tw/j45mUQ=; b=FXQmovrA8XmRLSN6RbFhwmyLoqQ/nph1aXbo0biYWBz7G3txYCn1a5wtbq9jjjJKic fEYPqa0rOJ13euD6rOe+GI2gradFQJh0fyjVdmQ4cRBGI31jGgnuXlg6ZoofG0HwGOFB wIgR3+FHfINBxlRfJP+jSKZTc6x7qUUoAUm8jgulXlWLOeMPn9rWoV/NVGBPmJPI5FsP FhrEcCdJUHW3cGqIPS9Xdp/q+k/et03+K4H2pGB6pINTkaKzGZBDWYKmMU2Yvxp10H/e Xv4rt+tg/fdsUE4qmTdrf0Qs2gi1FWLLQLYv708nGQtyvnBpD9Cq9toit/IQ4WkqzOW2 q+PQ==
X-Received: by 10.181.8.193 with SMTP id dm1mr22957518wid.55.1418900893252; Thu, 18 Dec 2014 03:08:13 -0800 (PST)
Received: from [192.168.1.79] (52.16.14.81.rev.sfr.net. [81.14.16.52]) by mx.google.com with ESMTPSA id mo12sm8502443wjc.35.2014.12.18.03.08.12 for <acme@ietf.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Dec 2014 03:08:12 -0800 (PST)
Message-ID: <5492B595.6020605@gmail.com>
Date: Thu, 18 Dec 2014 12:08:05 +0100
From: Anders Rundgren <anders.rundgren.net@gmail.com>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
MIME-Version: 1.0
To: "acme@ietf.org" <acme@ietf.org>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: http://mailarchive.ietf.org/arch/msg/acme/ANOHTsx2QCdEjyMBKEyn7aCIEUc
Subject: [Acme] Message Type/Version Identifiers
X-BeenThere: acme@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Automated Certificate Management Environment <acme.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/acme>, <mailto:acme-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/acme/>
List-Post: <mailto:acme@ietf.org>
List-Help: <mailto:acme-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/acme>, <mailto:acme-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Dec 2014 11:08:25 -0000

Hi List,
Back in the olden days when XML was king, we used a top-level element + namespace
(some even added a version attribute) to identify a particular message object.

I have "backported" these things to JSON because I think they were good.  A system like
ACME could also use such a scheme since there will undoubtedly be revisions over time.

A real-world example:
https://openkeystore.googlecode.com/svn/resources/trunk/docs/keygen2.html#Sample.KeyCreationResponse

In my particular take on this, the specific @context and @qualifier objects are registered with a
class-factory making the supporting parsing framework return a properly instantiated object of the
associated class as well as automatically rejecting unknown object types.  The framework is only
about 300 lines of java.

Anders