Network Working Group N. Williams
Internet-Draft Cryptonector
Updates: RFC4121 (if approved) R. Dowdeswell
Intended status: Standards Track Dowdeswell Security Architecture
Expires: August 5, 2013 February 2013

Negotiation of Extra Round Trip for Kerberos V5 Generic Security Services Mechanism
draft-williams-kitten-krb5-extra-rt-00

Abstract

This Internet-Draft proposes an extension to the Kerberos V5 security mechanism for the Generic Security Services Application Programming Interface (GSS-API) for using an extra pair of security context tokens in order to recover from certain errors. Other benefits include: user2user authentication, authenticated errors (in some cases), and more.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on August 5, 2013.

Copyright Notice

Copyright (c) 2013 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) 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.


Table of Contents

1. Introduction

The Kerberos V5 [RFC4120] AP protocol, and therefore the Kerberos V5 GSS mechanism [RFC4121] security context token exchange, is a one-round-trip protocol. Occasionally there are errors that the protocol could recover from by using an additional round trip, but until now there was no way to execute such an additional round trip. For many application protocols the failure of the Kerberos AP protocol is fatal, requiring closing TCP connections and starting over; often there is no automatic recovery. This document proposes a negotiation of an additional round trip for automatic recovery from certain errors. This is done in a backwards-compatible way, thus retaining the existing mechanism OID for the Kerberos V5 GSS mechanism. Additionally we add support for user2user authentication and authenticated errors, and provide a way to avoid the use of replay caching.

1.1. Conventions used in this document

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 [RFC2119].

2. Negotiation

We introduce the following new protocol elements. An ASN.1 module is given in Section 2.4, and references to its contents are made below.

To use this feature, initiators and acceptors MUST act as follows:

The following Kerberos errors can be recovered from using this protocol:

Error codes that denote PDU corruption (and/or an active attack) can also be recovered from by attempting a new AP-REQ:

Other error codes that may be recovered from:

It is also possible for an acceptor to request that the initiator re-authenticate but to a different service principal, in which case the error code SHALL be KRB_AP_ERR_NOT_US, the KRB-ERROR2 encrypted part MUST be encrypted in the sub-session key from the Authenticator, and the sname and realm fields of the KRB-ERROR2 MUST be present.

2.1. Use in Non-GSS Applications

We only specify multiple round trips for the GSS mechanism and application case. We believe that some non-GSS Kerberos applications may also benefit from this extension.

2.2. Number of Round Trips

At most two round trips should be needed in general. Implementations MUST impose a limit of either two or three round trips. An initiator that rejects an additional round-trip MUST respond with a KRB-ERROR2.

2.3. User-to-User Authentication

There are two user2user authentication cases:

  1. the KDC only allows a service principal to use user2user authentication,
  2. the service principal does not know its long-term keys or otherwise wants to use user2user authentication even though the KDC vended a service ticket.

In the first case the initiator knows this because the KDC returns KDC_ERR_MUST_USE_USER2USER. The initiator cannot make a valid AP-REQ in this case, yet it must send an AP-REQ or fail to make even an initial security context token. For this case we propose that the initiator make an AP-REQ with invalid ticket (really, the enc-part of the Ticket will contain some OCTET STRING of length 1 or longer, but no longer than the minimum ciphertext length for the enctype listed in the EncryptedData) and authenticator (an OCTET STRING of length 1 or longer, but no longer than the minimum ciphertext length for some enctype supported by the initiator). The acceptor will fail to process the AP-REQ, of course, both because the Ticket and Authenticator embedded in it are not valid, and because the acceptor will likely not possess the key to decrypt a real Ticket. The acceptor SHOULD respond with a continue-needed KRB-ERROR2 (using the null enctype for the enc-part) that includes a TGT for the acceptor.

In the second case the initiator does manage to get a real service ticket for the acceptor but the acceptor nonetheless wishes to use user2user authentication. In this case the acceptor responds with a KRB-ERROR2, using either the null enctype for the enc-part, or the initiator's sub-session key, and includes a TGT for itself.

In both cases the initiator then does a TGS request with a second ticket to get a new, user2user Ticket. Then the initiator makes a new AP-REQ using the new Ticket, and proceeds.

2.4. ASN.1 for New Protocol Elements

An ASN.1 module appears below.

 APOptions       ::= KerberosFlags
         – reserved(0),
         – use-session-key(1),
         – mutual-required(2) 
         – continue-needed-ok(TBD)
 
 ad-continue-needed-ok Int32 ::= <TBD>
        – indicate extra round trip support 
 ad-continue-nonce     Int32 ::= <TBD>
        – ad-value is challenge nonce from KRB-ERROR2
 td-continue-needed    Int32 ::= <TBD>
        – indicate that extra round trip is expected
 td-continue-failed    Int32 ::= <TBD>
        – indicate protocol failure
 
 KrbErrorEncPartFlags ::= KerberosFlags
         – reserved(0)  [XXX sounds like cargo cult!]
         – use-initiator-subkey(1)
         – use-ticket-session-key(2)
         – use-null-enctype(3)
 
 KRB-ERROR2          ::= [APPLICATION <TBD>] SEQUENCE {
         pvno            [0] INTEGER (5),
         msg-type        [1] INTEGER (<TBD>),
         enc-part-key    [2] KrbErrorEncPartFlags,
         enc-part        [3] EncryptedData – EncKRBErrorPart
 }
 
 ErrorFlags ::= KerberosFlags
         – reserved(0)  [XXX sounds like cargo cult!]
         – continue-needed(1)
         – use-other-sname(2)
         – user2user(3)
 
 EncAPRepPart    ::= [APPLICATION <TBD>] SEQUENCE {
         challenge-nonce [0] OCTET STRING (16),
         stime           [1] KerberosTime,
         susec           [2] Microseconds,
         error-code      [3] Int32,
         e-flags         [4] ErrorFlags,
         e-text          [5] KerberosString OPTIONAL,
         e-data          [6] OCTET STRING OPTIONAL,
         e-typed-data    [7] TYPED-DATA OPTIONAL,
         caddrs          [8] HostAddresses OPTIONAL,
         saddrs          [9] HostAddresses OPTIONAL,
         tgt            [10] Ticket OPTIONAL, – for user2user
         ticket         [11] Ticket OPTIONAL, – fast-re-auth
         srealm         [12] Realm OPTIONAL,  – service realm
         sname          [13] PrincipalName OPTIONAL,
         redir-srealm   [14] Realm OPTIONAL,
         redir-sname    [15] PrincipalName OPTIONAL,
}

Figure 1: ASN.1 module (with explicit tagging)

2.5. Other Features

Two other features are supported:

2.5.1. Acceptor Name Redirection

In some use cases, such as clusters, for example, an acceptor may wish to ask the initiator to use a different name (and ticket) for the acceptor. This is indicated by setting the redir-srealm and redir-sname fields of a continue-needed KRB-ERROR2. The KRB-ERROR2's enc-part MUST be encrypted in the initiator's sub-session key, and initiators MUST ignore the redir-srealm and redir-sname fields of any KRB-ERROR2 where the enc-part is encrypted in the null enctype.

Because the acceptor's name redirection is authenticated to the initiator, it is safe for the initiator to get a service ticket for the new name and re-try authentication with it.

2.5.2. Fast Re-Authentication Acceptor Ticket Issuance

In view of future extensions where the Kerberos AP protocol may be extended to use public key agreement protocols -which will likely be slow-, we provide a field in the KRB-ERROR2 where the acceptor may include a Ticket for itself, minted by the acceptor using a secret key of its choosing. This service ticket may be used to speed up future otherwise-slow AP exchanges.

2.6. Replay Cache Avoidance

By using an additional round trip and a challenge/response nonce, this protocol is inmune to replays of AP-REQ PDUs. Acceptor implementations MAY not enter Authenticators from extra round trips into a replay cache when there are no other old implementations on the same host (and with access to the same acceptor credentials) that ignore critical authorization data or which don't know to reject initial AP-REQs that contain a challenge response nonce.

By the same token, acceptors that support this feature MUST reject initial security context tokens that contain a challenge response nonce.

2.7. Other Requirements, Recommendations, and Non-Requirements

All error PDUs in an AP exchange where the AP-REQ has the continue-needed-ok ap-options flag MUST be KRB-ERROR2 PDUs.

Whenever an acceptor is able to decrypt the Ticket from an AP-REQ and yet wishes or has to output a KRB-ERROR2, then the enc-part of the KRB-ERROR2 MUST be encrypted in either the initiator's sub-session key (from the AP-REQ) or the Ticket's session key (if the acceptor could not decrypt the Authenticator), and the srealm and sname fields MUST be set to be the same as the realm and sname fields from the Ticket.

Whenever an initiator receives a KRB-ERROR2 with enc-part encrypted in either the initiator's sub-session key or the Ticket's session key, then the initiator SHOULD check that the srealm and sname fields of the KRB-ERROR2 encrypted part match the ones used in the initiator's AP-REQ's Ticket (XXX what should the initiator do if these don't match?!).

...

3. Security Considerations

This document deals with security.

[XXX Note the resource using attacks that are feasible when we have multiple round-trips and note that they are nothing new and nothing to worry about because services should already have timeouts on pre-authenticated protocol phases, and even post-authentication.]

4. IANA Considerations

This document has no IANA considerations.

5. Informative References

6. Normative References

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.
[RFC2743] Linn, J., "Generic Security Service Application Program Interface Version 2, Update 1", RFC 2743, DOI 10.17487/RFC2743, January 2000.
[RFC2744] Wray, J., "Generic Security Service API Version 2 : C-bindings", RFC 2744, DOI 10.17487/RFC2744, January 2000.
[RFC4120] Neuman, C., Yu, T., Hartman, S. and K. Raeburn, "The Kerberos Network Authentication Service (V5)", RFC 4120, DOI 10.17487/RFC4120, July 2005.
[RFC4121] Zhu, L., Jaganathan, K. and S. Hartman, "The Kerberos Version 5 Generic Security Service Application Program Interface (GSS-API) Mechanism: Version 2", RFC 4121, DOI 10.17487/RFC4121, July 2005.

Authors' Addresses

Nicolas Williams Cryptonector, LLC EMail: nico@cryptonector.com
Roland Charles Dowdeswell Dowdeswell Security Architecture EMail: elric@imrryr.org