1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501
|
<pre>Internet Engineering Task Force (IETF) M. Short, Ed.
Request for Comments: 8070 S. Moore
Category: Standards Track P. Miller
ISSN: 2070-1721 Microsoft Corporation
February 2017
Public Key Cryptography for Initial Authentication in Kerberos (PKINIT)
Freshness Extension
Abstract
This document describes how to further extend the Public Key
Cryptography for Initial Authentication in Kerberos (PKINIT)
extension (defined in <a href="./rfc4556">RFC 4556</a>) to exchange an opaque data blob that
a Key Distribution Center (KDC) can validate to ensure that the
client is currently in possession of the private key during a PKINIT
Authentication Service (AS) exchange.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in <a href="./rfc7841#section-2">Section 2 of RFC 7841</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="http://www.rfc-editor.org/info/rfc8070">http://www.rfc-editor.org/info/rfc8070</a>.
Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
<span class="grey">Short, et al. Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc8070">RFC 8070</a> PKINIT Freshness February 2017</span>
Table of Contents
<a href="#section-1">1</a>. Introduction ....................................................<a href="#page-2">2</a>
1.1. Kerberos Message Flow Using KRB_AS_REQ without
Pre-authentication .........................................<a href="#page-3">3</a>
<a href="#section-1.2">1.2</a>. Requirements Language ......................................<a href="#page-3">3</a>
<a href="#section-2">2</a>. Message Exchanges ...............................................<a href="#page-4">4</a>
<a href="#section-2.1">2.1</a>. Generation of KRB_AS_REQ Message ...........................<a href="#page-4">4</a>
<a href="#section-2.2">2.2</a>. Generation of KRB_ERROR Message ............................<a href="#page-4">4</a>
<a href="#section-2.3">2.3</a>. Generation of KRB_AS_REQ Message ...........................<a href="#page-4">4</a>
<a href="#section-2.4">2.4</a>. Receipt of KRB_AS_REQ Message ..............................<a href="#page-5">5</a>
<a href="#section-2.5">2.5</a>. Receipt of Second KRB_ERROR Message ........................<a href="#page-5">5</a>
<a href="#section-3">3</a>. PreAuthentication Data Types ....................................<a href="#page-5">5</a>
<a href="#section-4">4</a>. Extended PKAuthenticator ........................................<a href="#page-6">6</a>
<a href="#section-5">5</a>. IANA Considerations .............................................<a href="#page-6">6</a>
<a href="#section-6">6</a>. Security Considerations .........................................<a href="#page-7">7</a>
<a href="#section-7">7</a>. Interoperability Considerations .................................<a href="#page-7">7</a>
<a href="#section-8">8</a>. Normative References ............................................<a href="#page-8">8</a>
Acknowledgements ...................................................<a href="#page-8">8</a>
Authors' Addresses .................................................<a href="#page-9">9</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
The Kerberos PKINIT extension [<a href="./rfc4556" title=""Public Key Cryptography for Initial Authentication in Kerberos (PKINIT)"">RFC4556</a>] defines two schemes for using
asymmetric cryptography in a Kerberos pre-authenticator. 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 [<a href="./rfc5349" title=""Elliptic Curve Cryptography (ECC) Support for Public Key Cryptography for Initial Authentication in Kerberos (PKINIT)"">RFC5349</a>]
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, which 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 <a href="./rfc4556#section-3.2.1">Section 3.2.1 of
[RFC4556]</a>), which 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
Ticket-Granting Ticket (TGT) the client can use without possessing
the private key.
<span class="grey">Short, et al. Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc8070">RFC 8070</a> PKINIT Freshness February 2017</span>
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.
<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>. Kerberos Message Flow Using KRB_AS_REQ without Pre-authentication</span>
Today, password-based AS exchanges [<a href="./rfc4120" title=""The Kerberos Network Authentication Service (V5)"">RFC4120</a>] often begin with the
client sending a KRB_AS_REQ without pre-authentication. When the
principal requires pre-authentication, the KDC responds with a
KRB_ERROR containing information needed to complete an AS exchange,
such as the supported encryption types and salt values. This message
flow is illustrated below:
Client KDC
AS-REQ without pre-authentication ---->
<---- KRB-ERROR
AS-REQ ---->
<---- AS-REP
TGS-REQ ---->
<---- TGS-REP
Figure 1
We can use a similar message flow with PKINIT, allowing the KDC to
provide a token for the client to include in its KRB_AS_REQ to ensure
that the PA_PK_AS_REQ [<a href="./rfc4556" title=""Public Key Cryptography for Initial Authentication in Kerberos (PKINIT)"">RFC4556</a>] was not pre-generated.
<span class="h3"><a class="selflink" id="section-1.2" href="#section-1.2">1.2</a>. Requirements Language</span>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
<span class="grey">Short, et al. Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc8070">RFC 8070</a> PKINIT Freshness February 2017</span>
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Message Exchanges</span>
The following summarizes the message flow with extensions to
[<a href="./rfc4120" title=""The Kerberos Network Authentication Service (V5)"">RFC4120</a>] and [<a href="./rfc4556" title=""Public Key Cryptography for Initial Authentication in Kerberos (PKINIT)"">RFC4556</a>] required to support a KDC-provided freshness
token during the initial request for a ticket:
1. The client generates a KRB_AS_REQ, as specified in <a href="./rfc4120#section-2.9.3">Section 2.9.3
of [RFC4120]</a>, that contains no PA_PK_AS_REQ and includes a
freshness token request.
2. The KDC generates a KRB_ERROR, as specified in <a href="./rfc4120#section-3.1.4">Section 3.1.4 of
[RFC4120]</a>, providing a freshness token.
3. The client receives the error, as specified in <a href="./rfc4120#section-3.1.5">Section 3.1.5 of
[RFC4120]</a>, extracts the freshness token, and includes it as part
of the KRB_AS_REQ as specified in [<a href="./rfc4120" title=""The Kerberos Network Authentication Service (V5)"">RFC4120</a>] and [<a href="./rfc4556" title=""Public Key Cryptography for Initial Authentication in Kerberos (PKINIT)"">RFC4556</a>].
4. The KDC receives and validates the KRB_AS_REQ, as specified in
<a href="./rfc4556#section-3.2.2">Section 3.2.2 of [RFC4556]</a>, then additionally validates the
freshness token.
5. The KDC and client continue, as specified in [<a href="./rfc4120" title=""The Kerberos Network Authentication Service (V5)"">RFC4120</a>] and
[<a href="./rfc4556" title=""Public Key Cryptography for Initial Authentication in Kerberos (PKINIT)"">RFC4556</a>].
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. Generation of KRB_AS_REQ Message</span>
The client indicates support of freshness tokens by adding a padata
element with padata-type PA_AS_FRESHNESS and padata-value of an empty
octet string.
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a>. Generation of KRB_ERROR Message</span>
The KDC will respond with a KRB_ERROR [<a href="./rfc4120" title=""The Kerberos Network Authentication Service (V5)"">RFC4120</a>] message with the
error-code KDC_ERR_PREAUTH_REQUIRED [<a href="./rfc4120" title=""The Kerberos Network Authentication Service (V5)"">RFC4120</a>] adding a padata element
with padata-type PA_AS_FRESHNESS and padata-value of the freshness
token to the METHOD-DATA object.
<span class="h3"><a class="selflink" id="section-2.3" href="#section-2.3">2.3</a>. Generation of KRB_AS_REQ Message</span>
After the client receives the KRB-ERROR message containing a
freshness token, it extracts the PA_AS_FRESHNESS padata-value field
of the PA-DATA structure as an opaque data blob. The PA_AS_FRESHNESS
padata-value field of the PA-DATA structure SHALL then be added as an
opaque blob in the freshnessToken field when the client generates the
PKAuthenticator specified in <a href="#section-4">Section 4</a> for the PA_PK_AS_REQ message.
This ensures that the freshness token value will be included in the
signed data portion of the KRB_AS_REQ value.
<span class="grey">Short, et al. Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc8070">RFC 8070</a> PKINIT Freshness February 2017</span>
<span class="h3"><a class="selflink" id="section-2.4" href="#section-2.4">2.4</a>. Receipt of KRB_AS_REQ Message</span>
If the realm requires freshness and the PA_PK_AS_REQ message does not
contain the freshness token, the KDC MUST return a KRB_ERROR
[<a href="./rfc4120" title=""The Kerberos Network Authentication Service (V5)"">RFC4120</a>] message with the error-code KDC_ERR_PREAUTH_FAILED
[<a href="./rfc4120" title=""The Kerberos Network Authentication Service (V5)"">RFC4120</a>] with a padata element with padata-type PA_AS_FRESHNESS and
padata-value of the freshness token to the METHOD-DATA object.
When the PA_PK_AS_REQ message contains a freshness token, after
validating the PA_PK_AS_REQ message normally, the KDC will validate
the freshnessToken value in the PKAuthenticator in an implementation-
specific way. If the freshness token is not valid, the KDC MUST
return a KRB_ERROR [<a href="./rfc4120" title=""The Kerberos Network Authentication Service (V5)"">RFC4120</a>] message with the error-code
KDC_ERR_PREAUTH_EXPIRED [<a href="./rfc6113" title=""A Generalized Framework for Kerberos Pre-Authentication"">RFC6113</a>]. The e-data field of the error
contains a METHOD-DATA object [<a href="./rfc4120" title=""The Kerberos Network Authentication Service (V5)"">RFC4120</a>], which specifies a valid
PA_AS_FRESHNESS padata-value. Since the freshness tokens are
validated by KDCs in the same realm, standardizing the contents of
the freshness token is not a concern for interoperability.
<span class="h3"><a class="selflink" id="section-2.5" href="#section-2.5">2.5</a>. Receipt of Second KRB_ERROR Message</span>
If a client receives a KDC_ERR_PREAUTH_EXPIRED KRB_ERROR message that
includes a freshness token, it SHOULD retry using the new freshness
token.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. PreAuthentication Data Types</span>
The following are the new PreAuthentication data types:
+----------------------+-------------------+
| Padata and Data Type | Padata-type Value |
+----------------------+-------------------+
| PA_AS_FRESHNESS | 150 |
+----------------------+-------------------+
<span class="grey">Short, et al. Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc8070">RFC 8070</a> PKINIT Freshness February 2017</span>
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Extended PKAuthenticator</span>
The PKAuthenticator structure specified in <a href="./rfc4556#section-3.2.1">Section 3.2.1 of [RFC4556]</a>
is extended to include a new freshnessToken as follows:
PKAuthenticator ::= SEQUENCE {
cusec [0] INTEGER (0..999999),
ctime [1] KerberosTime,
-- cusec and ctime are used as in [<a href="./rfc4120" title=""The Kerberos Network Authentication Service (V5)"">RFC4120</a>], for
-- replay prevention.
nonce [2] INTEGER (0..4294967295),
-- Chosen randomly; this nonce does not need to
-- match with the nonce in the KDC-REQ-BODY.
paChecksum [3] OCTET STRING OPTIONAL,
-- MUST be present.
-- Contains the SHA1 checksum, performed over
-- KDC-REQ-BODY.
...,
freshnessToken [4] OCTET STRING OPTIONAL,
-- PA_AS_FRESHNESS padata value as received from the
-- KDC. MUST be present if sent by KDC
...
}
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. IANA Considerations</span>
IANA has assigned numbers for PA_AS_FRESHNESS listed in a subregistry
of the "Kerberos Parameters" registry titled "Pre-authentication and
Typed Data" as follows:
+------+-----------------+-----------+
| Type | Value | Reference |
+------+-----------------+-----------+
| 150 | PA_AS_FRESHNESS | [<a href="./rfc8070">RFC8070</a>] |
+------+-----------------+-----------+
<span class="grey">Short, et al. Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc8070">RFC 8070</a> PKINIT Freshness February 2017</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Security Considerations</span>
The freshness token SHOULD include signing, encrypting, or sealing
data from the KDC to determine authenticity and prevent tampering.
Freshness tokens serve to guarantee that the client had the key when
constructing the AS-REQ. They are not required to be single use
tokens or bound to specific AS exchanges. Part of the reason the
token is opaque is to allow KDC implementers the freedom to add
additional functionality as long as the tokens expire so that the
"freshness" guarantee remains.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Interoperability Considerations</span>
Since the client treats the KDC-provided data blob as opaque,
changing the contents will not impact existing clients. Thus,
extensions to the freshness token do not impact client
interoperability.
Clients SHOULD NOT reuse freshness tokens across multiple exchanges.
There is no guarantee that a KDC will allow a once-valid token to be
used again. Thus, clients that do not retry with a new freshness
token may not be compatible with KDCs, depending on how they choose
to implement freshness validation.
Since upgrading clients takes time, implementers may consider
allowing both freshness-token based exchanges and "legacy" exchanges
without use of freshness tokens. However, until freshness tokens are
required by the realm, the existing risks of pre-generated
PKAuthenticators will remain.
<span class="grey">Short, et al. Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc8070">RFC 8070</a> PKINIT Freshness February 2017</span>
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Normative References</span>
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>,
DOI 10.17487/RFC2119, March 1997,
<<a href="http://www.rfc-editor.org/info/rfc2119">http://www.rfc-editor.org/info/rfc2119</a>>.
[<a id="ref-RFC4120">RFC4120</a>] Neuman, C., Yu, T., Hartman, S., and K. Raeburn, "The
Kerberos Network Authentication Service (V5)", <a href="./rfc4120">RFC 4120</a>,
DOI 10.17487/RFC4120, July 2005,
<<a href="http://www.rfc-editor.org/info/rfc4120">http://www.rfc-editor.org/info/rfc4120</a>>.
[<a id="ref-RFC4556">RFC4556</a>] Zhu, L. and B. Tung, "Public Key Cryptography for Initial
Authentication in Kerberos (PKINIT)", <a href="./rfc4556">RFC 4556</a>,
DOI 10.17487/RFC4556, June 2006,
<<a href="http://www.rfc-editor.org/info/rfc4556">http://www.rfc-editor.org/info/rfc4556</a>>.
[<a id="ref-RFC5349">RFC5349</a>] Zhu, L., Jaganathan, K., and K. Lauter, "Elliptic Curve
Cryptography (ECC) Support for Public Key Cryptography for
Initial Authentication in Kerberos (PKINIT)", <a href="./rfc5349">RFC 5349</a>,
DOI 10.17487/RFC5349, September 2008,
<<a href="http://www.rfc-editor.org/info/rfc5349">http://www.rfc-editor.org/info/rfc5349</a>>.
[<a id="ref-RFC6113">RFC6113</a>] Hartman, S. and L. Zhu, "A Generalized Framework for
Kerberos Pre-Authentication", <a href="./rfc6113">RFC 6113</a>,
DOI 10.17487/RFC6113, April 2011,
<<a href="http://www.rfc-editor.org/info/rfc6113">http://www.rfc-editor.org/info/rfc6113</a>>.
Acknowledgements
Douglas E. Engert, Sam Hartman, Henry B. Hotz, Nikos
Mavrogiannopoulos, Martin Rex, Nico Williams, and Tom Yu were key
contributors to the discovery of the freshness issue in PKINIT.
Sam Hartman, Greg Hudson, Jeffrey Hutzelman, Nathan Ide, Benjamin
Kaduk, Bryce Nordgren, Magnus Nystrom, Nico Williams, and Tom Yu
reviewed the document and provided suggestions for improvements.
<span class="grey">Short, et al. Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc8070">RFC 8070</a> PKINIT Freshness February 2017</span>
Authors' Addresses
Michiko Short (editor)
Microsoft Corporation
United States of America
Email: michikos@microsoft.com
Seth Moore
Microsoft Corporation
United States of America
Email: sethmo@microsoft.com
Paul Miller
Microsoft Corporation
United States of America
Email: paumil@microsoft.com
Short, et al. Standards Track [Page 9]
</pre>
|