<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="exp" docName="draft-openid-connect-discovery-0_1.xml"
     ipr="trust200902">
  <front>
    <title abbrev="Abbreviated-Title">OpenID Connect Discovery 1.0 - draft
    01</title>

    <author fullname="Nat Sakimura" initials="N." surname="Sakimura">
      <organization abbrev="NRI">Nomura Research Institute,
      Ltd.</organization>

      <address>
        <email>n-sakimura@nri.co.jp</email>
      </address>
    </author>

    <author fullname="John Bradley" initials="J." role="editor"
            surname="Bradley">
      <organization abbrev="Protiviti Government Services">Protiviti
      Government Services</organization>

      <address>
        <email>jbradley@mac.com</email>
      </address>
    </author>

    <author fullname="Mike Jones" initials="M." surname="Jones">
      <organization abbrev="Microsoft">Microsoft Corporation</organization>

      <address>
        <email>Michael.Jones@microsoft.com</email>
      </address>
    </author>

    <date day="4" month="July" year="2011" />

    <abstract>
      <t>OpenID Connect is an identity framework that provides authentication,
      authorization, and attribute transmition capability. It allows third
      party attested claims from distributed sources. The specification suite
      consists of Core, Protocol Bindings, Dynamic Registration, Discovery,
      and Extensions. This specification is the "Discovery" part of the suite
      that defines how user and server endpoints are discovered.</t>
    </abstract>

    <note title="Requirements Language">
      <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>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>In order for an OpenID client to utilize OpenID services for a user,
      the client needs to know where the OpenID provider is. OpenID Connect
      uses <xref target="SWD">Simple Web Discovery</xref> to locate the openID
      Connect provider for a end-user. This document describes the OpenID
      Connect specific parts related to <xref target="SWD">Simple Web
      Discovery</xref>.</t>

      <t>Once a OpenID provider is identified, the endpoint and other
      configuration information for that provider is retreved from a well
      known location as a JSON document.</t>
    </section>

    <section anchor="terminology" title="Terminology">
      <t><list style="hanging">
          <t hangText="Client">An application obtaining authorization and
          making protected resource requests.</t>

          <t hangText="End-user">A human resource owner.</t>

          <t hangText="Principal">A human resource owner that is the target of
          a request in Simple Web Discovery.</t>

          <t hangText="OpenID Provider (OP)">Authorization Servers that are
          able to support OpenID Connect Messages.</t>

          <t hangText="Issuer ID">The unique identifyer of the OpenID
          Provider. </t>

          <t hangText="Relying Party (RP)">Client and Resource Servers.</t>

          <t hangText="End-User Authorization Endpoint">The Authorization
          Server's endpoint capable of authenticating the End-User and
          obtaining authorization.</t>

          <t hangText="Client Identifier">An unique identifier that the client
          uses to identify itself to the OP.</t>

          <t hangText="Token Endpoint">The Authorization Server's HTTP
          endpoint capable of issuing tokens.</t>

          <t hangText="Authentication Endpoints">End-User Authentication,
          &amp; Authorization endpoint.</t>

          <t hangText="RP Endpoints">The endpoint to which the OP responses
          are returned through redirect.</t>

          <t hangText="UserInfo Endpoint">A protected resource that when
          presented with a token by the client returns authorized information
          about the current user.</t>

          <t hangText="Introspection Endpoint">The Authorization Servers
          endpoint that takes a ID_Token or access token as input and returns
          a unpacked JSON representation of a ID_Token.</t>

          <t hangText="Identifier">An Identifier is either a "http" or "https"
          URI, (commonly referred to as a "URL" within this document), or an
          account URI. This document defines various kinds of Identifiers,
          designed for use in different contexts.</t>
        </list></t>
    </section>

    <section title="Provider Discovery">
      <t>Provider discovery is optional, If a RP knows through an out of band
      mechinisim that all identifiers containing particular have the same
      issuer then they can ship this step and procede to Section 4.</t>

      <t>Provider discovery Simple Web Discovery requires the following
      information to make a discovery request:</t>

      <t><list style="symbols">
          <t>principal - identifier of the target end user who is the subject
          of the discovery request</t>

          <t>host - server where a Simple Web Discovery service is hosted</t>

          <t>service - URI of the service whose location is requested</t>
        </list></t>

      <t>OpendID Connect has the following discoverable service in Simple Web
      Discovery:</t>

      <texttable align="center" style="all">
        <ttcol width="">Service Type</ttcol>

        <ttcol>URI</ttcol>

        <c>OpenID Issuer</c>

        <c>http://openid.net/specs/cc/1.0/issuer</c>
      </texttable>

      <t>To start discovery of OpenID end points, the end-user supplies an
      identifier to the client or relying party. The client performs
      normalization rules to the identifier to extract the principal and host.
      Then it makes a HTTPS request the host's Simple Web Discovery endpoint
      with the <spanx style="verb">principal</spanx> and <spanx style="verb">service</spanx>
      parameters to obtain the location of the requested service.</t>

      <t>What MUST be returned in the response is the Java origin of the
      Issuer. This includes URI scheme HOST and port.</t>

      <section title="Identifier Normalization">
        <t>The user identifier can be one of the following:</t>

        <t><list style="symbols">
            <t>Hostname</t>

            <t>Email address</t>

            <t>URL</t>
          </list>Identifiers starting with the <xref
        target="XRI_Syntax_2.0">XRI</xref> characters ('=','@', and '!') are
        reserved. Any identifier that contains the character '@' in any other
        position other than the first position must be treated as an email
        address.</t>

        <t></t>

        <section title="Hostname">
          <t>If the identifier is the hostname, then the hostname is used as
          both the principal and host in Simple Web Discovery request. This
          results in a directed identity request.</t>
        </section>

        <section title="Email Address">
          <t>If the identifier is an email address, the principal is the email
          address and the host is the portion to the right of the '@'
          character.</t>
        </section>

        <section title="URL">
          <t>A URL identifier is normalized according to the following
          rules:</t>

          <t><list style="symbols">
              <t>If the URL does not have a "http" or "https" scheme, the
              string "https://" is prefixed to the URL.</t>

              <t>If the URL contains a fragment part, it MUST be stripped off
              together with the fragment delimiter character "#".</t>

              <t>The resulting URL is used as the principal and the host is
              extracted from it according to <xref target="RFC3986">URI</xref>
              syntax rules.</t>
            </list></t>
        </section>
      </section>

      <section title="Non-Normative Examples">
        <t></t>

        <section title="Hostname">
          <t>To find the authorization endpoint for the given hostname,
          "example.com", the SWD parameters are as follows:</t>

          <texttable>
            <ttcol>SWD Parameter</ttcol>

            <ttcol>Value</ttcol>

            <c>principal</c>

            <c>example.com</c>

            <c>host</c>

            <c>example.com</c>

            <c>service</c>

            <c>http://openid.net/specs/cc/1.0/issuer</c>
          </texttable>

          <t>Following the SWD specification, the client would make the
          following request to get the discovery information:</t>

          <t><figure>
              <artwork><![CDATA[GET /.well-known/simple-web-discovery?principal=example.com&service=http://openid.net/specs/cc/1.0/issuer HTTP/1.1
Host: example.com

HTTP/1.1 200 O.K.
Content-Type: application/json

{
 "locations":["https://example.com/auth"]
}]]></artwork>
            </figure></t>
        </section>

        <section title="Email Address">
          <t>To find the authorization endpoint for the given email address,
          "joe@example.com", the SWD parameters are as follows:</t>

          <texttable>
            <ttcol>SWD Parameter</ttcol>

            <ttcol>Value</ttcol>

            <c>principal</c>

            <c>joe@example.com</c>

            <c>host</c>

            <c>example.com</c>

            <c>service</c>

            <c>http://openid.net/specs/cc/1.0/issuer</c>
          </texttable>

          <t>Following the SWD specification, the client would make the
          following request to get the discovery information:</t>

          <t><figure>
              <artwork><![CDATA[GET /.well-known/simple-web-discovery?principal=joe@example.com&service=http://openid.net/specs/cc/1.0/issuer HTTP/1.1
Host: example.com

HTTP/1.1 200 O.K.
Content-Type: application/json

{
 "locations":["https://example.com/auth"]
}]]></artwork>
            </figure></t>
        </section>

        <section title="URL">
          <t>To find the authorization endpoint for the given URL,
          'https://example.com/joe", the SWD parameters are as follows:</t>

          <texttable>
            <ttcol>SWD Parameter</ttcol>

            <ttcol>Value</ttcol>

            <c>principal</c>

            <c>https://example.com/joe</c>

            <c>host</c>

            <c>example.com</c>

            <c>service</c>

            <c>http://openid.net/specs/cc/1.0/issuer</c>
          </texttable>

          <t>Following the SWD specification, the client would make the
          following request to get the discovery information:</t>

          <t><figure>
              <artwork><![CDATA[GET /.well-known/simple-web-discovery?principal=https://example.com/joe&service=http://openid.net/specs/cc/1.0/issuer HTTP/1.1
Host: example.com

HTTP/1.1 200 O.K.
Content-Type: application/json

{
 "locations":["https://example.com/auth"]
}]]></artwork>
            </figure></t>
        </section>
      </section>

      <section title="Redirection">
        <t>In cases where the SWD request is handled at a host or location
        other than the one derived from the end-user's identifier, the host
        will return a JSON object containing the new location.</t>

        <t><figure>
            <artwork><![CDATA[GET /.well-known/simple-web-discovery?principal=joe@example.com&service=http://openid.net/specs/cc/1.0/issuer HTTP/1.1
Host: example.com

HTTP/1.1 200 O.K.
Content-Type: application/json

{
 "SWD_service_redirect":
  {
   "location":"https://example.net/swd_server"
  }
}

GET /swd_server?principal=joe@example.com&service=http://openid.net/specs/cc/1.0/issuer HTTP/1.1
Host: example.net

HTTP/1.1 200 O.K.
Content-Type: application/json

{
 "locations":["https://example.net/auth"]
}]]></artwork>
          </figure></t>
      </section>
    </section>

    <section title="Provider Configuration Information">
      <t>This step is optional. The provider endpoints and configuration
      information may be provided out of band.</t>

      <t>Using the Issuer ID discoverd in Section 3 or through direct
      configuration the openID providers configuration can be retreved.</t>

      <t>OpenID providers MUST make available a JSON document at the path
      .well-known/openid-configuration. The syntax and semantics of
      ".well-known" are defined in <xref target="RFC5785">RFC 5785</xref> .
      "openid-configuration" MUST point to a JSON document compliant with this
      specification.</t>

      <t>OpenID providers MUST support receiving SWD requests via TLS 1.2 as
      defined in <xref target="RFC5246">RFCRFC 5246</xref> and MAY support
      other transport layer security mechanisms of equivalent security.</t>

      <section title="Provider Configuration Request">
        <t>A Provider Configuration Document is queried using a HTTPS GET
        request with the previously specified path.</t>

        <t>The client would make the following request to get the
        Configuration information</t>

        <t><figure>
            <artwork><![CDATA[GET /.well-known/openid-configuration HTTP/1.1
Host: example.com
]]></artwork>
          </figure></t>
      </section>

      <section title="Provider Configuration Response">
        <t>The response is a set of claims about the OpenID Providers
        configuration, including all neccicary endpoint, supported scope, and
        public key location information.</t>

        <t>The response MUST return a plain text JSON object that contains a
        set of claims that are a subset of those defined below. Other claims
        MAY also be returned.</t>

        <texttable anchor="ClaimTable" title="Reserved Claim Definitions">
          <ttcol align="left">Claim</ttcol>

          <ttcol align="left">Type</ttcol>

          <ttcol align="left">Description</ttcol>

          <c>authorization_endpoint</c>

          <c>string</c>

          <c>URI of the providers Authentication &amp; Authorization
          Endpoint.</c>

          <c>token_endpoint</c>

          <c>string</c>

          <c>URI of the providers Token </c>

          <c>introspection_endpoint</c>

          <c>string</c>

          <c>URI of the providers IDToken Introspection Endpoint</c>

          <c>user_info_endpoint</c>

          <c>string</c>

          <c>URI of the providers User Information Endpoint</c>

          <c>session_management_endpoint</c>

          <c>string</c>

          <c>URI of the providers Session Management Endpoint</c>

          <c>swk_endpoint</c>

          <c>string</c>

          <c>URI of the providers Simple Web Key "SWK" Document</c>

          <c>registration_endpoint</c>

          <c>string</c>

          <c>URI of the providers Simple Registration endpoint</c>

          <c>scopes_supported</c>

          <c>string</c>

          <c>A comma separated list of the OAuth 2.0 scopes which this server
          supports. The server MUST support the openid scope.</c>

          <c>flows_supported</c>

          <c>string</c>

          <c>A comma separated list of the OAuth 2.0 flows which this server
          supports. The server MUST support the code flow.</c>

          <c>eaa_supported</c>

          <c>string</c>

          <c>A comma separated list of the eaa which this server supports</c>

          <c>Identidiers_supported</c>

          <c>string</c>

          <c>A comma separated list of the user identifyer types which this
          server supports</c>
        </texttable>

        <t>Example response</t>

        <t><figure>
            <artwork><![CDATA[{
 "authorization_endpoint": "https://example.com/authorize",
 "token_endpoint": "https://example.com/token"
 "introspection_endpoint": "https://example.com/introspection",
 "user_info_endpoint": "https://example.com/user",
 "session_management_endpoint": "https://example.com/sm",
 "swk_endpoint": "https://example.com/swk.json",
 "registration_endpoint": "https://example.com/register",
 "scopes_supported": "openid",
 "flows_supported": "code,token",
 "eaa_supported": "http://www.idmanagement.gov/schema/2009/05/icam/openid-trust-level1.pdf",
 "Identidiers_supported": "omni,ppid"
}]]></artwork>
          </figure>Should the Should </t>
      </section>
    </section>

    <section title="Other Items for Consideration">
      <t><list style="numbers">
          <t>Should issuer be in the Provider Configuration Response</t>

          <t>Should issuer ID be explicitly restricted to the https://
          scheme.</t>
        </list></t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document makes no request of IANA.</t>

      <t>Note to RFC Editor: this section may be removed on publication as an
      RFC.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t></t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t></t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.5785.xml"?>

      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?>

      <?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml'?>

      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.5246.xml"?>

      <reference anchor="OpenID.CC">
        <front>
          <title>OpenID Connect Connect Core 1.0</title>

          <author fullname="David Recordon" initials="D." surname="Recordon">
            <organization abbrev="">Facebook</organization>
          </author>

          <author fullname="Nat Sakimura" initials="N." surname="Sakimura">
            <organization abbrev="NRI">Nomura Research Institute,
            Ltd.</organization>
          </author>

          <author fullname="John Bradley" initials="J." surname="Bradley">
            <organization abbrev="protiviti">Protiviti Government
            Service</organization>
          </author>

          <author fullname="Breno de Madeiros" initials="B."
                  surname="de Madeiros">
            <organization abbrev="GOOG">Google</organization>
          </author>

          <author fullname="Mike Jones" initials="M." surname="Jones">
            <organization abbrev="MSFT">Microsoft</organization>
          </author>

          <date day="14" month="January" year="2011" />
        </front>

        <format target="http://openid4.us/specs/ab/openid-connect-core-1_0.html"
                type="HTML" />
      </reference>

      <reference anchor="OpenID.AB">
        <front>
          <title>OpenID Connect Artifact Binding 1.0</title>

          <author fullname="Nat Sakimura" initials="N." role="editor"
                  surname="Sakimura">
            <organization abbrev="NRI">Nomura Research Institute,
            Ltd.</organization>
          </author>

          <author fullname="John Bradley" initials="J." surname="Bradley">
            <organization abbrev="protiviti">Protiviti Government
            Service</organization>
          </author>

          <author fullname="Breno de Madeiros" initials="B."
                  surname="de Madeiros">
            <organization abbrev="GOOG">Google</organization>
          </author>

          <author fullname="Ryo Ito" initials="R." surname="Ito">
            <organization abbrev="YahooJ">Yahoo! Japan</organization>
          </author>

          <author fullname="Mike Jones" initials="M." surname="Jones">
            <organization abbrev="MSFT">Microsoft</organization>
          </author>

          <date day="8" month="January" year="2011" />
        </front>

        <format target="http://openid4.us/specs/ab/openid-connect-ab-1_0.html"
                type="HTML" />
      </reference>

      <reference anchor="SWD">
        <front>
          <title>Simple Web Discovery</title>

          <author fullname="Mike Jones" initials="M." role="editor"
                  surname="Jones">
            <organization abbrev="MSFT">Microsoft</organization>
          </author>

          <author fullname="Yaron Goland" initials="Y." surname="Goland">
            <organization abbrev="protiviti">Protiviti Government
            Service</organization>
          </author>

          <date day="26" month="October" year="2010" />
        </front>

        <format target="http://self-issued.info/docs/draft-jones-simple-web-discovery-00.html"
                type="HTML" />
      </reference>

      <reference anchor="OpenID.2.0">
        <front>
          <title>OpenID Authentication 2.0</title>

          <author fullname="specs@openid.net" initials=""
                  surname="specs@openid.net">
            <organization abbrev="oidf"></organization>
          </author>

          <date year="2007" />
        </front>

        <format target="http://www.openid.net/specs/openid-authentication-2_0.txt"
                type="TXT" />

        <format target="http://www.openid.net/specs/openid-authentication-2_0.html"
                type="HTML" />
      </reference>

      <reference anchor="JWT">
        <front>
          <title>JSON Web Token</title>

          <author fullname="Mike Jones" initials="M." surname="Jones">
            <organization abbrev="MSFT">Microsoft</organization>
          </author>

          <author fullname="Dirk Balfanz" initials="D." surname="Balfanz">
            <organization abbrev="goog">Google</organization>
          </author>

          <author fullname="John Bradley" initials="J." surname="Bradley">
            <organization abbrev="pgs">rotivity Government
            Service</organization>
          </author>

          <author fullname="Yaron Goland" initials="Y." surname="Goland">
            <organization abbrev="msft">Microsoft</organization>
          </author>

          <author fullname="John Panzer" initials="J." surname="Panzer">
            <organization abbrev="goog">Google</organization>
          </author>

          <author fullname="Nat Sakimura" initials="N." surname="Sakimura">
            <organization abbrev="nri">Nomura Research Institute,
            Ltd.</organization>
          </author>

          <author fullname="Paul Tarjan" initials="P." surname="Tarjan">
            <organization abbrev="fb">Facebook</organization>
          </author>

          <date day="28" month="March" year="2011" />
        </front>

        <format target="http://self-issued.info/docs/draft-jones-json-web-token-03.html"
                type="HTML" />
      </reference>

      <reference anchor="JWS">
        <front>
          <title>JSON Web Signatures</title>

          <author fullname="Mike Jones" initials="M." surname="Jones">
            <organization abbrev="MSFT">Microsoft</organization>
          </author>

          <author fullname="Dirk Balfanz" initials="D." surname="Balfanz">
            <organization abbrev="goog">Google</organization>
          </author>

          <author fullname="John Bradley" initials="J." surname="Bradley">
            <organization abbrev="pgs">rotivity Government
            Service</organization>
          </author>

          <author fullname="Yaron Goland" initials="Y." surname="Goland">
            <organization abbrev="msft">Microsoft</organization>
          </author>

          <author fullname="John Panzer" initials="J." surname="Panzer">
            <organization abbrev="goog">Google</organization>
          </author>

          <author fullname="Nat Sakimura" initials="N." surname="Sakimura">
            <organization abbrev="nri">Nomura Research Institute,
            Ltd.</organization>
          </author>

          <author fullname="Paul Tarjan" initials="P." surname="Tarjan">
            <organization abbrev="fb">Facebook</organization>
          </author>

          <date day="28" month="March" year="2011" />
        </front>

        <format target="http://self-issued.info/docs/draft-jones-json-web-signature-01.html"
                type="HTML" />
      </reference>

      <reference anchor="XRI_Syntax_2.0">
        <front>
          <title>Extensible Resource Identifier (XRI) Syntax V2.0</title>

          <author fullname="Drummond Reed " initials="D." surname="Reed">
            <organization></organization>
          </author>

          <author fullname="Dave McAlpin" initials="D." surname="McAlpin">
            <organization></organization>
          </author>

          <date day="14" month="November" year="2005" />
        </front>

        <format target="http://www.oasis-open.org/committees/download.php/15376/xri-syntax-V2.0-cs.html"
                type="HTML" />

        <format target="http://www.oasis-open.org/committees/download.php/15377/xri-syntax-V2.0-cs.pdf"
                type="PDF" />
      </reference>
    </references>
  </back>
</rfc>
