Re: [babel] babel-dtls: verifying "authentication"

David Schinazi <dschinazi.ietf@gmail.com> Wed, 09 January 2019 22:06 UTC

Return-Path: <dschinazi.ietf@gmail.com>
X-Original-To: babel@ietfa.amsl.com
Delivered-To: babel@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2E98A126DBF for <babel@ietfa.amsl.com>; Wed, 9 Jan 2019 14:06:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 HPyPSeF56-0S for <babel@ietfa.amsl.com>; Wed, 9 Jan 2019 14:06:52 -0800 (PST)
Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 02C5312D4F2 for <babel@ietf.org>; Wed, 9 Jan 2019 14:06:51 -0800 (PST)
Received: by mail-pg1-x52b.google.com with SMTP id w7so3873809pgp.13 for <babel@ietf.org>; Wed, 09 Jan 2019 14:06:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/4UPWuuP4CvNBhp4VKYcb1Rn3+fSCZi+FIo6RcLuKf0=; b=WLDk1KEVelOUcOY2hpE4KXc+qgaSJuJYiWEDdyARa8UWYEDryjKz7yKEi5f5kzG5HG 14UUxsNkrgp9o+DyissirQtoH6BebAqraxW9aikI5QGEly+hTXg5QeetJ/xeixQ2x+bY x7ttpusiogBS/YUyAT5O4Ijw+dicJVidNJ4htpukiUWPtKzqFz0admW+ME5tGRLZYR+J i0JiePv6yfIKYsebT3Ylt2Hm5LGIWu7Obpe46zJ5apRas+whkGsLtR+slkqPntnH3NPw qG+U6pq1+SnQ4RrRJQl2/y4PDmp290RwPFxWEIaHQ6fuubBqijoFbuuGER7GTF15W+j0 kX7w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/4UPWuuP4CvNBhp4VKYcb1Rn3+fSCZi+FIo6RcLuKf0=; b=HQ/Gu7codrmA+rpL3nhlZpi43x+NJx8BeVdprI20pWDcLr0uqFlKdTnFJ8Ly8xdBi+ 8kDGBYpgzycdCnufZ/MSsawyOoqsvVcO4yBBUfYQOp5M84ZvaFiCETUjzc/55KwFoX+B Quhbho8YUzKA8fviX/+6uJMUTSl48mCAyItZfzYJADF8+YRDDSA4qswAbbJR94VBBQib PrgrIYNuw9BfgYL2kTthAaDtRyKm+f6F+V8nC77QbYN50fow6MJXtcCaqGJSEF5YAd6E 7IIGZ4uuCFM6cRiJSY6262YkoC/5fyX4A9yt4sSHESexjOYcR+tvJT6Ir4ogeVAPQyHu UNqg==
X-Gm-Message-State: AJcUukf1Y3b8J+QXJuTl1xjkloC70916zITOJH+i7nbWEvXbd/RgeYMJ 9aYzmje53Jx7AVsNWuTaRyBs87G1ER6N/zNNRdE=
X-Google-Smtp-Source: ALg8bN5bR0dXLfrr0fBC1nSnuFSz9pH0GA8nwvQLFB0wUdgfJT67NAsaQCbo31nIGCvXCpHkGGva1qosHtbkmmIT5EQ=
X-Received: by 2002:a62:1b83:: with SMTP id b125mr8003818pfb.42.1547071611382; Wed, 09 Jan 2019 14:06:51 -0800 (PST)
MIME-Version: 1.0
References: <2D09D61DDFA73D4C884805CC7865E6114DF8A154@GAALPA1MSGUSRBF.ITServices.sbc.com>
In-Reply-To: <2D09D61DDFA73D4C884805CC7865E6114DF8A154@GAALPA1MSGUSRBF.ITServices.sbc.com>
From: David Schinazi <dschinazi.ietf@gmail.com>
Date: Wed, 09 Jan 2019 14:06:40 -0800
Message-ID: <CAPDSy+6cuAJ1m1-DJAHVNjmsQHP6SOJoFSZx6bF6x8o48xs71Q@mail.gmail.com>
To: "STARK, BARBARA H" <bs7652@att.com>
Cc: Babel at IETF <babel@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000d6af0c057f0dad26"
Archived-At: <https://mailarchive.ietf.org/arch/msg/babel/zkvLlpfdFBIKUzBxdTNUfyWzglY>
Subject: Re: [babel] babel-dtls: verifying "authentication"
X-BeenThere: babel@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "A list for discussion of the Babel Routing Protocol." <babel.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/babel>, <mailto:babel-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/babel/>
List-Post: <mailto:babel@ietf.org>
List-Help: <mailto:babel-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/babel>, <mailto:babel-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Jan 2019 22:06:55 -0000

Hi Barbara,

Thanks for your review. Responses inline.

On Wed, Jan 9, 2019 at 1:42 PM STARK, BARBARA H <bs7652@att.com> wrote:

> I read the draft and think the last paragraph of 2.1 could do with a
> little more verbiage as to what "fails to verify the peer's authentication"
> means, since it's part of a "MUST" normative statement. I also don't think
> the word "authentication" is used consistently or (in some cases)
> correctly. I think of "authentication" as a process.
>
> I find "request client authentication" and "verify the peer's
> authentication" to be odd uses of the word "authentication", and not
> consistent with my understanding of the word. I would suggest something
> like "request client certificate" (consistent with the name of the message
> that is sent) or "request client credentials" for the first phrase. And
> perhaps "validate the peer's certificate" or "validate the peer's
> credentials" for the second. Unless you mean something different by
> "verify" vs. "validate" here.
>

Our intent was to use the terms authenticate and authentication in the same
way as the TLS specifications do, in particular see the TLS 1.3 spec
introduction <https://tools.ietf.org/html/rfc8446#section-1>.


> Will only X.509 certificate keys be allowed, or will "DH_anon" key
> exchange be allowed?
>

babel-dtls does not specify what source of authentication to use, X509 are
one allowed option, but they are not mandated
DH_anon is prohibited by "Nodes MUST use mutual authentication" (and
subsequent clarifying text in section 2.1)


> Here are the possible things that are sometimes done as part of
> certificate validation, that I think this phrase is potentially referring
> to:
> 1. Ensure the certificate validDate is not in the past. This check should
> only be done if the implementation thinks the underlying system has
> acquired a good current time (i.e., it runs a NTP client and getting the
> current datetime via NTP has succeeded, or the current datetime has been
> configured).
> 2. Check the certificate's chain of trust for a trusted CA. This would
> mean there is a configured set of trusted CAs.
> 3. Check if the certificate has been revoked. This is often not done, but
> might not be a bad idea the first time the certificate is seen.
> 4. Check if this identical certificate is included in a store of trusted
> certificates (either it was previously trusted and stored or the store is
> configured).
> 5. Check some aspect of "identity". Is there some characteristic of the
> peer that is expected to be stable wrt a certificate? For example, would
> the same certificate always originate from the same MAC address or LL IPv6
> address?
> 6. If a TOFU (trust on first use) policy is supported, what exactly should
> be trusted (and what should not be trusted)? I do like allowing for a TOFU
> policy (if an implementation chooses to support one). If it is allowed, I
> would suggest something like the cert is TOFU if the IPv6 LL address hasn't
> been seen before (new neighbor). After that it always has to use the same
> cert. When changing certs, send old and new cert together for some time, so
> new cert is associated with trusted old cert.
>
> Presumably, a device might be configured with a new certificate at some
> point (like when the old one expires). Will the new certificate be
> considered the same neighbor if the "identity" matches (see item 5 for
> question on determining identity)? If you get a request for a new DTLS
> session and already have a session for that "identity" (IPv6 LL address?)
> with a different certificate, what do you do?
>
> If there is already a DTLS connection using a provided certificate, what
> do you do if you get a request for a new DTLS session using the same
> certificate? Tear down the old one?
>
> With all this said. I think it might be enough if the draft had statements
> like:
> "The key exchange mechanism used MUST require use of X.509 certificates."
> (if this is the intent)
> "Certificate validation MUST be done according to internal policy.
> Characteristics of certificates that MAY be used for validation include the
> validDate, the Certificate Authority (CA) chain of trust, inclusion in a
> revocation list, prior determination of trust, and whether the IPv6 link
> local address is the same as in prior uses of the certificate. A trust on
> first use (TOFU) model MAY be supported, with policy defined by the
> implementation. Any TOFU policy MUST, at a minimum, ensure that a given
> certificate is only ever used from a single IPv6 link local address
> (neighbor) and fail an unknown certificate used for an IPv6 link local
> address already associated with a trusted certificate. "
> "When new certificates are issued, they SHOULD be sent together with the
> old certificate prior to the old certificate's expiration or revocation, so
> it is possible for the new certificate to inherit any trust associated with
> the old certificate."
>

Certificate validation is out of scope for the babel-dtls draft, in the
same manner as it is out of scope for the TLS or DTLS RFCs. I don't think
any mention of certificates at all belongs in this draft, as some
applications may choose to not use certificates. In the case of babel, the
babel-dtls draft specifies how to use DTLS; on the other hand the
certificates and PKI you use is left to the users of babel-dtls, for
example the homenet mapping document could mandate X509 and how to add new
certificates to the trust store, and the other points you mentioned would
make sense to me in that document.

Or make certificate validation a SHOULD. ☹
>

Validating identity is a MUST, the fact that that identity maps to a
certificate is a MAY.

Thanks,
David