Re: [netmod] RFC7952 annotation to identify leaf encryption/hashing format

Ladislav Lhotka <lhotka@nic.cz> Wed, 24 May 2017 13:04 UTC

Return-Path: <lhotka@nic.cz>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 547F1129B04 for <netmod@ietfa.amsl.com>; Wed, 24 May 2017 06:04:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 dmAY3tcL1vyZ for <netmod@ietfa.amsl.com>; Wed, 24 May 2017 06:04:56 -0700 (PDT)
Received: from trail.lhotka.name (trail.lhotka.name [77.48.224.143]) by ietfa.amsl.com (Postfix) with ESMTP id 16030129AE5 for <netmod@ietf.org>; Wed, 24 May 2017 06:04:55 -0700 (PDT)
Received: by trail.lhotka.name (Postfix, from userid 109) id 8576218211FB; Wed, 24 May 2017 15:05:02 +0200 (CEST)
Received: from localhost (unknown [195.113.220.110]) by trail.lhotka.name (Postfix) with ESMTPSA id 2B78818211F7; Wed, 24 May 2017 15:04:58 +0200 (CEST)
From: Ladislav Lhotka <lhotka@nic.cz>
To: Andy Bierman <andy@yumaworks.com>, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com>, "netmod@ietf.org" <netmod@ietf.org>
In-Reply-To: <CABCOCHQC+KNk5trCMH+GaJ_nCpNVaFR9vEERzVEQw0sU8p7XvQ@mail.gmail.com>
References: <HE1PR07MB0843F3616FA7398A29599A749BF80@HE1PR07MB0843.eurprd07.prod.outlook.com> <20170522215613.GA4271@elstar.local> <CABCOCHQC+KNk5trCMH+GaJ_nCpNVaFR9vEERzVEQw0sU8p7XvQ@mail.gmail.com>
Date: Wed, 24 May 2017 15:04:49 +0200
Message-ID: <m2o9uis8we.fsf@birdie.labs.nic.cz>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/vo4iAh-KxpNIR0grJEHXF8NuozI>
Subject: Re: [netmod] RFC7952 annotation to identify leaf encryption/hashing format
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 24 May 2017 13:04:58 -0000

Andy Bierman <andy@yumaworks.com> writes:

> On Mon, May 22, 2017 at 2:56 PM, Juergen Schoenwaelder <
> j.schoenwaelder@jacobs-university.de> wrote:
>
>> RFC 7952 says:
>>
>>    4.  Annotations sent by a server should not break clients that don't
>>        support them.
>>
>> If the client is expected to understand which hash function has been
>> used to generate a hash value, then I think the hash function should
>> be communicated as proper YANG data and not as metadata.
>>
>>
> Agreed.
>
> Also, the annotation extension cannot constrain the usage of the XML
> attribute.
> It is supposed to apply to any data node (clearly hash-function does not
> apply to
> every data node.) Since it is data-node specific, it is not metadata; just
> more data.

If hashing/encryption is only intended for specific nodes and envisioned
for them in advance, then by all means YANG leaves should be used for
specifying the algorithms and other data.

On the other hand, I believe 7952 annotations might be used provided
that encryption/hashing is applied only to string or binary leaf values
so that the data model constraints are not violated, just the client
that doesn't support RFC 7952 might not be able to decode the data. This is
no different from using NACM: a client that doesn't understand NACM has
to live with the fact that some data may be missing. Here the data would
be present but unusable.

Lada

>
>
>
>> /js
>>
>
> Andy
>
>
>>
>> On Mon, May 22, 2017 at 05:16:36PM +0000, Sterne, Jason (Nokia -
>> CA/Ottawa) wrote:
>> > Hi all,
>> >
>> > Does anyone see any reasons why RFC7952 annotations couldn't/shouldn't
>> be used to identify the encryption/hashing format of an encrypted/hashed
>> leaf ?
>> >
>> > There are a number of approaches out there for encrypted/hashed leafs
>> (e.g. RFC7317 crypt-hash which encodes the hash function by prepending $x$
>> to the password, using multiple leafs for the value/algorithm, etc).
>> >
>> > These are leafs that can be typically written in cleartext or
>> encrypted/hashed format, but return only an encrypted/hashed format when
>> retrieved from a device.
>> >
>> > I think RFC7952 annotation could also be used as an approach to this
>> problem.
>> >
>> > Annotation definition:
>> >
>> >      md:annotation hash-format {
>> >        type enumeration {
>> >          enum md5l
>> >          enum sha-256
>> >          ...
>> >        }
>> >      }
>> >
>> > An 'auth-key' leaf that is hashed:
>> >
>> >     <auth-key hash-format="sha-256">
>> >       QsdsEWfjKAowjjhQHHslJSHHll
>> >     </auth-key>
>> >
>> >
>> > Regards,
>> > Jason
>> >
>> > Note - I don't believe this statement in section 9 would point anyone
>> away from using annotations for encryption/hashing information (since the
>> encrypted leafs are data nodes):  "It is RECOMMENDED that
>> security-sensitive or privacy-sensitive data be modeled as regular YANG
>> data nodes rather than annotations."
>> >
>> >
>> >
>>
>> > _______________________________________________
>> > netmod mailing list
>> > netmod@ietf.org
>> > https://www.ietf.org/mailman/listinfo/netmod
>>
>>
>> --
>> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
>> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
>> Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>
>>
>> _______________________________________________
>> netmod mailing list
>> netmod@ietf.org
>> https://www.ietf.org/mailman/listinfo/netmod
>>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67