<?xml version = '1.0'?>
<?rfc rfcedstyle='yes'?>
<?rfc rfcprocack='yes'?>
<?rfc toc='yes'?>
<?rfc symrefs='yes'?>
<!DOCTYPE rfc SYSTEM "../xml2rfc-1.36/rfc2629.dtd" [
      <!ENTITY rfc2119     PUBLIC '' '../rfc-bib/reference.RFC.2119.xml'>
      <!ENTITY rfc2865     PUBLIC '' '../rfc-bib/reference.RFC.2865.xml'>
      <!ENTITY rfc3748     PUBLIC '' '../rfc-bib/reference.RFC.3748.xml'>
      <!ENTITY rfc3579     PUBLIC '' '../rfc-bib/reference.RFC.3579.xml'>
      <!ENTITY rfc4282     PUBLIC '' '../rfc-bib/reference.RFC.4282.xml'>
      <!ENTITY rfc5281     PUBLIC '' '../rfc-bib/reference.RFC.5281.xml'> 
      <!ENTITY rfc5448     PUBLIC '' '../rfc-bib/reference.RFC.5448.xml'>
      <!ENTITY rfc6733     PUBLIC '' '../rfc-bib/reference.RFC.6733.xml'>
]>
<rfc ipr='trust200902' docName='draft-winter-radext-populating-eapidentity-00'
category='bcp'>
  <front>
	  <title abbrev="Populating EAP-Response/Identity">Considerations regarding the correct use of EAP-Response/Identity</title>
    <author fullname="Stefan Winter" initials="S." surname="Winter" >
	<organization abbrev="RESTENA" >
		  Fondation RESTENA
	</organization>
	<address>
		<postal>
			<street>6, rue Richard Coudenhove-Kalergi</street>
			<city>Luxembourg</city>
			<code>1359</code>
			<country>LUXEMBOURG</country>
		</postal>
		<phone>+352 424409 1</phone>
		<facsimile>+352 422473</facsimile>
		<email>stefan.winter@restena.lu</email>
		<uri>http://www.restena.lu.</uri>
	</address>
    </author>
    <date day="14" month="February" year="2014" />
    <area>Operations and Management Area</area>
    <workgroup>RADIUS Extensions Working Group</workgroup>
    <keyword>RADIUS</keyword>
    <keyword>Diameter</keyword>
    <keyword>AAA</keyword>
    <keyword>EAP</keyword>
    <keyword>Identity</keyword>
    <keyword>User-Name</keyword>
    <abstract>
	    <t>There are some subtle considerations for an EAP peer regarding the content of the EAP-Response/Identity packet when authenticating with EAP to an EAP server. This document describes two such considerations and suggests workarounds to the associated problems.</t>
    </abstract>
  </front>
<middle>
    <section title="Introduction" anchor="intro">
	<section title="Problem Statement" anchor="prob-state">
<t>
An Extensible Authentication Protocol (EAP, <xref target="RFC3748"/>) conversation between an EAP peer and an EAP server starts with an (optional) request for identity information by the EAP server (EAP-Request/Identity) followed by the peer's response with identity information (EAP-Response/Identity). Only after this identity exchange are EAP types negotiated.
</t>
<t>EAP-Response/Identity is sent before EAP type negotiation takes place, but it is not independent of the later-negotiated EAP type. Two entanglements between EAP-Response/Identity and the username to be used in the EAP method are described in this document.
<list style="numbers">
<t>The choice of identity to send in EAP-Response/Identity may have detrimental effects on the subsequent EAP type negotiation.</t>
<t>Using identity information from the preferred EAP type without thoughtful conversion of character encoding may have detrimental effects on the outcome of the authentication.</t>
</list>
</t>
<t>The following two chapters describe each of these issues in detail. The last chapter contains recommendations for implementers of EAP peers to avoid these issues.</t>
</section>
        <section title="Requirements Language" anchor="reqlang">
                <t>In this document, several words are used to signify the
requirements of the specification.  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 RFC 2119.
<xref target="RFC2119" /></t>
        </section>
</section>
<section title="EAP-Response/Identity: Effects on EAP type negotiation" anchor="nego-problem">
<t>Assuming the EAP peer's EAP type selection is not the trivial case (i.e. it has more than one configured EAP type, and needs to make a decision which one to use), an issue arises when the configured EAP types are not all configured with the same username.</t>
<t>Issue: if the usernames in the set of configured EAP types differ (e.g. have a different <xref target="RFC4282"/> „realm“ portion), EAP type negotiation may be limited to those EAP types which are terminated in the same EAP server.
The reason for that is because the information in the EAP-Response/Identity is used for request routing decisions and thus determines the EAP server - a given username may be routed to a server which exclusively serves the matching EAP type. 
Negotiating another EAP type from the set of configured EAP types during the running EAP conversation is then not possible.
</t>
<t>
Example:</t><t>
Assume an EAP peer is configured to support two EAP types:
<list style="symbols">
<t>EAP-AKA’ <xref target="RFC5448"/> with username imsi@mnc123.mcc123.3gpp-network.org</t>
<t>EAP-TTLS <xref target="RFC5281"/> with username john@realm.example</t>
</list>
The user connects to hotspot of a roaming consortium which could authenticate him with EAP-TTLS and his john@realm.example identity. The hotspot operator has no business relationship at all with the 3GPP consortium; incoming authentication requests for realms ending in 3gppnetwork.org will be immediately rejected.</t>
<t>Consequence:
If the EAP peer consistently choses the imsi@mnc123.mcc123.3gpp-network.org username as choice for its initial EAP-Response/Identity, the user will be consistently and perpetually rejected, even though in possession of a valid credential for the hotspot.</t>
<t>
An EAP peer should always try all options to authenticate. As the example above shows, it may not be sufficient to rely on EAP method negotiation alone to iterate through all configured EAP types and come to a conclusive outcome of the authentication attempt. Multiple new EAP authentications, each using a different username from the set of configured usernames, may be required to fully iterate through the list of usable identities.
</t>
</section>
<section title="Character (re-)encoding may be required" anchor="encoding">
<t>The username as configured in the EAP method configuration is not always suited as username to choose as EAP-Response/Identity. This is trivially true when using tunneled EAP types and configuring anonymous outer identity for the tunneling EAP type. There is at least one additional, non-trivial, case to consider however:
</t><t>
EAP methods define the encoding of their usernames; in particular, the encoding of the usernames as defined the EAP method may or may not be UTF-8; some EAP methods are even known not to put any encoding restrictions on their usernames.
</t><t>
It is not the intention of EAP, as a mere method-agnostic container which simply carries EAP types, to restrict an EAP method’s choice of encoding of a username.
However, there are restrictions in what should be contained in the EAP-Response/Identity: EAP is very often carried over a AAA protocol (e.g over RADIUS as per <xref target="RFC3579"/>).
The typical use for the contents of EAP-Response/Identity inside AAA protocols like RADIUS <xref target="RFC2865"/> and Diameter <xref target="RFC6733"/> is to copy the content of EAP-Response/Identity into a „User-Name“ attribute; the encoding of the User-Name attribute is required to be UTF-8.
EAP-Response/Identity does not carry encoding information itself, so a conversion between a non-UTF-8 encoding and UTF-8 is not possible for the AAA entity doing the EAP-Response/Identity to User-Name copying.
</t><t>
Consequence:
If an EAP method’s username is not encoded in UTF-8, and the EAP peer verbatimly uses that method’s notion of a username for its EAP-Response/Identity field, then the AAA entity is forced to violate its own specification because it has to, but can not use UTF-8 for its own User-Name attribute. 
This jeopardizes the subsequent EAP authentication as a whole; request routing may fail or lead to a wrong destinationi, or the AAA payload may be discarded by the recipient due to the malformedness of the User-Name attribute.
</t>

</section>
<section title="Recommendations for EAP peer implementations" anchor="recommendations">
<t>
Where usernames between configured EAP types in an EAP peer differ, the EAP peer can not rely on the EAP type negotiation mechanism alone to provide useful results. If an EAP authentication gets rejected, the EAP peer SHOULD re-try the authentication using a different EAP-Response/Identity than before. The EAP peer SHOULD try all usernames from the entire set of configured EAP types before declaring final authentication failure.
</t>
<t>EAP peers need to maintain state on the encoding of the usernames which are used in their locally configured EAP types. When constructing an EAP-Response/Identity from that username information, they SHOULD (re-)encode that username as UTF-8 and use the resulting value for the EAP-Response/Identity. If the EAP type is configured for the use of anonymous outer identities, the desired outer identity should also be (re-)encoded in UTF-8 encoding before being put into the EAP-Response/Identity.
</t>
</section>
<section title="Privacy Considerations" anchor="privacy">
<t>
Because the EAP-Response/Identity content is not encrypted, the backtracking to a new EAP-Response/Identity will systematically reveal all configured identities to intermediate passive listeners on the path between the EAP peer and the EAP server (until one authentication round succeeds).</t>
<t>This additional leakage of identity information is not very significant though because where privacy is considered important, the additional option for identity privacy which is present in most modern EAP methods can be used.</t>
<t>If the EAP peer implementation is certain that all EAP types will be terminated at the same EAP server (e.g. with a corresponding configuration option) then the iteration over all identities can be avoided, because the EAP type negotiation is then sufficient.</t>
</section>
<section title="Security Considerations" anchor="security">
<t>The security of an EAP conversation is determined by the EAP method which is used to authenticate. This document does not change the actual authentication with an EAP method, and all the security properties of the chosen EAP method remain. The format requirements (character encoding) and operational considerations (re-try EAP with a different EAP-Response/Identity) do not lead to new or different security properties.</t>
</section>
<section title="IANA Considerations" anchor="iana">
	    <t>There are no IANA actions in this document.</t>
</section>
</middle>
<back>
	<references title="Normative References">
	&rfc2119;
	</references>
	<references title="Informative References">
	&rfc2865;
        &rfc3579;
	&rfc3748;
	&rfc4282;
	&rfc5281;
	&rfc5448;
	&rfc6733;
	</references>

</back>
</rfc>
