Re: [kitten] WGLC on draft-ietf-kitten-pkinit-freshness-01

Michiko Short <michikos@microsoft.com> Tue, 13 October 2015 18:54 UTC

Return-Path: <michikos@microsoft.com>
X-Original-To: kitten@ietfa.amsl.com
Delivered-To: kitten@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B20F51A874F for <kitten@ietfa.amsl.com>; Tue, 13 Oct 2015 11:54:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.002
X-Spam-Level:
X-Spam-Status: No, score=-2.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_PASS=-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 WL6BDqXagGmw for <kitten@ietfa.amsl.com>; Tue, 13 Oct 2015 11:54:43 -0700 (PDT)
Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0761.outbound.protection.outlook.com [IPv6:2a01:111:f400:fc10::1:761]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 99DEB1A7004 for <kitten@ietf.org>; Tue, 13 Oct 2015 11:49:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Izd1XWf9E09264v/V4aA340sii/BM5S8IINc26mIncA=; b=JJZC8jCCY+/nff2QAAxepu9jqq/ni1SxcPWSbgKawFSXmwgO7LsLhpTcjmZh+hKtHIQJMlaw0VzRXikC9Njr1KrpE8EGq/YlEowJ/35x7BgKUL2lIouCZH31vwGhEAN56rDMBRfqIWRxuDJyRhjJTRRgjJoVUECvDpa2AJFXwi4=
Received: from BY1PR03MB1417.namprd03.prod.outlook.com (10.162.127.147) by BY1PR03MB1420.namprd03.prod.outlook.com (10.162.127.150) with Microsoft SMTP Server (TLS) id 15.1.293.16; Tue, 13 Oct 2015 18:49:33 +0000
Received: from BY1PR03MB1417.namprd03.prod.outlook.com ([10.162.127.147]) by BY1PR03MB1417.namprd03.prod.outlook.com ([10.162.127.147]) with mapi id 15.01.0300.010; Tue, 13 Oct 2015 18:49:33 +0000
From: Michiko Short <michikos@microsoft.com>
To: Benjamin Kaduk <kaduk@MIT.EDU>
Thread-Topic: [kitten] WGLC on draft-ietf-kitten-pkinit-freshness-01
Thread-Index: AQHQ/vzI1P8SL+FtUku+IlzouHe/aJ5p0Vqg
Date: Tue, 13 Oct 2015 18:49:32 +0000
Message-ID: <BY1PR03MB1417F6EC192399445C5A2A83D0300@BY1PR03MB1417.namprd03.prod.outlook.com>
References: <alpine.GSO.1.10.1508161121510.22210@multics.mit.edu> <alpine.GSO.1.10.1510012326350.26829@multics.mit.edu>
In-Reply-To: <alpine.GSO.1.10.1510012326350.26829@multics.mit.edu>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=michikos@microsoft.com;
x-originating-ip: [2001:4898:80e8:4::5b4]
x-microsoft-exchange-diagnostics: 1; BY1PR03MB1420; 5:1JPTCFGaerFF+SVSU9VjfLwYxerQa7fl9S0r0UwMexOxQdEYPVjB+wupIXmTFA0CkhpzNJ3dA2dZXmZq4LAksG8TuYvHy6iQySRCX7ypd4KILLImuInXrPXMSsJ/ZyDsSQEdMVZTcUqPxeo1jSjWpA==; 24:5f5do+TPyNfBORJ35Kko1E8vedRbDFnAR6KimrzV3ZS5YUV9BIXHfyG4TR2Sd7wNKv0VTpL3vdFisUquM3jdoIxswtDspg2Ap+W0UROtLR0=; 20:o5YBkRFx9p9RetWyjQPvc2lEUZ+2WFwt2C/x7piOhT5pjmzLL2o1MQxzE3afMGjKtPSu9eyTF/M/rcqgpChQZA==
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1420;
x-microsoft-antispam-prvs: <BY1PR03MB142040E3450799D61A352658D0300@BY1PR03MB1420.namprd03.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(108003899814671);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425024)(601004)(2401047)(520078)(5005006)(8121501046)(3002001)(61426024)(61427024); SRVR:BY1PR03MB1420; BCL:0; PCL:0; RULEID:; SRVR:BY1PR03MB1420;
x-forefront-prvs: 07283408BE
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(377454003)(199003)(57704003)(13464003)(24454002)(164054003)(77096005)(5001920100001)(10290500002)(5005710100001)(76576001)(5001960100002)(8990500004)(76176999)(64706001)(87936001)(5004730100002)(19580405001)(10400500002)(102836002)(54356999)(97736004)(99286002)(15975445007)(101416001)(106116001)(5007970100001)(11100500001)(81156007)(110136002)(189998001)(5002640100001)(19580395003)(105586002)(2900100001)(2950100001)(86362001)(122556002)(92566002)(50986999)(230783001)(86612001)(5008740100001)(551544002)(10090500001)(106356001)(33656002)(74316001)(5003600100002)(46102003)(40100003)(2171001)(290074003)(3826002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR03MB1420; H:BY1PR03MB1417.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en;
received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts)
spamdiagnosticoutput: 1:23
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Oct 2015 18:49:32.9734 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1420
Archived-At: <http://mailarchive.ietf.org/arch/msg/kitten/FTNKRxZ_hPqwI8CymU5l4wR1Guc>
Cc: "kitten@ietf.org" <kitten@ietf.org>
Subject: Re: [kitten] WGLC on draft-ietf-kitten-pkinit-freshness-01
X-BeenThere: kitten@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Common Authentication Technologies - Next Generation <kitten.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/kitten>, <mailto:kitten-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/kitten/>
List-Post: <mailto:kitten@ietf.org>
List-Help: <mailto:kitten-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/kitten>, <mailto:kitten-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 13 Oct 2015 18:54:45 -0000

Sorry for the delay in responding, but before I published the next draft, I wanted to review all the feedback from the beginning since a couple of things keep coming back. Hoping we can get closure in email rather than having another discussion after the next draft. I did not provide the editorial changes since I do not think they are controversial. 

There was feedback to tightening up the intro:

Previous version
1.  Introduction
The Kerberos PKINIT extension [RFC4556] defines two schemes for using asymmetric cryptography in a Kerberos preauthenticator.  One uses Diffie-Hellman key exchange and the other depends on public key encryption.  The public key encryption scheme is less commonly used for two reasons:
o  Elliptic Curve Cryptography (ECC) Support for PKINIT [RFC5349] only specified Elliptic Curve Diffie-Hellman (ECDH) key agreement, so it cannot be used for public key encryption.
o  Public key encryption requires certificates with an encryption key, that is not deployed on many existing smart cards.

In the Diffie-Hellman exchange, the client uses its private key only to sign the AuthPack structure (specified in Section 3.2.1 of [RFC4556]), that is performed before any traffic is sent to the KDC. Thus a client can generate requests with future times in the PKAuthenticator, and then send those requests at those future times. Unless the time is outside the validity period of the client's certificate, the KDC will validate the PKAuthenticator and return a TGT the client can use without possessing the private key.

As a result, a client performing PKINIT with the Diffie-Hellman key exchange does not prove current possession of the private key being used for authentication.  It proves only prior use of that key. Ensuring that the client has current possession of the private key requires that the signed PKAuthenticator data include information that the client could not have predicted.

Proposed revision
1.  Introduction
The Kerberos PKINIT extension [RFC4556] defines two schemes for using asymmetric cryptography in a Kerberos preauthenticator.  In the Diffie-Hellman exchange, the client uses its private key only to sign the AuthPack structure (specified in Section 3.2.1 of [RFC4556]), that is performed before any traffic is sent to the KDC. Thus a client can generate requests with future times in the PKAuthenticator, and then send those requests at those future times. Unless the time is outside the validity period of the client's certificate, the KDC will validate the PKAuthenticator and return a TGT the client can use without possessing the private key.

As a result, a client performing PKINIT with the Diffie-Hellman key exchange does not prove current possession of the private key being used for authentication.  It proves only prior use of that key. Ensuring that the client has current possession of the private key requires that the signed PKAuthenticator data include information that the client could not have predicted.

Client requesting freshness behavior discussions:

We have the client request freshness for multiple reasons
	1. RFC 4120 Section 1.5.2 specifies that the KDC should only use new extensions if the padata element is present in the AS-REQ.
	2. KDC performance impact. The KDC cannot tell the difference between an AS ping for a password-based client vs certificate if the client does not explicitly ask for the token. Many (maybe most) realms are a mix of password-based and certificates.    
	3. In Windows Active Directory, accounts configured with AltSecID can receive a principal not found error and fail logon when the normal password AS ping is sent since the cname is not in the global catalog. By requesting the freshness token, the KDC can choose to return the preauth failure with the token when the account cannot be found.  


KDC_ERR_PREAUTH_FAILED vs KDC_ERR_PREAUTH_EXPIRED 
The first thing I can think of is that currently the draft only requires RFC 4120 & 4556 and FAST is just an informative reference (not to mention that the error is MAY and not in all implementations of FAST). Not sure what the precedence is for pulling just the error behavior from an RFC.

We choose KDC_ERR_PREAUTH_FAILED because it was supported already and "Pre-authentication information was invalid" seemed accurate for the situation. 



KDC validation behavior:
Every time I release a version this comes up. :) There already is a precedent in IETF for not standardizing the KDC-only elements. The consensus is that there are lots of ways to do this and the standard will not specify it. 

How about the following to cover KDC requirements and upgrade advice:

7.  Security Considerations
A freshness token can prove recent possession of the key only if:
1.  The freshness token cannot pre-generated.
2.  The KDC can determine authenticity and prevent tampering.
       Kerberos error messages are not integrity protected unless
       authenticated using Kerberos FAST [RFC6113].  Even if FAST is
       required to provide integrity protection, a different KDC would
       not be able to validate freshness tokens without some kind of
       shared database which is unlikely as most KDCs are stateless.
       Signing, encrypting or sealing data SHOULD be used.
3.  Reuse of a freshness token is only valid within the allowable
       time window.  Freshness tokens are not required to be single use
       tokens or bound to specific AS exchanges, simply to guarantee
       that the client had the key during the allowable time window.
       Part of the reason the token is opaque is to allow KDC
       implementers the freedom to add additional functionality as long
       as the "freshness" guarantee remains.
4.  The client returns the freshness token.  Since upgrading clients
       takes time, implementers may consider allowing both unproven
       and fresh authentications.  As long as freshness tokens are not
       required then pre-generated PKAuthenticators can be used.

-----Original Message-----
From: Benjamin Kaduk [mailto:kaduk@MIT.EDU] 
Sent: Sunday, October 4, 2015 4:31 PM
To: Michiko Short <michikos@microsoft.com>
Cc: kitten@ietf.org
Subject: Re: [kitten] WGLC on draft-ietf-kitten-pkinit-freshness-01

Hi Michiko,

On Sun, 16 Aug 2015, Benjamin Kaduk wrote:

> This message begins the Working Group Last Call (WGLC) of "Public Key 
> Cryptography for Initial Authentication in Kerberos (PKINIT) Freshness 
> Extension" <draft-ietf-kitten-pkinit-freshness-01>. The WGLC will last 
> two weeks, ending on Sunday, August 30th.  The draft is available at:

Looking over the traffic from the WGLC period, it seems that some revisions to the document are required.  Going over the list's archive:

Greg noted that there was some ambiguity in section 2.4 regarding the contents of the KRB-ERROR message in the case when a supplied freshness token is not valid, in his message at http://www.ietf.org/mail-archive/web/kitten/current/msg05783.html .

That message also raised the question of using KDC_ERR_PREAUTH_FAILED for a retriable answer, which does not seem to have been resolved yet.  With no hat on, I'm inclined to avoid KDC_ERR_PREAUTH_FAILED for retriable errors.

Greg also made some editorial comments in that same message.

Bryce Nordgren also found an editorial change in http://www.ietf.org/mail-archive/web/kitten/current/msg05794.html (the content question in that message seems to have been resolved in subsequent list traffic).

Bryce also notes in a later message that the document should say that the implementation-defined validation procedure must actually guarantee freshness.  Something similar to Greg's explanation in http://www.ietf.org/mail-archive/web/kitten/current/msg05795.html might be reasonable, say, in the security considerations.

I also supplied a couple editorial comments in http://www.ietf.org/mail-archive/web/kitten/current/msg05801.html

jhutz made some (mostly) editorial suggestions in his review, http://www.ietf.org/mail-archive/web/kitten/current/msg05802.html (some of the non-editorial comments are mitigated by Greg's follow-up in http://www.ietf.org/mail-archive/web/kitten/current/msg05803.html )

This question from jhutz's message remains unresolved:
"Do we need to call out that a client MUST use a freshness token it got during an earlier iteration of the same AS exchange?  So, for example, it can't change its mind about principal names or KDC options or requested AD and still expect the freshness token to be valid?"  I don't think this is a particularly critical issue, so it may suffice to just note that a KDC implementation MAY bind the freshness token to parameters in the AS-REQ, so the client implementation should use the freshness token it got during an earlier iteration of the same AS exchange or be prepared to handle failures resulting from the KDC validation failure for the binding to the AS-REQ parameter(s).


Can you please generate a revised I-D addressing these comments (i.e., including proposed resolutions to the as-yet-unresolved questions)?
Depending on the scope of the changes, another WGLC may be needed; if the changes are minor and uncontroversial, we might be able to skip it.

Thanks,

Ben