<?xml version="1.0" encoding="UTF-8"?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc tocindent="no"?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc tocindent="no"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc4120 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4120.xml">
<!ENTITY rfc4556 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4556.xml">
<!ENTITY rfc4557 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4557.xml">
<!ENTITY rfc5280 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5280.xml">
<!ENTITY rfc6680 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6680.xml">
<!ENTITY rfc6698 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6698.xml">
<!ENTITY rfc6717 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6717.xml">
<!ENTITY I-D.williams-kitten-generic-naming-attributes PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.williams-kitten-generic-naming-attributes.xml">
<!ENTITY rfc4033 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4033.xml">
<!ENTITY rfc6960 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6960.xml">
]>
<rfc docName="draft-williams-kitten-krb5-pkcross-04" ipr="trust200902" category="std">
  <front>
    <title abbrev="PKCROSS">Public Key-Based Kerberos Cross Realm Path Traversal Protocol Using Kerberized Certification Authorities (kx509) and PKINIT</title>
    <author initials="N." surname="Williams" fullname="Nicolas Williams">
      <organization abbrev="Cryptonector">Cryptonector, LLC</organization>
      <address>
        <email>nico@cryptonector.com</email>
      </address>
    </author>
    <date month="October" year="2014"/>
    <area>
Security Area
</area>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <t>
This document specifies a protocol for obtaining cross-realm Kerberos tickets using existing, related protocols: kerberized certification authorities (kx509) and public key cryptography initial authentication in Kerberos (PKINIT). The resulting protocol has a number of desirable properties, primarily that it allows Kerberos to scale to large numbers of realms.</t>
    </abstract>
  </front>
  <middle>
    <section title="Introduction" anchor="d1e298">
      <t>
Kerberos <xref target="RFC4120"/> supports meshes of many realms. The individual relationships between realms must be manually keyed, usually with keys derived from passwords. A full mesh wouldn't scale, therefore the protocol calls for hierarchical trust hierarchies. In practice non-hierarchical but also non-fully-meshed relationships are used.</t>
      <t>
These manually-exchanged keys are very difficult to rollover safely, and when they are changed the result is often outages -- controlled outages where foreseen, but outages nonetheless.</t>
      <t>
Manual cross-realm keying does not scale, and has very poor security properties. We seek to remediate this using public key cryptography, building on existing Kerberos specifications.</t>
      <t>
Many years ago there was a proposal for exchanging cross-realm keys using a public key infrastructure (PKI) <xref target="RFC5280"/>; that proposal went by the name “PKCROSS”. We appropriate that long-dead proposal's name, but the protocol specified here is very different from the original proposal.</t>
      <section title="Conventions used in this document" anchor="d1e329">
        <t>
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 <xref target="RFC2119"/>.</t>
      </section>
    </section>
    <section title="The PKCROSS Protocol" anchor="d1e344">
      <t>
We provide two variants of the PKCROSS protocol: one that is client-driven, and another that is driven by a Ticket Granting Service (TGS) on behalf of its clients. The latter is based on the former, with the TGS acting as a client. We begin with the client-driven case. DNS-Based Authentication of Named Entities (DANE) <xref target="RFC6698"/> can and should be used for realm CA certificate validation.</t>
      <section title="Client-Driven PKCROSS" anchor="d1e359">
        <t>
A Kerberos client in with a ticket-granting ticket (TGT) for any one source realm (usually but not necessarily the client's own realm) wishing to acquire a TGT for a destination realm may use this protocol instead of the traditional cross-realm ticket-granting service (TGS) exchanges as follows:</t>
        <t>
          <list style="numbers">
            <t>
Generate private key to a public key cryptosystem;</t>
            <t>
Request a certificate from the kx509 <xref target="RFC6717"/> service run by the source realm;</t>
            <t>
Request a TGT from the destination realm using PKINIT <xref target="RFC4556"/> and the client certificate obtained in step #2.</t>
          </list>
        </t>
        <t>
If the destination realm issues the requested Ticket then it SHOULD include the client's certificate in an AD-CLIENT-CERTIFICATE authorization-data element, and it MUST do so if it does not validate the client's certificate to an acceptable trust anchor. The AD-CLIENT-CERTIFICATE authorization-data MUST be in a KDC-signed authorization-data container [XXX add reference to CAMMAC].</t>
        <t>
          <cref>
QUESTION: Should the PKINIT request in step #3 be a TGS-REQ with PKINIT pre-auth data?</cref>
        </t>
        <t>
          <cref>
QUESTION: Should the PKINIT request in step #3 be required to be used within a FAST tunnel?</cref>
        </t>
      </section>
      <section title="TGS-Driven PKCROSS" anchor="d1e400">
        <t>
A TGS can bootstrap ephemeral cross-realm trust principals on behalf of its clients. This allows the cost of PKCROSS to be amortized over many clients, and it allows participation by clients that do not support client-driven PKCROSS (or whose PKCROSS requests are rejected by the target).</t>
        <t>
In this mode the TGS uses the client-driven PKCROSS protocol, modified as follows:</t>
        <t>
          <list style="symbols">
            <t>
the TGS's client certificate MUST have an id-pkinit-san Subject Alternative Name (SAN) identifying the source TGS as krbtgt/SOURCE@SOURCE</t>
            <t>
the TGS's client certificate MUST have an Extended Key Usage (EKU) of id-pkcross-issuer (TBD)</t>
          </list>
        </t>
        <t>
The resulting TGT -which we shall term an “issuer TGT” (ITGT)- and its session key can then be used by the source TGS to create cross-realm TGTs for the source-to-target trust principal (“krbtgt/TARGET@SOURCE”).</t>
        <t>
This ITGT will be used to mint tickets as described below.</t>
        <section title="Issuing cross-realm TGTs issued for PKCROSS-keyed cross-realm TGS principals" anchor="d1e425">
          <t>
Cross-realm TGTs issued by a source TGS using an ITGT will not be quite like normal Kerberos Tickets: their encrypted part contains an AP-REQ using the ITGT acquired by the source TGS, and this AP-REQ is “encrypted” with the null enctype, The AP-REQ's Authenitcator MUST contain an authorization-data element that carries a) the name of the client principal, b) the session key that the client should be using with the cross-realm TGTs issued.</t>
          <t>
</t>
          <t>
            <figure anchor="magicparlabel-131" title="AD-PKCROSS-TGT-INFO">
              <artwork> AD-PKCROSS-TGT-INFO ::= SEQUENCE {
     cname [0] Principal,    -- the client's realm is the
                             -- crealm from the ITGT's EncTicketPart
     key   [1] EncryptionKey
 }</artwork>
            </figure>
          </t>
        </section>
        <section title="Handling impatient clients" anchor="d1e460">
          <t>
Because the process of acquiring an ITGT might be slow, a TGS doing so on behalf of a client could use a mechanism for instructing the client to be patient. Existing clients would not handler a new error code by waiting, therefore there is not much that can be done to keep an impatient client from retrying at another KDC.</t>
          <t>
The existing KDC_ERR_SVC_UNAVAILABLE error code cannot be used as often this causes the client to immediately retry the request at another KDC. A new error code for indicating estimated time to completion of request would be handy, but out of scope for this document.</t>
          <t>
Note that there is a denial of service (DoS) attack by clients on willing source KDCs: the clients can ask the KDCs to acquire cross-realm ITGTs for many target realms. Ideally the quality of service for the Kerberos authentication service (AS) with PKINIT (and/or other slow pre-authentication mechanisms) should be separate from that of the Kerberos TGS co-located with it, and the PKCROSS-capable TGS as well, so as to be able to throttle low-priority requests when under load.</t>
        </section>
      </section>
      <section title="Stapled DANE" anchor="d1e476">
        <t>
          <cref>
TBD. We should use Google's serialization of DNS RRsets needed for DANE validation. We will need a label for the TLSA RRs for kx509 issuers.</cref>
        </t>
      </section>
      <section title="Validation" anchor="d1e485">
        <t>
KDCs processing PKINIT requests crossing realms MUST apply either or both of:</t>
        <t>
          <list style="symbols">
            <t>
PKIX certificate validation</t>
            <t>
DANE certificate validation</t>
          </list>
        </t>
        <t>
KDCs MUST reject PKINIT requests from clients of foreign realms whose certificates cannot be validated, unless the client request the anonymous principal name in the target's realm.</t>
      </section>
      <section title="Transit Path" anchor="d1e504">
        <t>
The combined Kerberos/PKIX/DNSSEC transit path MUST be represented in any tickets issued using PKCROSS (see below). As usual, each realm's KDCs in the mix can set the transit policy checked flag if a client's transit path is acceptable per the realm's KDCs' local policy.</t>
        <t>
Two validation mechanisms are available: all PKIX <xref target="RFC5280"/> validation methods, and DANE <xref target="RFC6698"/>. DANE validation records SHOULD be stapled onto the client certificates by the issuing kx509 CA; alternatively clients can staple DANE validation records onto their PKINIT requests using an authorization-data element, AD-PKINIT-CLIENT-DANE.</t>
        <t>
Additionally, when PKIX certificate validation is used, the trust path should be encoded in an AD-INITIAL-VERIFIED-CAS authorization data element, per-PKINIT.</t>
        <section title="Transit path representation" anchor="d1e532">
          <t>
The notional transit path for a ticket issued by a target realm's KDCs includes:</t>
          <t>
            <list style="symbols">
              <t>
the source realm (never expressed in the 'transited' field of Kerberos Tickets)</t>
              <t>
all realms in the ITGT's transited field (in the TGS-driven PKCROSS case)</t>
              <t>
all issuers in the validation path for the kx509-issued certificate, which are

<list style="symbols"><t>
all issuers in the certificate's PKIX validation path when PKIX validation is used</t><t>
all DNS zone domainnames transited from the source realm's domainname to the root zone</t></list>
</t>
              <t>
the target realm (also never expressed in the 'transited' field)</t>
            </list>
          </t>
          <t>
When using DANE for validation of the issuer's certificate the target SHOULD represent the transit path as hierarchical from the source realm's domain to the root domain, then direct from there to the target's realm.</t>
          <t>
The notional transit path for a given client principal MUST be encoded as usual, using the Kerberos X.500 and domain-style representations of PKIX issuer names and DNS domainnames as faithfully to the original as possible.</t>
          <t>
            <cref>
QUESTION: Do we need a 100% faithful representation of the transit path?</cref>
          </t>
        </section>
      </section>
      <section title="Exchange of Long-Term Cross-Realm Symmetric Keys" anchor="d1e571">
        <t>
A KDC can acquire a TGT using PKCROSS whose session key then becomes the long-lived, persistent symmetric key for a cross-realm principal from the source realm to the target realm (“krbtgt/TARGET@SOURCE”).</t>
        <t>
To do this the KDC MUST set the USE-SESSION-KEY-AS-REALM-KEY KDCOptions flag (TBD) in its request for an ITGT from the target realm. As usual, the target realm's KDC MUST validate the client principal's certificate. The target realm's KDC MUST NOT return a TGS-REP until the new principal is committed to its principal database, and MUST set the endtime of the ITGT to the time at which the source realm may begin using the new symmetrically-keyed principal.</t>
        <t>
The source realm's KDC MUST commit the new principal to its principal database and MUST NOT begin using the new principal's long-term keys until the new principal is available to all KDCs for the source realm and the endtime of the ITGT passes.</t>
        <t>
Target KDCs SHOULD require manual pre-approval of such new cross-realm principals. In small, isolated environments a KDC MAY be configured to pre-approve all such new principals.</t>
        <t>
By default, source KDCs SHOULD NOT automatically request long-term keying of cross-realm principals.</t>
      </section>
    </section>
    <section title="Security Properties" anchor="d1e593">
      <t>
The proposed PKCROSS protocol has several useful properties described below.</t>
      <section title="Automatic Cross-Realm Keying" anchor="d1e602">
        <t>
No more manual keying of cross-realm principals via exchanging passwords in-person on a telephone call (or similar).</t>
      </section>
      <section title="Scalability" anchor="d1e611">
        <t>
Kerberos with commonplace symmetrically-keyed hierarchical cross-real trusts can scale to a large universe of realms, but only if there are top-level realms that are willing to pair-wise trust and “child” realms. Such top-level realms do not exist in practice, leading to an O(N^2) scaling problem for most two-label realms.</t>
        <t>
Leveraging a PKI, such as a PKIX PKI <xref target="RFC5280"/> or a DNSSEC PKI <xref target="RFC4033"/> removes the need for either top-level realms (which are not likely to ever be operated as commercial or even non-profit entities) or O(N^2) pair-wise cross-realm symmetric keying.</t>
        <t>
The cost of this is having to add PKI trust paths to Kerberos trust paths (though the resulting trust path length need not be much different than before).</t>
      </section>
      <section title="Privacy Protection relative to home realm" anchor="d1e639">
        <t>
This protocol protects the privacy of client principals vis-a-vis their home realms, when the clients use the client-driven PKCROSS protocol.</t>
        <t>
This feature is generally and naturally available in PKI, and as this protocol is based on a kerberized certification authority, this protocol inherits this privacy feature from PKI.</t>
        <t>
The realms visited by the client may, of course, inform the client's home realm, but in the event that they don't, the client does gain this small measure of privacy. Of course, the privacy-conscious client SHOULD attach an OCSP Response <xref target="RFC6960"/> to its PKINIT request, per <xref target="RFC4557"/>.</t>
      </section>
    </section>
    <section title="Application Programming Interface Considerations" anchor="d1e666">
      <t>
Improved scalability for Kerberos realm traversal implies larger Kerberos universes, and the larger a universe of trust the more important it is to have useful and expressive local policy for evaluating the trustworthiness of any given transit path. Because in most applications local policy should be a component external to the application, there is mostly no impact on APIs here. However, an implementation may wish to provide applications with interfaces for specifying policies, either named or by value.</t>
      <section title="GSS-API Considerations" anchor="d1e675">
        <t>
The naming attributes <xref target="RFC6680"/> defined in <xref target="I-D.williams-kitten-generic-naming-attributes"/> provide access to information about transit paths.</t>
        <t>
Note that information about how PKCROSS was used to establish symmetrically-keyed cross-realm principals is lost and will not appear in the transit path in tickets issued by KDCs reached via such cross-realm principals.</t>
      </section>
    </section>
    <section title="Security Considerations" anchor="d1e699">
      <t>
        <cref>
All the security considerations of Kerberos and PKI apply. Security considerations are discussed throughout this document.</cref>
      </t>
      <t>
Scaling up the universe of realms reachable via any trust path necessarily dilutes trust overall, but not for specific paths. On the other hand, by shortening transit path lengths trust can be improved, though some short transit paths will have been symmetrically keyed using this PKCROSS protocol and therefore will be longer than they appear to be. These are subjective notions of trust, of course.</t>
      <section title="Loss of Cross-Realm Principal Trust Establishment Information" anchor="d1e712">
        <t>
Once a cross-realm principal is symmetrically keyed the transit path used to automatically key that principal will no longer appear in subsequent cross-realm tickets issued by the target.</t>
        <t>
The Kerberos transit path encodes only realm names (including X.500-style names, thus PKIX certificate subject and issuer names), and lacks any public key information that might be useful for pinning. However, the certificate validation path for each realm in a transit path SHOULD be included in the transit path.</t>
      </section>
      <section title="On the Need for a Common Transit Path Policy Language" anchor="d1e724">
        <t>
There are no standard ways to express authorization policies for trust transit paths for either Kerberos nor PKI. A standard language for this would be extremely useful. Such a language should allow for the expression of policies for both, clients and services. Such a language should allow for the expression of complex realm/domain/other naming, and should allow for HSTS-style pinning [add references -Nico]. Such a language should allow for multiple paths where desired, and should allow for more than path rejection: it should also allow for reducing the entitlements assigned to a peer/realm for authorization purposes.</t>
        <t>
The need for a standard transit path policy expression language is not new, and such a language is broadly and generally needed. Therefore such a language is outside this document's scope.</t>
      </section>
    </section>
    <section title="IANA Considerations" anchor="d1e736">
      <t>
        <cref>
Allocate the new KDCOptions flag (USE-SESSION-KEY-AS-REALM-KEY) and authorization-data element (AD-CLIENT-CERTIFICATE), as well as the new EKU id-pkcross-issuer.</cref>
      </t>
    </section>
    <section title="Acknowledgements" anchor="d1e745">
      <t>
Although the author arrived at this “kx509 + PKINIT == PKCROSS” idea independently, it is not an original idea. Henry Hotz and Jeffrey Altman each conceived the same idea years earlier. It is a relatively obvious idea when taking into account efforts to bridge disparate security mechanisms and credentials infrastructures.</t>
    </section>
  </middle>
  <back>
    <references title="Normative References">&rfc2119;
&rfc4120;
&rfc4556;
&rfc4557;
&rfc5280;
&rfc6680;
&rfc6698;
&rfc6717;
&I-D.williams-kitten-generic-naming-attributes;
</references>
    <references title="Informative References">&rfc4033;
&rfc6960;
</references>
  </back>
</rfc>
