Re: [Iotops] Error categories in constrained IoT authentication

Toerless Eckert <tte@cs.fau.de> Wed, 24 February 2021 00:35 UTC

Return-Path: <eckert@i4.informatik.uni-erlangen.de>
X-Original-To: iotops@ietfa.amsl.com
Delivered-To: iotops@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B84543A1270 for <iotops@ietfa.amsl.com>; Tue, 23 Feb 2021 16:35:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.868
X-Spam-Level:
X-Spam-Status: No, score=-0.868 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779, URIBL_BLOCKED=0.001] autolearn=no 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 f6t9D-35BKY6 for <iotops@ietfa.amsl.com>; Tue, 23 Feb 2021 16:35:40 -0800 (PST)
Received: from faui40.informatik.uni-erlangen.de (faui40.informatik.uni-erlangen.de [IPv6:2001:638:a000:4134::ffff:40]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1286B3A128C for <iotops@ietf.org>; Tue, 23 Feb 2021 16:35:05 -0800 (PST)
Received: from faui48f.informatik.uni-erlangen.de (faui48f.informatik.uni-erlangen.de [131.188.34.52]) by faui40.informatik.uni-erlangen.de (Postfix) with ESMTP id 5467F54804D; Wed, 24 Feb 2021 01:35:00 +0100 (CET)
Received: by faui48f.informatik.uni-erlangen.de (Postfix, from userid 10463) id 4C896440163; Wed, 24 Feb 2021 01:35:00 +0100 (CET)
Date: Wed, 24 Feb 2021 01:35:00 +0100
From: Toerless Eckert <tte@cs.fau.de>
To: G?ran Selander <goran.selander=40ericsson.com@dmarc.ietf.org>
Cc: "iotops@ietf.org" <iotops@ietf.org>
Message-ID: <20210224003500.GM35983@faui48f.informatik.uni-erlangen.de>
References: <49569FF2-938B-4584-B290-F16558F352F5@ericsson.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <49569FF2-938B-4584-B290-F16558F352F5@ericsson.com>
User-Agent: Mutt/1.10.1 (2018-07-13)
Archived-At: <https://mailarchive.ietf.org/arch/msg/iotops/2e3uasxAOzIf3uX6B1hb8QpZIgo>
Subject: Re: [Iotops] Error categories in constrained IoT authentication
X-BeenThere: iotops@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IOT Operations <iotops.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/iotops>, <mailto:iotops-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/iotops/>
List-Post: <mailto:iotops@ietf.org>
List-Help: <mailto:iotops-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/iotops>, <mailto:iotops-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Feb 2021 00:35:43 -0000

Some thoughts:

a) i haven't seen anything in the ask that i would consider IoT specific, but then
   again, i am not sure what IoT is. As in: unless someone suggests a better WG this is
   IMHO a great topic to discuss if not work on.

b) I think it would be worthwhile to write up generic guidance to design diagnostics in the
   face of security. I hrve seen this done wrong, although my last vivid memories are from
   non-iot use cases (systems that tried hard to do everything wrong that could be done
   wrong in username/password authentication).

c) best diagnostic requires IMHO operational experience. What does help are ways to create
   more agile mechanisms than writing a spec. For example creating a registry to which things
   can be added applying and extending existing RFCs. (a bit different form of a registry
   than the typical IANA ones). That might help for diagnostics to evolve more agile.

d) Some class of diagnostics that really helps the good guys may help the bad guys, but they
   still need brute force. Slowing down things can be the tool to permit the good diagnostics
   while still hurting the bad guys.

e) For IoT specific i would certainly appreciate a complete formal distinction of
   error codes. Sending some generic "0x999 (random error) and detailling what actually
   happens in text field afterwards works for "Simple Classical Human Protocol", but not (IMHO)
   for IoT.

f) One maybe useful criteria to coalesce diagnostics into as few as possible different ones
   is to ask: whats the difference in actionable next steps. If there is no difference then
   likely those different diagnostics could be one.

g) In one common case a device might give an error 
   0x7411 Only my admin can help, ticket #345687

   As in: the other side observing this error really can only refer to the (unique)
   ticket id and tell that to he admin of the reporting device. For various reasons
   Many of which likely are embarassing to the admin of the device ;-)

  Aka local ticketing of error events is another common scheme for diagnostics.

Cheers
    Toerless

On Mon, Feb 15, 2021 at 04:53:44PM +0000, G?ran Selander wrote:
> Hello IOTOPS,
> 
> There is a discussion in the LAKE WG regarding the potential need to standardize error messages appearing in a security handshake protocol targeting IoT devices. Is this something IOTOPS could contribute to and/or review?
> 
> 
> Assuming this might be the case, here is a background and some draft error categories for discussion.
> 
> Background: 
> ---
> LAKE is specifying a lightweight authenticated Diffie-Hellman exchange called EDHOC [1] similar to the TLS 1.3 handshake but targeting constrained IoT. The protocol consists of 3 messages and an error message which may be sent in response to any non-error message. The error message essentially consists of a diagnostic message field containing a text string targeting the peer administrator.
> 
> All errors are fatal and cause the protocol to discontinue. The intent with the error message is to provide a hint about the error to the peer application, to enable logging of errors and appropriate management operations. (Note that since the protocol failed to establish security the error message is unprotected and needs to be treated accordingly.)
> 
> The question is what error messages need to be standardized, if any.
> 
> Detailed information can be provided by using the diagnostic text string. But standardizing detailed error information adds complexity to the specification and implementation, which would contradict one of the design objectives. But perhaps we can we identify a small set of error categories (codes) that require to be singled out, for example because how they impact operations. Such categories could potentially be complemented with text providing additional details.
> 
> Please find below a first sketch of error categories (inspired by error alerts from TLS 1.3 [2]).  
> 
> Two questions (going in opposite directions):
> 
> 1. Do we need to make more distinctions/are there missing error categories? 
> 2. Are these distinctions necessary, or can we remove/group together some of them? 
> 
> 
> Draft error categories:
> ---
> A. message field error (syntax error or incorrect protocol field)
> 
> B. integrity error (unable to correctly verify a signature or a MAC)
> 
> C. credential error (error related to the attempt to use a certificate/raw public key as a basis for autentication, e.g., certificate expired, revoked, unsupported, corrupt, unknown CA etc.)
> 
> D. access denied (credential valid but peer not allowed access)
> 
> E. internal error (error not related to the protocol or the peer)
> 
> F. auxiliary data error (unsupported or missing extension)
> 
> G. cipher suite not supported (this particular error has already been specified with a special message field, see Section 6)
> 
> 
> Any comments are welcome.
> 
> Thanks
> Göran
> 
> [1] https://tools.ietf.org/html/draft-ietf-lake-edhoc
> [2] https://tools.ietf.org/html/rfc8446#section-6.2
> 
> 
> 
> -- 
> Iotops mailing list
> Iotops@ietf.org
> https://www.ietf.org/mailman/listinfo/iotops