<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- A set of on-line citation libraries are maintained on the xml2rfc web site.
     The next line defines an entity named RFC2629, which contains the necessary XML
     for the reference element, and is used much later in the file.  This XML contains an
     anchor (also RFC2629) which can be used to cross-reference this item in the text.
     You can also use local file names instead of a URI.  The environment variable
     XML_LIBRARY provides a search path of directories to look at to locate a 
     relative path name for the file. There has to be one entity for each item to be
     referenced. -->
<!ENTITY I-D.ietf-oauth-v2 SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-oauth-v2.xml">
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2234 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2234.xml">
<!ENTITY RFC2616 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2616.xml">
<!ENTITY RFC2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY RFC2661 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2661.xml">
<!ENTITY RFC3447 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3447.xml">
<!ENTITY RFC3986 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml">
<!ENTITY RFC4234 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4234.xml">
<!ENTITY RFC5246 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5246.xml">
<!ENTITY RFC5802 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5802.xml">
<!-- Fudge for XMLmind which doesn't have this built in -->
<!ENTITY nbsp "&#160;">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-neumann-oauth-token-transfer-00"
     ipr="trust200902">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN" 
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the 
         full title is longer than 39 characters -->

    <title abbrev="Secure Token Transfer Protocol (STTP)">Secure Token
    Transfer Protocol (STTP)</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Niklas Neumann" initials="N.N." role="editor"
            surname="Neumann">
      <organization abbrev="University of Goettingen">University of
      Goettingen</organization>

      <address>
        <postal>
          <street>Computer Networks Group</street>

          <street>Goldschmidtstrasse 7</street>

          <code>37077</code>

          <city>Goettingen</city>

          <country>Germany</country>
        </postal>

        <email>neumann@cs.uni-goettingen.de</email>
      </address>
    </author>

    <author fullname="Florian Tegeler" initials="F.T." surname="Tegeler">
      <organization abbrev="University of Goettingen">University of
      Goettingen</organization>

      <address>
        <postal>
          <street>Computer Networks Group</street>

          <street>Goldschmidtstrasse 7</street>

          <code>37077</code>

          <city>Goettingen</city>

          <country>Germany</country>
        </postal>

        <email>tegeler@cs.uni-goettingen.de</email>
      </address>
    </author>

    <author fullname="Xiaoming Fu" initials="X." surname="Fu">
      <organization abbrev="University of Goettingen">University of
      Goettingen</organization>

      <address>
        <postal>
          <street>Computer Networks Group</street>

          <street>Goldschmidtstrasse 7</street>

          <code>37077</code>

          <city>Goettingen</city>

          <country>Germany</country>
        </postal>

        <email>fu@cs.uni-goettingen.de</email>
      </address>
    </author>

    <date year="2010" />

    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill 
         in the current day for you. If only the current year is specified, xml2rfc will fill 
	 in the current day and month for you. If the year is not the current one, it is 
	 necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the 
	 purpose of calculating the expiry date).  With drafts it is normally sufficient to 
	 specify just the year. -->

    <!-- Meta-data Declarations -->

    <!--
    <area>General</area>
    -->

    <!--
    <workgroup>Internet Engineering Task Force</workgroup>
    -->

    <!-- WG name at the upperleft corner of the doc,
         IETF is fine for individual submissions.  
	 If this element is not present, the default is "Network Working Group",
         which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>token transfer</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      <t>The Secure Token Transfer Protocol (STTP) provides the means for two
      entities to exchange a set of tokens that is needed to perform a certain
      task such as authentication. The exact context of the tokens and their
      further usage is outside the scope of the protocol. STTP is intended to
      be employed to in case a mechanism to securely transfer tokens is
      missing for a particular scenario or context within other protocols.</t>
    </abstract>
  </front>

  <middle>
    <section title="Overview">
      <t>Tokens are commonly used in access authentication and authorization,
      for example, in a rather generic way in form of usernames and passwords
      or in more complex ways such as OAuth access tokens. The Secure Token
      Transfer Protocol (STTP) provides means to securely transfer such access
      tokens between different entities that might be involved in the
      provisioning of such tokens. While tokens are commonly required for
      authentication and authorization purposes within protocols, they do not
      always provide means to securely transport or provision them in every
      scenario. If such means are missing for a specific protocol or scenario,
      STTP can be used for such tasks.</t>

      <t><xref target="fig_example"></xref> shows an example where STTP is
      used to transport a set of tokens between three entities to access a
      resource that is available on a fourth entity. Client A wants to access
      a protected resource on a server. Between Client A and the server an
      application specific authentication or authorization protocol is
      employed (e.g. HTTP Basic Access Authentication or OAuth) within an
      application specific workflow to access a protected resource (A). The
      server in turn requests an authentication or authorization protocol
      specific set of tokens in order to grant the Client access to the
      requested resource (B). As a set of appropriate tokens is not available
      on Client A it uses STTP to request a set of tokens from Client B which
      is under the control and trusted by the resource owner (C). Client A and
      Client B can be running in different applications and even on different
      devices. If the user approves the token request, Client B will again use
      STTP to request a set of tokens that matches the request from Client A
      from the appropriate authentication or authorization server (D). The
      corresponding request can be authenticated within STTP if the server
      requires so. If the user is authorized to access the protected resource
      the authentication or authorization server will issue a corresponding
      set of tokens that are opaque to STTP (E). Client B transfers this set
      of tokens to Client A (F) which in turn can use it in a protocol
      specific way to authenticate or authorize the access request to the
      protected resource (G).</t>

      <figure anchor="fig_example" title="STTP Example">
        <artwork><![CDATA[                                                            ----+
+----------+                                +-----------------+ |Appl.
| Client A |--(A) Access request ---------->|    Resource     | |spec.
|          |<-(B) Access token req. --------|                 | |prot.
|(Consumer)|--(G) Access request + token -->|     Server      | |
+----------+                                +-----------------+ |
  |      ^                                                  ----+
  |      |                                                  ----+
 (C) GETTOKENS                                                  |
  |      |                                                      |
  |     (F) 200 OK + tokens                                     |
  |      |                                                      |STTP
  V      |                                                      |
+----------+                                +-----------------+ |
| Client B |--(D) GETTOKENS --------------->| Authentication/ | |
|(Resource |                                | Authorization   | |
|  owner)  |<-(E) 200 OK + tokens ----------| Server          | |
+----------+                                +-----------------+ |
                                                            ----+

]]></artwork>
      </figure>

      <section title="Requirements Notation and Conventions">
        <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">RFC 2119</xref>.</t>
      </section>

      <section title="Terminology">
        <t>The following terminology is used throughout this document:</t>

        <t><list style="hanging">
            <t hangText="Token">A data string that is required by another
            protocol to perform a specific task such as authentication or
            authorization. The exact context and the further use of tokens is
            outside the scope of this document. Tokens are opaque to STTP.</t>

            <t hangText="Client">The entity requesting a set of tokens.</t>

            <t hangText="Server">The entity that a set of tokens is requested
            from.</t>
          </list></t>
      </section>
    </section>

    <section title="Usage Scenarios">
      <t>This document addresses a number of particular scenarios where STTP
      could be used that are detailed below.</t>

      <section title="OAuth">
        <t>The OAuth 2.0 Protocol <xref target="I-D.ietf-oauth-v2"></xref>
        specifies a workflow that requires end-user authorization. To acquire
        end-user authorization an application needs to either access a HTTP
        resource (the end-user authorization endpoint) with an appropriate
        user-agent or have access to the user's credentials and perform HTTP
        Basic authentication. In cases where an application does not have
        access to such an appropriate user-agent or where HTTP Basic
        authentication is not supported, STTP can be used to request the
        corresponding OAuth tokens.</t>

        <t>OAuth also requires the transfer of an Access Grant and an Access
        Token between the entity accessing the resource server and the
        application accessing the authorization server. In scenarios where
        these entities are not part of the same application, STTP can be used
        to transfer the tokens securely between applications even if they are
        running on different hosts (e.g. the authorizing application is
        running on a mobile device).</t>
      </section>

      <section title="Dynamic Password Provisioning">
        <t>Passwords as shared secrets are very common for authentication and
        authorization. While in many cases they are pre-established, STTP can
        be used to dynamically provision passwords for specific scenarios. An
        example scenario is the generation of one-time-passwords that can be
        used to access services over an untrusted link or using an untrusted
        device. For example, a user can use a trusted mobile device that
        connects over a secure low-bandwidth link to the authentication and
        authorization server to retrieve a (one time) token that he can use to
        access a service on a public Internet terminal that uses a non-secured
        WiFi connection. In such a scenario the application on the public
        terminal could use STTP to request a set of tokens from the user's
        device which in turn uses STTP to retrieve the tokens (after a
        successful authentication) from the authentication and authorization
        server.</t>
      </section>
    </section>

    <section title="Protocol details">
      <t>To transfer a set of tokens a STTP client contacts a STTP server over
      an appropriate protocol and they exchanges a set of requests and
      responses. A request is a command string followed by a number of
      arguments and a response is a numeric code together with a textual
      representation followed by a number of arguments. Within one connection
      multiple requests and responses can be exchanged until either the client
      or the server terminate the connection.</t>

      <figure title="Example of a request message">
        <artwork><![CDATA[GETTOKENS
Type: OAuth
OAuth-Grant-Type: authorization_code
OAuth-Client-Id: s6BhdRkqt3
OAuth-Client-Secret: gX1fBat3bV
OAuth-Code: i1WsRn1uB

]]></artwork>
      </figure>

      <figure title="Example of a response message">
        <artwork><![CDATA[200 OK
Type: OAuth
OAuth-Access-Token: SlAV32hkKG
OAuth-Refresh-Token: 8xLOxBtZp8
Expires-In: 3600

]]></artwork>
      </figure>

      <t></t>

      <t></t>

      <section title="STTP over HTTP">
        <t>STTP can be used over HTTP(s). When using STTP over HTTP(s) a
        command MUST be included in the entity-body of a HTTP "POST" request
        with the "application/x-www-form-urlencoded" content-type.</t>

        <figure title="STTP over HTTP example request">
          <artwork><![CDATA[POST /resource HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded

GETTOKENS
Type: Plain
Identifier: john.doe@example.com

]]></artwork>
        </figure>
      </section>
    </section>

    <section title="Token Types">
      <t>STTP supports a number of different token types.</t>

      <section title="OAuth">
        <t>OAuth tokens are OAuth access grant tokens that can be further used
        by an application to gain access to a resource that is protected using
        the OAuth protocol.</t>
      </section>

      <section title="Generic Tokens">
        <t>Generic tokens are sets of each an identifier token (e.g. a
        username) and an authentication token (e.g. a password) that be
        further used by an application to gain access to a username/password
        protected resource.</t>
      </section>
    </section>

    <section title="Authentication">
      <t>STTP delegates server authentication to the (optionally) underlying
      TLS protocol. This document does describe its own methods to perform
      client authentication. Currently, client authentication via
      public/private key cryptography and password-based authentication using
      the Salted Challenge Response Authentication Mechanism (SCRAM) is
      supported.</t>

      <section title="Server authentication">
        <t>Server authentication is performed using certificates during the
        TLS handshake (see <xref target="RFC5246"></xref>, Section 7.4.2.). If
        the server did not authentication itself during the TLS handshake, the
        STTP client MAY terminate the connection if it requires server
        authentication.</t>
      </section>

      <section title="Client authentication">
        <t>If a server requires client authentication for a particular
        command, it will send a "Authentication Required" response message
        (see <xref target="response_code_401"></xref>) on receiving a command
        message that does not include sufficient arguments to authenticate the
        client. The server MUST include a Server-Nonce argument in the
        response message.</t>

        <section title="Authentication Method Negotiation">
          <t>To negotiate an authentication method, the client includes an
          Auth-Proposals argument in a command message which contains a list
          of supported authentication methods. If the client expects that an
          authentication will be required, for example, for the first command
          message of an STTP session, it can effectively save one
          protocol-round-trip by including an Auth-Proposals argument in the
          initial command message instead of waiting for an "Authentication
          Required" response message. A command message that includes an
          Auth-Proposals argument MUST also include a Client-Nonce
          argument.</t>

          <t>When the server receives a command message that includes an
          Auth-Proposals argument and the server does indeed require client
          authentication, it MUST choose one of the proposals and return a
          "Authentication Required" response message with an appropriate
          Auth-Scheme argument and the corresponding arguments that are
          required for the particular authentication method including the
          Client-Nonce. If the server does require client authentication but
          does not support any of the offered authentication methods it MUST
          respond with a "No Common Authentication Scheme" message. If the
          server does not require client authentication but the command
          message includes an Auth-Proposals argument, the server MUST ignore
          the argument.</t>

          <t>When selecting an authentication methods the server SHOULD assume
          that the list of authentication proposals is ordered by client
          preference. The server SHOULD try to honor the client preferences by
          selecting the first authentication methods on the list that the
          server supports. However, operational or administrative directives
          MAY implement a server-side preference list (for example, by ranking
          the different authentication methods by the server load they induce)
          which CAN be used to override the client preferences.</t>
        </section>

        <section title="Authenticated Request">
          <t>To successfully complete an authentication, the client must
          compose an authenticated command message. An authenticated command
          message is a command message that includes a valid Client-Proof
          argument. The Client-Proof is an authentication method specific
          string that is computed over the particular command message. Please
          refer to the details of the authentication methods for the details
          how the Client-Proof is calculated. The input string for the
          calculation of the Client-Proof MUST be identical to the command
          message that the Client-Proof is valid for exclusive of the
          Client-Proof argument itself. Besides the Client-Proof argument, an
          authenticated command message MUST also include a Server-Nonce
          argument that reflects the Server-Nonce that was included by the
          server in the initial "Authentication Required" response message, a
          Client-Nonce argument, and a Reflection-Key argument.</t>
        </section>

        <section title="SCRAM-SHA-1">
          <t>SCRAM authentication is based on the Salted Challenge Response
          Authentication Mechanism (SCRAM) as described in <xref
          target="RFC5802"></xref> with the AuthMessage being the
          authenticated command message itself (without the Client-Proof
          argument). SCRAM is only used to authenticate the client.</t>
        </section>

        <section title="RSA-SHA1">
          <t>Authentication based on Section 8.2. of <xref
          target="RFC3447"></xref> (RSASSA-PKCS1-v1_5) with the message to be
          signed (M) being the authenticated command message (without the
          Client-Proof argument).</t>
        </section>
      </section>
    </section>

    <section title="Commands">
      <t></t>

      <section title="GETTOKENS">
        <t>The GETTOKENS command is used by an agent to request a token pair
        for a particular service URI.</t>

        <section title="Arguments">
          <t>A client MUST include the following arguments in every GETTOKENS
          command:<list style="symbols">
              <t>Service-URI</t>
            </list></t>

          <t>A client CAN include the following arguments in a GETTOKENS
          command:<list style="symbols">
              <t>Auth-Proposals</t>

              <t>Client-Nonce</t>

              <t>Reflection-Key</t>

              <t>...</t>
            </list></t>

          <t></t>
        </section>
      </section>
    </section>

    <section title="Arguments">
      <t>A STTP command can have a number of arguments. Arguments consist of
      an identifier followed by a colon (":") and the argument value. An
      argument is terminated by a line break. Basically 4.2 in <xref
      target="RFC2661"></xref></t>

      <section title="Service-URI">
        <t>The particular service URI that the current command pertains to.
        Within the context of a GETTOKENS command this is the service URI that
        the client is requesting a set of tokens for.</t>

        <t>The Service-URI argument MUST follow the syntax described in <xref
        target="RFC3986"></xref>. When determining if a Service-URI matches a
        valid resource, a server MUST follow the rules for URI comparison for
        the particular service context (e.g. <xref target="RFC2616"></xref>
        for HTTP resources). If no service specific rules exists, a server
        MUST use a case-sensitive octet-by-octet comparison of the given URI
        with the following exceptions:<list style="symbols">
            <t>Comparisons of scheme names MUST be case-insensitive;</t>

            <t>Comparisons of host names MUST be case-insensitive;</t>

            <t>A port that is empty or not given is equivalent to the default
            port for the particular scheme;</t>

            <t>An empty path component is equivalent to the root path "/".</t>
          </list>Characters that are not classified as "reserved" by <xref
        target="RFC3986"></xref> are equivalent to their corresponding
        percent-encoding ("%" HEXDIG HEXDIG).</t>
      </section>

      <section title="Identifier">
        <t>The identifier token (e.g. a username) of the entity that the
        current exchange is intended for (either a user or another STTP
        agent).</t>
      </section>

      <section title="Server-Nonce">
        <t>A nonce value</t>
      </section>

      <section title="Client-Nonce">
        <t>A nonce value</t>
      </section>

      <section anchor="sec_reflection-key" title="Reflection-Key">
        <t>To prevent man-in-the-middle attacks during authenticated requests,
        STTP introduces a Reflection-Key. The Reflection-Key argument is
        included in an authenticated request and reflects the server that the
        client is talking to. If a server receives a Reflection-Key that
        doesn't match it's own properties, it MUST terminate the connection.
        The actual value of the Reflection-Key is dependent on the protocol
        that STTP is run over.</t>

        <section title="TLS-based transport">
          <t>When STTP is run over a TLS-based protocol such as HTTPS the
          Reflection-Key argument is the SHA-1 fingerprint of the public key
          that was used to establish the TLS connection.</t>
        </section>

        <section title="Other transport">
          <t>When STTP is run over other transport protocols the
          Reflection-Key argument is the SHA-1 hash of the IP-Address and port
          number that was used to initiate the connection.</t>
        </section>

        <section title="Manual verification">
          <t>In n-party scenarios where a STTP server is used to request a
          token on behalf on another client (e.g. a mobile device is used to
          request a token for an untrusted terminal) the STTP server and the
          STTP client SHOULD present the user with a human readable form of
          the Reflection-Key. This allows the user to manually verify that
          both Reflection-Keys match and to prevent a man-in-the-middle
          attack.</t>
        </section>
      </section>

      <section title="Auth-Scheme">
        <t>The authentication scheme that is used in the request.</t>
      </section>

      <section title="Client-Proof">
        <t>The client-side result of an authentication run.</t>
      </section>

      <section title="Auth-Proposals">
        <t>Comma separated list of authentication schemes that are supported
        by the client to perform client authentication. MUST be included in a
        request that follows a "Authentication Required" response for the same
        service URI.</t>
      </section>

      <section title="Iteration-Count">
        <t>Integer value</t>
      </section>

      <section title="Message">
        <t>A message which contains more verbose information and that is
        intended to be displayed to the end user.</t>
      </section>

      <section title="Type">
        <t>The type of tokens that are being transferred.<list style="symbols">
            <t>PLAIN</t>

            <t>OAuth</t>
          </list></t>

        <section title="Plain">
          <t>If the Type argument is set to Plain, the tokens that are being
          requested/transferred are generic tokens.</t>
        </section>

        <section title="OAuth">
          <t>If the Type argument is set to Plain, the tokens that are being
          requested/transferred are OAuth tokens.</t>
        </section>
      </section>

      <section title="Expires-In">
        <t>Number of seconds the transferred tokens are still valid for.</t>
      </section>

      <section title="OAuth-Grant-Type">
        <t></t>
      </section>

      <section title="OAuth-Client-Id">
        <t></t>
      </section>

      <section title="OAuth-Client-Secret">
        <t></t>
      </section>

      <section title="OAuth-Code">
        <t></t>
      </section>

      <section title="OAuth-Access-Token">
        <t></t>
      </section>

      <section title="OAuth-Refresh-Token">
        <t></t>
      </section>

      <section title="IToken">
        <t>Generic identifier token (e.g. username).</t>
      </section>

      <section title="AToken">
        <t>Generic authentication token (e.g. password).</t>
      </section>
    </section>

    <section title="Response Codes">
      <t>A server's response starts with a response code that reflects the
      outcome of the last client request. The available response codes are
      described in this section including the arguments that are valid for
      each response.</t>

      <section title="Informational 1xx">
        <t>Currently no use.</t>
      </section>

      <section title="Successful 2xx">
        <t></t>

        <section title="200 OK">
          <t></t>
        </section>
      </section>

      <section title="Redirection 3xx">
        <t></t>
      </section>

      <section title="Client Error 4xx">
        <t></t>

        <section title="400 Bad Request">
          <t></t>
        </section>

        <section anchor="response_code_401"
                 title="401 Authentication Required">
          <t></t>
        </section>

        <section title="402 Not Responsible">
          <t></t>
        </section>

        <section title="403 Authentication Failed">
          <t></t>
        </section>

        <section title="404 No Common Authentication Scheme">
          <t></t>
        </section>
      </section>

      <section title="Server Error 5xx">
        <t></t>

        <section title="501 Not Implemented">
          <t></t>
        </section>
      </section>
    </section>

    <section title="Security considerations">
      <t></t>

      <section title="Token security">
        <t>Currently STTP relies on the transport protocol to protect the
        tokens. STTP MUST be used over a secure transport protocol such as
        HTTPS if the tokens are to be protected from eavesdropping.</t>
      </section>

      <section title="Man-in-the-middle attacks">
        <t>The goal of an adversary in STTP is to obtain a valid set of tokens
        pair which he can use to authenticate as the user or to obtain the
        user's credentials themselves. There are two possible attacks if an
        adversary successfully tricks a client to connect to a fraudulent
        server: either the adversary continues with a phishing attack with the
        goal to obtain user credentials or he switches to a man-in-the-middle
        attack to gain access to a valid set of tokens that are being
        transferred. In case he continues the phishing attack the fraudulent
        server is setup to successfully complete the user authentication even
        if the credentials cannot be verified. However, STTP only supports a
        very selective number of authentication methods that do not rely on
        shared secrets. Neither of the methods supported provide the party
        that a user is authenticating to with any data that can be used to
        impersonate the user. In case the attacker switches to a
        man-in-the-middle attack the STTP authentication that is being relayed
        from the attacker to the proper STTP server will fail since the
        Reflection-Key attribute (c.p. <xref
        target="sec_reflection-key"></xref>) during the authentication doesn't
        match. However in cases where no user authentication is used, STTP
        relies on user interaction to manually compare the
        Reflection-Keys.</t>
      </section>

      <section title="Privacy protection">
        <t>To protect the users privacy against eavesdroppers, a secure
        transport protocol such as TLS-based transports must be used. If such
        a secure transport is not used, STTP discloses privacy-relevant
        information such as the URI that tokens are being requested for and
        the username.</t>
      </section>
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split to informative and normative -->

    <references title="Normative References">
      &RFC2119;

      &RFC2616;

      &RFC2661;

      &RFC3447;

      &RFC3986;

      &RFC5246;

      &RFC5802;

      &I-D.ietf-oauth-v2;
    </references>

    <!--
    <references title="Informative References">
    </references>
-->
  </back>
</rfc>
