Re: [dtn] Benjamin Kaduk's Discuss on draft-ietf-dtn-tcpclv4-18: (with DISCUSS and COMMENT)

Brian Sipos <BSipos@rkf-eng.com> Tue, 17 November 2020 04:56 UTC

Return-Path: <BSipos@rkf-eng.com>
X-Original-To: dtn@ietfa.amsl.com
Delivered-To: dtn@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 894993A0D6D; Mon, 16 Nov 2020 20:56:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.1
X-Spam-Level:
X-Spam-Status: No, score=-2.1 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=rkf-eng.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 cjHRxS7pjR_r; Mon, 16 Nov 2020 20:56:16 -0800 (PST)
Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680084.outbound.protection.outlook.com [40.107.68.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CA3DE3A0D73; Mon, 16 Nov 2020 20:56:15 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h7T42Kx5lgUnlgiIhC26uWnLZccWH2CXf8SevP6CpZ3rybBFlQKtsXBotEaeOG0Bi0LluJ7aixceZk9NJnn1H71TBACwKAcuekJp+dyr8aizhdSDl4IhfHOQYnLraIFE6PmQSYsX42ODhJZfoiNT4KM1diCKtYs1CT3yb5590+X2TRUpLpG3B4AosV9JuqzsqTNNbZbuvwMBlNMBlaI+0qaquiTHDBxU6pfb6/K1WUPi2PB1UE7zN5vTgtnRe9cOlqo2/IemavITpXvyFwwTZOhMqkjg7XHNDG5I2Hh/NxXtlVbOSypaqmRWOBxovwPHXowmxCabHivuQ/T0thiD/w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h7ofbFz8HHWhgJT2YmZ5wqIUg25gwHEYdvNM57X4mlE=; b=hKdrtA4n7wYCW8KZ6gtzm/3ZH5izac+2b0wdZOK5bxsQCcmPjx8jldc85Rm3cFArQJ7ftT7G2wGHoxRtELdM4D9lm3U5cekWh8UiKOEf3DXx8YHAvkrpk2g+xG46WNgUoxEpfeJeAX/tgrvxS04/sTIDyp7ik0GTTamsqtabNYSDMxONAgcmyJT2mwECnAl/e7KIeCaGGqp4vHUzabcy7XQ/Bs9pfXErhm6DAwg+LjFeDDKg+L6i6tPBSRF8VRx7G6WXY8niDOiVkDuA+1swy0B9igpywe+YF+WTpI2aBtvUbDB2Wx52rsJbBJdfXFbFI/YtSUO6jOaU8jusKE54wg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=rkf-eng.com; dmarc=pass action=none header.from=rkf-eng.com; dkim=pass header.d=rkf-eng.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rkf-eng.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h7ofbFz8HHWhgJT2YmZ5wqIUg25gwHEYdvNM57X4mlE=; b=iJ3v9S165Cja6Qnhkb2HXexdkVpQ1ePOYNwijuhKqqMWuiqBFDuyOlbmbVguUOtFsyOnYm6jWe9KTabI2gqUBSZDeJZY6Sk1uj5YzWk1x/KhPddu9OV8AOyd+SJp28TPqpRbN/x4NT8LEeUhgrl9A7WiJjZc8KWQkijMnI9PEm8=
Received: from MN2PR13MB3567.namprd13.prod.outlook.com (2603:10b6:208:168::10) by MN2PR13MB3901.namprd13.prod.outlook.com (2603:10b6:208:1e4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.16; Tue, 17 Nov 2020 04:56:11 +0000
Received: from MN2PR13MB3567.namprd13.prod.outlook.com ([fe80::54f4:962e:10e5:a2e1]) by MN2PR13MB3567.namprd13.prod.outlook.com ([fe80::54f4:962e:10e5:a2e1%7]) with mapi id 15.20.3589.016; Tue, 17 Nov 2020 04:56:11 +0000
From: Brian Sipos <BSipos@rkf-eng.com>
To: Benjamin Kaduk <kaduk@mit.edu>
CC: "draft-ietf-dtn-tcpclv4@ietf.org" <draft-ietf-dtn-tcpclv4@ietf.org>, "dtn@ietf.org" <dtn@ietf.org>, "edward.birrane@jhuapl.edu" <edward.birrane@jhuapl.edu>
Thread-Topic: Benjamin Kaduk's Discuss on draft-ietf-dtn-tcpclv4-18: (with DISCUSS and COMMENT)
Thread-Index: AQHV53Zb41S7JLUh9UuyQty5MZTUgag7HDOAgUhAaQCAKPLSGIAg5puAgAAeS/8=
Date: Tue, 17 Nov 2020 04:56:11 +0000
Message-ID: <MN2PR13MB356779F92D179B1BE33D1FD59FE20@MN2PR13MB3567.namprd13.prod.outlook.com>
References: <158215235500.17580.7759757155303566523.idtracker@ietfa.amsl.com> <50c5dae1bc26ade7d0fcd9388873665868f7284c.camel@rkf-eng.com> <20201001015416.GE89563@kduck.mit.edu> <MN2PR13MB3567B7727DF06411E47A826A9F160@MN2PR13MB3567.namprd13.prod.outlook.com>, <20201117013925.GB39170@kduck.mit.edu>
In-Reply-To: <20201117013925.GB39170@kduck.mit.edu>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: mit.edu; dkim=none (message not signed) header.d=none;mit.edu; dmarc=none action=none header.from=rkf-eng.com;
x-originating-ip: [96.241.16.84]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 73abcf41-29a7-402b-246b-08d88ab51ad4
x-ms-traffictypediagnostic: MN2PR13MB3901:
x-microsoft-antispam-prvs: <MN2PR13MB3901461BC9DAE75490DD477F9FE20@MN2PR13MB3901.namprd13.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: NIsxmcFRFau5/7RbsMn/vNzNWltiTn6oz8HS4Zrw4Wl/SxY8ibtia9j0P/6Z4cP4AOEwyofVv5X7Zwa6pEze2oncFsNvYsgY2q4AsOnCmgOxQ8/gVj2+gEWJUEnhgdnP3fJN4aa5H7A280dhs4R5vAQVWd3BbI7ImIpxO8v3Y8rUE/YVSakWeRKwkvXPTT3LUPLv/7OPS4PIbQqpd1QhRR2Di5AAv1tpyP+axhncDA9TwvnYUpwTZh/IUiua2iy/Jmce2dFn6lL/nfAibIpTgtavHu/P6GL13GNlV0LsO8fglfhozR6YRa/iaYT7tuAZJ1cxtPnxa+bZU3ZMS4HJxw==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR13MB3567.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(376002)(366004)(396003)(39830400003)(316002)(9686003)(478600001)(6916009)(2906002)(54906003)(55016002)(53546011)(6506007)(7696005)(4326008)(186003)(26005)(8676002)(8936002)(19627405001)(86362001)(33656002)(66946007)(76116006)(30864003)(64756008)(71200400001)(52536014)(5660300002)(66446008)(66574015)(66476007)(66556008)(83380400001); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: Sc7lb5jbICrUqMSd5mgQAbPTpW374PSKbA68ksTLf+qodtVEdnuD1nuO+vnlW5OvydyWNMOTzFki6fbs5T0mo/8xWlEBG9l1MxeEENjufRxLefM3KmN13nD8+WtnQJlY6e8yJOITQFQ4z1Z1vEAovle93nUdAQzJs0b6ljYs4OEruvGp6lxOdV6x/iywlMYdB5Ym3F+0a3V+JWku9RzPq0YWGDBbZf7hpa/gt+RekhKtzNFenUDMx86foLePXvCgmKA8vm7QiCjt8CudVg16YEW84lsNqRxM/BG9pVbVuLHB6C0gyTNV31AV6Gj0/25tImMImHw5DyeWN/H7MRqSuZfmVO6F1KMeF37E6nOIWHZnsXFB9w0nk49BEkNk1He+2U0EQaoe5K5zP955qd9rZ2KdXnjVs26oQDlsmo3pYC/ukFwilunmZW8C1sSkvLVh8JArw8QUG853VRBw6eN7G3yuXEMH1oX14idRD5RUwfhvGz85YiiMrV2ia2LxCoHfZMLzAvPShgJvDtRh6yObDx3IAZl4et0OrDVzHPu2j50U+FQsn+JgYKrcvuYQS4kOfue1rVAk6u2XytqWwegxXIDyKcNEAr/SL74XMD1XJXvyBgrS6QERcLa1NKayGURHFVIycB6rESQICvjqmXPHM/u12YQvEy/Wjk3nlGa3rDJD1QHqGPt3QKx7UpFOuwa0OQ7qWxkd5JFxL3g2ABIZNWTiBYMPHoKwtFb9Gsq1XOikbyCCvtCEGDsEKk6aqr/KesKwvyBuw6wVuRigakOa+yodgqs/IULRu3QI6f9wPwzAaof/7QABGT7PuSyzm5b0tUKd14i5d/PA7yALSnae7AiwIXGBdl3rW9fCfiEPiD70TGmQDoLD5vV4/7itWWnzluBz8qMS8Qxr/08va28VAA==
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_MN2PR13MB356779F92D179B1BE33D1FD59FE20MN2PR13MB3567namp_"
MIME-Version: 1.0
X-OriginatorOrg: rkf-eng.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: MN2PR13MB3567.namprd13.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 73abcf41-29a7-402b-246b-08d88ab51ad4
X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Nov 2020 04:56:11.5710 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4ed8b15b-911f-42bc-8524-d89148858535
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: X9cJfhaxgb64UY0vvp1Adw1VP5zYwoF9WERnuWy4OpCN1EP/ALsp4BSGUx3B0+wdFTmXwy1FSyyyixD06DxO7A==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR13MB3901
Archived-At: <https://mailarchive.ietf.org/arch/msg/dtn/rADeXAcWq4runsViwg3-xeFwmfE>
Subject: Re: [dtn] Benjamin Kaduk's Discuss on draft-ietf-dtn-tcpclv4-18: (with DISCUSS and COMMENT)
X-BeenThere: dtn@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Delay Tolerant Networking \(DTN\) discussion list at the IETF." <dtn.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dtn>, <mailto:dtn-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dtn/>
List-Post: <mailto:dtn@ietf.org>
List-Help: <mailto:dtn-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dtn>, <mailto:dtn-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Nov 2020 04:56:19 -0000

Ben,
I really appreciate the critical eye for security implications and know that small oversights can lead to big problems.
Part of the reason for this somewhat slow drag toward a solid set of TLS requirements is the starting point of web-PKI-focused tools and TCPCLv3 statement that "Nothing in TCPCL prevents the use of the TLS protocol to secure a connection" leaves gaps to fill.

Related to your earlier reply, I think that allocating a EKU OID for DTN will help to turn some of these assumptions about CA behavior into actual encoded claims of purpose. Do you think that these two can be treated as equivalent for the goal of recommended security policy?

  1.  A certificate with an exact NODE-ID (and EKU either absent or including DTN). This leaves no doubt about the claim.
  2.  A certificate with a DNS-ID or IPADDR-ID and with a EKU including DTN. Indicates that the CA is aware that the host is intended as a DTN node.

Should #2 be explicitly related to the use of opportunistic security? Only if an entity has enabled opp. sec. does the DNS-ID or IPADDR-ID matter. Otherwise, only the NODE-ID matters.
Do other protocols make a hard separation between "enabled or disabled" in relation to opportunistic security?

For background on how this would be used in DTN: Because DTN is an overlay network, bundle routing always requires a node to have logic related to "when a bundle needs to go to endpoint X, it's next hop should be node Y over convergence layer Z" where "Y" is the next-hop Node ID and "Z" is the transport which (for internet transports) includes either a DNS name or IP address (i.e. some way to contact the node). The idea is that a peer already has an idea of "what node am I looking to send this to" and uses that DNS name or IP address to contact that node.
I think that this means that the in-band Node ID is superfluous for this use, and is more useful as a diagnostic "oops, I was trying to contact Z but you claim to be W" warning mode. This is how some existing DTN stacks behave.
The benefit to having a certificate claim on a Node ID directly is that there is added agility to use multiple DNS names or IP addresses over time as network topology or access change (as a DTN is wont to do).

One last topic of the authentication logic: I did originally look at requiring it that way, but the current text has a behavior which that type of logic does not; if a certificate does contain an IPADDR-ID then the current text requires it to match the connection. The different claim types are ANDed together. If a cert has a NODE-ID and an IPADDR-ID they both must authenticate the peer, regardless of policy. Policy may only allow the absence of a claim type it may not allow a failed claim type.

________________________________
From: Benjamin Kaduk <kaduk@mit.edu>
Sent: Monday, November 16, 2020 20:39
To: Brian Sipos <BSipos@rkf-eng.com>
Cc: draft-ietf-dtn-tcpclv4@ietf.org <draft-ietf-dtn-tcpclv4@ietf.org>rg>; dtn@ietf.org <dtn@ietf.org>rg>; edward.birrane@jhuapl.edu <edward.birrane@jhuapl.edu>
Subject: Re: Benjamin Kaduk's Discuss on draft-ietf-dtn-tcpclv4-18: (with DISCUSS and COMMENT)

Hi Brian,

Thanks for the updates in the -22 (and -23 that landed more recently).

On Tue, Oct 27, 2020 at 03:49:24AM +0000, Brian Sipos wrote:
> Ben et al.,
> I've posted an updated draft which includes changes to address all but one of the latest SECDIR comments. The one remaining comment relates to when TLS is supposed to be negotiated for use:

I think we need to continue the conversation about
naming/certificate-validation; more below.

> I think we can also wordsmith the setting of CAN_TLS a little more;
> previous discussion indicated a desire to (e.g.) not require TLS when
> operating over IPsec, but that's a different criterion than "capable of
> exchanging messages [with TLS]".  It's also inconsistent with a desire
> to make TLS support mandatory to implement (but not mandatory to use),
> since mandatory to implement implies mandatory to be "capable of
> exchanging messages with TLS", thus mandatory to use.
>
> For my own purposes and for public network use TLS would be expected, so I don't have a full idea of when TLS would be desirable to negotiate away. Would a more generic statement, inverting the current logic, such as the following work?
>
> When sufficient security is not supplied by network layers under TCPCL, the the CAN_TLS flag within its Contact Header SHALL be set to 1.
> When CAN_TLS flag is set to 1, the peer SHALL be capable of exchanging messages according to TLS 1.3 [RFC8446] or any successors which are compatible with that TLS ClientHello.

This phrasing would address my concerns (I gave a different alternative in
my response to Ran a few minutes ago).



Back to the topic of naming and the authentication/certificate-validation
procedures.  Instead of just looking at diffs, I went and re-read all of
§4.4 of the -23 to try to look at a coherent picture of the current draft.
I'll put some specific comments later on, but will try to stick to a
high-level picture here since I'm still not sure that we're understanding
each other very well.

In a typical PKI setup, such as the Web PKI, a CA issuing a certificate
only is making claims about the specific bits in the certificate: for
Subject information like a DNS-ID, the CA verifies that the entity
requesting the certificate controls the domain name in question, and
specific X.509 extensions or extendedKeyUsage values may have additional
semantics (and require additional CA verification of the entity requesting
the certificate).  In particular, it does not say anything about the
general trustworthiness of the holder of the certified private key -- one
example of this is how ACME/Let's Encrypt makes it easy for
spammers/phishers to get valid Web PKI certificates for their malicious
domains.  So in this document when we set up a scenario where an entity
authenticated only with DNS-ID or IPADDR-ID is then somehow trusted to
provide a valid/correct Node ID in the SESS_INIT, this is a huge leap of
faith, in the general case.  Now, if we limited our trust anchors to only
CAs that do additional validation (such as only issuing certificates to
trusted end-entities), or if we required a DTN-specific extendedKeyUsage
value and assign semantics to that EKU value that requires the CA to be
careful about who it issues certificates for, then this leap of faith can
become more controlled and limited, but with only the procedures we
describe in the -23, it's a rather unbounded risk.

Accordingly, if a given entity is willing to accept DNS-ID authentication
of a peer and any claimed Node ID from that peer, then the provable
security of the entire network of nodes that includes that entity degrades
accordingly (in the internet threat model), since the attacker can claim
any Node ID.  A more subtle security policy can improve the situation, if
we could know a priori that (for example) certain Node IDs will always be
able to provide a certificate for that NODE-ID -- then we could only fall
back to allowing DNS-ID validation plus peer-claimed Node ID when we're
initiating connections to other nodes, and we could additionaly apply some
sort of filter to which received Node IDs we allow in the SESS_INIT.  But
that requires having policy in place before we start a connection, based on
the Node ID we're trying to reach -- a reactive behavior where we wait for
what the peer gives us and try to validate that leaves us open to an
attacker manipulating us into using the weakest validation procedures.

I'd like to have a better understanding of how you picture the case with no
NODE-ID in the cert being used, and what kind of limitations can be placed
on the peer's ability to claim arbitrary Node IDs in that case.  I feel
like I'm still assuming or inferring a lot, so I don't know how well my
understanding maps to the intended usage.  I'm happy to get on a call to
chat about this (and I plan to be in the IETF 109 gather.town space a lot
this week as well).


I also have a note in my specific comments about the apparent case when
just authenticating the peer's NODE-ID is not sufficient, and we would also
insiste on DNS-ID (or IPADDR-ID) validation.  In my intuition, the Node ID
is the application-layer identity that we're trying to authenticate, and
even if the DNS-ID authentication fails we still would believe that we're
talking to the intended Node.  As I say below, "what's the motivation for
failing the connection if the NODE-ID authenticates but the DNS-ID
doesn't?"  I could imagine that there's some desire to have an initial
authentication occur during the TLS handshake, in accordance with the
typical TLS implementation behavior, and then have a separate check for the
Node ID after the TLS handshake has completed; this would keep the
components separate and have a clean abstraction barrier, but the current
description in the -23 doesn't really give me the impression that that was
the intent.

The rest of my specific comments appear below.

Thanks again,

Ben


Section 4.4.1

   Node ID:  The ideal certificate identity is the Node ID of the entity
      using the NODE-ID definition below.  When the Node ID is
      identified, there is no need for any lower-level identification to
      be present (though it can still be present, and if so it is also
      validated).

It's pretty weird to say "if [lower-level identification is present] it
is also validated".  Part of why it is weird is because it's another
example of letting the as-yet-untrusted peer affect what validation
procedure is used for authenticating it, but it also feels like the
NODE-ID is the actual identifier we care about, and even if there's (for
example) DNS hijacking or NAT going on, if we have authenticated the
NODE-ID we know it's the entity we are trying to talk to.  What's the
motivation for failing the connection if the NODE-ID authenticates but
the DNS-ID doesn't?

   When only a DNS-ID or IPADDR-ID can be identified by a certificate,
   it is implied that an entity which authenticates using that
   certificate is trusted to provide a valid Node ID in its SESS_INIT;
   the certificate itself does not actually authenticate that Node ID.

Perhaps a bit meta, but trusting the end-entity with such a cert to
identify itself transitively implies trusting the CA to only issue
certificates to entries that are trusted to provide the correct Node ID.
So I'd consider adding another sentence here along the lines of
"Such trust is in general not guaranteed by PKI name certification,
though a specific set of trusted CAs may apply more stringent
certificate issuance criteria."

   The RECOMMENDED security policy of an entity is to validate a NODE-ID
   when present, and only require DNS-ID/IPADDR-ID authentication in the
   absence of a NODE-ID.

(This is still leeting the as-yet-untrusted entity affect its own
validation procedure.)

Section 4.4.3

   SHALL perform the certification path validation of [RFC5280] up to
   one of the entity's trusted CA certificates.  If certificate
   validation fails or if security policy disallows a certificate for
   any reason, the entity SHALL fail the TLS handshake with a bad
   certificate error.  Leaving out part of the certification chain can

nit: it's conventionally phrased as 'with a "bad_certificate" alert'.

   Either during or immediately after the TLS handshake if the active
   entity resolved a DNS name (of the passive entity) in order to
   initiate the TCP connection, the active entity SHALL authenticate
   that DNS name using any DNS-ID of the peer certificate.  If the DNS
   name authentication result is Failure or if the result is Absent and
   security policy requires an authenticated DNS name, the entity SHALL
   terminate the session (with a reason code of "Contact Failure").

(editorial) the actual behavior here is okay, but the way it is written
with "SHALL authenticate that DNS name" seems to strongly imply that the
entity has to go through the motions of doing that work, even if the
local security policy isn't going to care about the result.  My
preference (which you have no obligation to heed) would be to flip the
order around to say that if security policy requires the result, then it
SHALL do the DNS name authentication.
(Similarly for the IPADDR-ID and NODE-ID text, of course.)