<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.2.6 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC6749 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6749.xml">
<!ENTITY RFC6750 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6750.xml">
]>


<rfc ipr="trust200902" docName="draft-hardt-oauth-mutual-01" category="info">

  <front>
    <title abbrev="I-D">Reciprical OAuth</title>

    <author initials="D." surname="Hardt" fullname="Dick Hardt">
      <organization>Amazon</organization>
      <address>
        <email>dick.hardt@gmail.com</email>
      </address>
    </author>

    <date year="2018" month="January" day="16"/>

    
    
    

    <abstract>


<t>There are times when a user has a pair of protected resources that would like to request access to each other. While OAuth flows typically enable the user to grant a client access to a protected resource, granting the inverse access requires an additional flow. Reciprical OAuth enables a more seemless experience for the user to grant access to a pair of protected resources.</t>



    </abstract>


  </front>

  <middle>


<section anchor="introduction" title="Introduction">

<t>In the usual three legged, authorization code grant, the OAuth flow enables a resource owner (user) to enable a client (party A) to be granted authorization to access a protected resource (party B). If party A also has a protected resource that the user would like to let party B access, then a complete OAuth flow, but in the reverse direction, must be performed.</t>

<t>Reciprical OAuth enables party A to obtain constent from the user to grant access to a protected resource at party A, and to short circuit the OAuth flow by passing an authorization code to party B using the acces token party A obtained from party B to provide party B the context of the user. This simplifies the user experience for each party to obtain acces tokens from the other.</t>

<section anchor="terminology" title="Terminology">

<t>In this document, the key words “MUST”, “MUST NOT”, “REQUIRED”,
“SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”,
and “OPTIONAL” are to be interpreted as described in BCP 14, RFC 2119
<xref target="RFC2119"/>.</t>

</section>
</section>
<section anchor="reciprical-authorization-flow" title="Reciprical Authorization Flow">

<t>The reciprical authorization flow starts after the client (party A) has obtained an access token from the authorization server (party B) per <xref target="RFC6749"/> 4.1 Authorization Code Grant.</t>

<section anchor="user-consent" title="User Consent">
<t>Party A obtains consent from the user to grant access to protected resources at party A. The consent represents the scopes party B had preconfigured at party A.</t>

</section>
<section anchor="reciprical-authorization-code" title="Reciprical Authorization Code">
<t>Party A generates an authorization code representing the access granted to party B by the user. Party A then makes a request to party B’s token endpoint authenticating per <xref target="RFC6749"/> 2.3 and sending the following parameters using the “application/x-www-form-urlencoded” format per <xref target="RFC6749"/> Appendix B with a character encoding of UTF-8 in the HTTP request entity-body:</t>

<t>grant_type
         REQUIRED.  Value MUST be set to “reciprical_authorization_code”. 
         [DH: should this be a URI?]</t>

<t>code
         REQUIRED.  The authorization code generated by party A.</t>

<t>client_id
         REQUIRED, party A’a client ID.</t>

<t>access_token
         REQUIRED, the access token obtained from Party B. Used to provide user context. 
         [DH: security concerns passing the access token in the body?]</t>

<t>For example, the client makes the following HTTP request using TLS
   (with extra line breaks for display purposes only):</t>

<figure><artwork><![CDATA[
 POST /token HTTP/1.1
 Host: server.example.com
 Authorization: Basic ej4hsyfishwssjdusisdhkjsdksusdhjkjsdjk
 Content-Type: application/x-www-form-urlencoded

 grant_type=mutual_authorization_code&code=hasdyubasdjahsbdkjbasd&client_id=example.com&access_token=sadadojsadlkjasdkljxxlkjdas
]]></artwork></figure>

<t>Party B MUST then verify the access token was granted to the client identified by the client_id.</t>

<t>Party B then plays the role of the client to make an access token request per <xref target="RFC6749"/> 4.1.3.</t>

</section>
</section>
<section anchor="iana-considerations" title="IANA Considerations">

<t>TBD.</t>

</section>
<section anchor="acknowledgements" title="Acknowledgements">

<t>TBD.</t>

</section>


  </middle>

  <back>

    <references title='Normative References'>

&RFC2119;
&RFC6749;
&RFC6750;


    </references>



<section anchor="document-history" title="Document History">

<section anchor="draft-hardt-oauth-mutual-00" title="draft-hardt-oauth-mutual-00">

<t><list style="symbols">
  <t>Initial version.</t>
</list></t>

</section>
<section anchor="draft-hardt-oauth-mutual-01" title="draft-hardt-oauth-mutual-01">

<t><list style="symbols">
  <t>renamed to Reciprical OAuth</t>
  <t>clarified user consent in reciprical flow</t>
  <t>changed authentication to be client authentication per <xref target="RFC6749"/> 2.3</t>
</list></t>

</section>
</section>


  </back>

<!-- ##markdown-source:
H4sIAD0NXloAA41XbW8aORD+vr/ColJfJHYb0lyvRYp6EJoLUt4uIXc6narI
rA0YljVne0Nolf9+z9i7CwSiHlKCWY/H8/I8M7NxHEdOuUy22Y1M1cKolGfs
qlO4ScSHQyMf2qwf9yKh05zPISUMH7l4wo1wseYQi+eFK3gWH7QiwR0kDg9a
n/Arbn2MUjwYa7NqM5WPdAT1beZMYd3hwcHng8MoIgXatCMWRwwflds26yXs
jNT7J+HSnkpnGw+1GfNcfedO6bzNOnP+Xed+Q865ymAjxBNv4m9jepKkeh5F
uTZzHHmQuI7dnJ4ctlqfy+XHX4/Wy18O2lFE9tbiURzHjA+tMzx1UTSYSCMZ
x59Tc2nZciJzxllhpWETbrFccGWYHrGF0U6mTgpmpNWFSSHtJtyxpS4ywTI1
gw6NzX8LaR3jKQQsPZE8nTDtcFHC/pqoTIaUsFGmlxBYLShN2YrJnA+xCcFw
PY6ODc+hiqWZkvmmTr7HnGYQV/nY61D5gzRWVofILgVRxuGfEIriDXSQEckO
XEpbyP25RmyslPOMtMjHhTSwJZUMMd1n66aJL0cuCXmYKyEyGUWvWD93Rosi
JbOiqJ+XqgFGrIyULJPjsRRNFlBWAoalWshwc9OfWEd2w4XqVqaXOWx9Sxa/
85kJEa/j+3bBjVuxjt8cloph9vad5Fvwcl8WKiXddwnrw/egkfHM6gpQu2c8
jupgbgMqk67U0i3v9a4SSkGFBbY33W6yYeGQe68NjPcQEEi8j2yTzUFYcg1p
JFJIkbAoil7Mf2U+7NBDxxVFPLeOgjUyev4zAOx6yitnOkhlLkjOIraOpcqk
hXLP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