|
This specification defines how an OpenID Authentication
2.0 relying party can migrate the user from OpenID 2.0 identifier to OpenID
Connect Identifier by using an ID Token that includes the OpenID 2.0 verified
claimed ID. In this specification, the method to request such an additional
claim and the method for the verification of the resulting ID Token is
specified.
OIDF-Drafts are working documents of the OpenID
Foundation (OIDF).
OIDF-Drafts are draft documents valid for a maximum of
six months and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use OIDF-Drafts as reference material or to cite
them other than as “work in progress.”
This OIDF-Draft will expire on February 9, 2015.
Copyright © OpenID Foundation (2014). All Rights
Reserved.
1.
Introduction
1.1. Requirements Notation and
Conventions
1.2. Terminology
2. Requesting the OpenID 2.0 Identifier
and OpenID
[mbj1] Connect iss/sub[mbj2] pair together[mbj3]
3. Verification of the Relying Party by the OPOpenID
Provider[mbj4]
4. Returning the OpenID 2.0 Identifier
4.1. Error
Responses
4.1.1.[mbj5] Scope openid2[mbj6] not supported
4.1.2.
No Associated OpenID 2.0 Identifier found[mbj7]
5. Verification of the ID Token
6. Verification of the authoritativeness
of thethat the OpenID Connect OP is
Authoritative[mbj8]
7. Associating the existing [mbj9] OpenID 2.0 account [mbj10] with the OpenID Connect identifier[mbj11]
8. Implementation
Considerations
8.1. After EOL End-of-Life[mbj12] of the OpenID 2.0 OP
9. Privacy Considerations
9.1. Correlation
9.2. Identification by other
parties[mbj13]
9.3. Secondary Use
9.4. Disclosure
9.5. Exclusion
10. Security Considerations
11. References[mbj14]
12. References
12.1. Normative
References
12.2. Informative
References
Appendix A. Sequence Diagrams
Appendix B. Difference toDifferences
from[mbj15] Google’s migration
guide[mbj16] as of June 3, 2014
Appendix C. Acknowledgements
Appendix D. Notices
§ Authors' Addresses
§ Intellectual Property and Copyright Statements[mbj17]
OpenID Authentication 2.0 is a popular authentication
federation protocol through which the relying party can obtain the user’s verified
identifier from the OpenID Provider (OP) to which the user was authenticated.
OpenID Connect is a newer version of it[mbj18] related authentication
protocol but the identifier format is different and thus relying
parties need to migrate those user identifiers to
continue accepting such these users.
In this specification, a standard method for this kind of
migration on a per per-user
basis is described.
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 [RFC2119].
In the .txt version of this document, values are quoted
to indicate that they are to be taken literally. When using these values in
protocol messages, the quotes MUST NOT be used as part of the value. In the
HTML version of this document, values to be taken literally are indicated by
the use of this
fixed-width font.
For the purpose of this specification,[mbj19] tThe
terms defined in [mbj20] OpenID Connect Core 1.0
[OpenID.Core] and OpenID Authentication 2.0 [OpenID.2.0] is are used by
this specification. Where a same term is defined in both
specifications, the term defined in OpenID Connect Core takes precedence.
This specification also defines the following terms:
OpenID 2.0 Identifier
Verified user identifier
ofas specified by[mbj21] OpenID Authentication 2.0.OpenID Connect OP[mbj22]
OpenID Connect OpenID Provider OP
To obtain the OpenID 2.0 Identifier, the RP sends a
modified OpenID Connect Authentication Request by adding openid2 as
an additional scope value.
If PPID was used to obtain the OpenID 2.0 Identifier, openid.realm
has to be sent to the OP with the request. For this purpose, a new
authentication request parameter openid2_realm is defined.
openid2_realm
OPTIONAL. The openid.realm value as defined in Section 9.1 of OpenID 2.0 [OpenID.2.0]
If the authority section of Authorization Endpoint URI is
different from the authority section of the OpenID 2.0 OP’s OP Endpoint URL,
the client MUST issue a GET request to it with an Accept header set to application/json to
obtain the value of iss claim in it. The value of the iss claim obtained this way and the value of the
iss claim in the ID Token MUST exactly match.
Note: This is similar to
YADIS. In case of YADIS, it is using Accept header with its value set to application/xml+xrds.
The following is a non-normative example of an
authentication request to request the OpenID 2.0 Identifier (with line wraps
within values for display purposes only). NOTE: This example assumes that the
OpenID 2.0 OP Identifier is https://openid2.example.com.
GET /authorize?response_type=id_token
&scope=openid%20openid2
&client_id=s6BhdRkqt3
&state=af0ifjsldkj
&nonce=n-0S6_WzA2Mj
&openid2_realm=https%3A%2F%2Fopenid2.example.com
&redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb HTTP/1.1
Host: server.example.com
The End-User performs authentication and authorization at
the Connect OP which then returns the authentication response:
HTTP /1.1 200 OK
Location: https://client.example.com/cb#
id_token=eyJhbGciOiJSUzI1NiIsImtpZCI6IktleTAwMSJ9.ew0KIC
Jpc3MiOiAiaHR0cDovL3NlcnZlci5leGFtcGxlLmNvbSIsDQogInN1Yi
I6ICIyNDgyODk3NjEwMDEiLA0KICJhdWQiOiAiczZCaGRSa3F0MyIsDQ
ogIm5vbmNlIjogIm4tMFM2X1d6QTJNaiIsDQogImV4cCI6IDEzMTEyOD
E5NzAsDQogImlhdCI6IDEzMTEyODA5NzAsDQogIm9wZW5pZDJfaWQiOi
AiaHR0cHM6Ly9vcGVuaWQyLmV4YW1wbGUuY29tL3VzZXIzNTkzOTA4Nz
IxMTIiDQp9.rSo68AZGeJY15WxTtDxHrGlpJu2S7jIHsd_lBrBB20uva
UbbEvJyMJFuQVUeqH-b8XiyUFtHHynXxYq6P8SpMw7UX2y4BGg0Ky-5z
KeGJkT8-Cfkx8eLzKMVE-qsB31NhS3bZ4Wp3mHTsUCOUhbHfEeDRJaCJ
G3NlNEc2QLKBcmfzzdvVw98XuMySFIE0r9ekqx8h0IMvxRQgJENEDQ1q
70v5oR4YcEO1lcbT3a9wAA-0N27zAP0OUURXSMQaIfpmo8kDIaj7oRd8
36PowpRodp7VHKO0RoyhOFGFrDDA4z_mCE4Yopx-tWPZFPO8sekrz-H9
670UAZUOBux2CYGEw&
state=af0ifjsldkj
The contents of the ID Token after decoding are:
{
"iss": "http://server.example.com",
"sub": "248289761001",
"aud": "s6BhdRkqt3",
"nonce": "n-0S6_WzA2Mj",
"exp": 1311281970,
"iat": 1311280970,
"openid2_id": "https://openid2.example.com/user359390872112"
}
To verify the issuer in the ID Token is authoritative for
openid2_id, get the issuer from the OpenID 2.0 Identifier URL.
GET /user359390872112 HTTP/1.1
Host: openid2.example.com
Accept: application/json
HTTP /1.1 200 OK
Content-Type: application/json
{
"iss": "http://server.example.com"
}
Verify the iss of ID Token exactly matches the iss of
this response.
There could be an attack by a malicious RP to obtain the
user’s PPID for another RP to perform identity correlation. To mitigate the
risk, the OP MUST verify that the realm and RP’s Redirect URI matches as per Section
9.2 of OpenID 2.0
[OpenID.2.0].
If the verification of the Relying Party was successful
and an associated OpenID 2.0 Identifier for the user is found, then the OP MUST
include the OpenID 2.0 Identifier in the asymmetrically signed ID Token with
the following claim name:
openid2_id
REQUIRED. OpenID 2.0 Identifier. It MUST be represented as a JSON string.
For XRI, OpenID 2.0 Identifier MUST be created as https://xri.net/ + concatenated
with the[mbj23] user’s verified XRI without the xri:// scheme.
The following is a non-normative example of an ID Token
with an OpenID 2.0 Identifier claim (with line wraps within values for display
purposes only)
{
"iss": "http://server.example.com",
"sub": "248289761001",
"aud": "s6BhdRkqt3",
"nonce": "n-0S6_WzA2Mj",
"exp": 1311281970,
"iat": 1311280970,
"openid2_id": "https://openid2.example.com/user359390872112"
}
In addition to the error conditions defined in OpenID
Connect Core 1.0 [OpenID.Core] [mbj24] , the following
error conditions are defined in this standard: .[mbj25]
If the openid2 [mbj26] scope is not supported, the error invalid_scope as
defined in 4.1.2.1 of OAuth
[RFC6749] SHOULD be returned.
If a corresponding OpenID 2.0 Identifier is not found for
the authenticated user, the openid2_id claim in the ID Token MUST have the value NOT FOUND.
NOTE: Even if the openid2_id
claim value is NOT FOUND, the overall ID Token can still be valid.
The RP MUST verify the ID Token as specified in 3.1.3.7
of OpenID Connect Core 1.0
[OpenID.Core].
A malicious OP may try to impersonate the user by
returning the OpenID 2.0 Identifier that it is not authoritative for.
Therefore, verifying that the OP is indeed authoritative for the OpenID 2.0
Identifier is imperative. To establish the authoritativeness
forthat the OpenID 2.0 Identifier is
authoritative[mbj27] , the RP MUST verify that one of the following verification rules
holds.:[mbj28]
1.
If
the RP a priori knows that the authority hosted only one OpenID 2.0 OP and
OpenID Connect OP each, the authority section of Authorization Endpoint URI is
the same as the authority section of the OpenID 2.0 OP’s OP Endpoint URL.
2.
If
they are not (or when a higher confidence is sought), RP MUST make a GET call
to the obtained verified claimed ID with an Accept header set to application/json. The server SHOULD return a JSON with iss as its top level member. The value of this
member MUST exactly match the iss in
the ID Token.
If both fails, it is a failure and the RP MUST NOT accept
the OpenID 2.0 Identifier.
As the association between iss/sub and openid.claimed_id has been verified, the RP SHOULD associate the existing OpenID 2.0 account
with the OpenID Connect account.
NOTE: At some point in the
future, the OpenID Connect server may drop the support for openid2
scope. In this case, the OP will return the invalid_scope in
the error as defined in Section 4.1.
This standard allows the RP to verify the authenticity of
the OpenID 2.0 Identifier through ID Token even after the OpenID 2.0 OP is
taken down. To enable this, the OP MUST publish the public keys that were used
to sign the ID Token with openid2_id claim at the URI that this OpenID 2.0
Identifier points to.
NOTE: The OpenID 2.0 Identifiers can be mapped to a
static file containing the keys, so maintaining such can require minimal
overhead compared to maintaining the full OpenID 2.0 OP.
This section considers the Privacyprivacy-Specific
specific threats outlaid [mbj29] described in
Section 5.2 of RFC6973
[RFC6973].
This standard essentially is a correlation specification.
It correlates the OpenID Connect identifier with OpenID 2.0 Identifier. In the
usual case where the user has only one account and the Connect and OpenID 2.0
OPs look similar, then the user probably would be expecting that those
identifiers to be correlated silently. However, if the OPs looks very
different, then some users may prefer not to be correlated. As such, the OP
SHOULD make sure that to ask the user if the user wants to correlate.
When multiple accounts are available for the user, then
the OP MUST make sure that the user picks the intended identity.
Since the channel is encrypted, this risk is low. If the
channel was vulnerable, then user identifiers and other attributes will be exposed
and thus allows the attacker to identify the user. To avoid it, the parties can
employ ID Token encryption as well.
While there is no technical control in this standard as
to the secondary use is concerned, RP is strongly advised to announce its policy
against secondary use in its privacy policy. Secondary use usually is
associated with privacy impact, so its legitimacy should be carefully
evaluated.
Since the channel is encrypted, this risk is low. If the
channel was vulnerable, then user identifiers and other attributes will be
exposed and thus allows the attacker to identify the user. To avoid it, the
parties can employ ID Token encryption as well.
To avoid Exclusion in this case, make sure to ask the
user if he wants the identifiers to be correlated.
In addition to correctly implementing the usual OpenID
Connect security measures, the RP MUST carefully follow and correctly
implementing Section 6.
If in doubt, skipping step 1 and just doing step 2 is safer.
OpenID Foundation, “OpenID Authentication
2.0,” December 2007 (TXT, HTML). |
|
Sakimura, N., Bradley, J., Jones, M., de
Medeiros, B., and C. Mortimore, “OpenID Connect
Core 1.0,” February 2014. |
|
Bradner,
S., “Key words for
use in RFCs to Indicate Requirement Levels,” BCP 14,
RFC 2119, March 1997 (TXT, HTML, XML). |
|
Hardt, D., “The OAuth 2.0 Authorization
Framework,” RFC 6749, October 2012 (TXT). |
Cooper, A., Tschofenig, H., Aboba, B.,
Peterson, J., Morris, J., Hansen, M., and R. Smith, “Privacy Considerations for
Internet Protocols,” RFC 6973, July 2013 (TXT). |
Migration Sequence Diagram for Implicit Flow
+----+ +----------+ +--------------+ +---------+ +----------+
| UA | | Resource | | Redirect URI | | AuthzEP | |OpenID2URI|
+-+--+ +----+-----+ +-----+--------+ +---+-----+ +-----+----+
Click|Authn Link| | | |
+--------> | | | |
|Authn Req | | | |
| <--------+ | | |
| | Authn Req | | |
+---------------------------------------> | |
+----+----------------------------------------------------------------+
|OPT | | | Authn Page | | | |
+----+ | <---------------------------------------+ | |
| | | Credential | | | |
| +---------------------------------------> | | |
+---------------------------------------------------------------------+
| |302 to RedirectURI | |
| <------------------------+--------------+ |
| |ID Token | | |
+------------------------> | | |
| | |------+ | |
| |Get OpenID2URI | | | |
| |from ID Token | <----+ | |
| | | GET w/Accept: application/json
| | +---------------------------> |
| | | iss in JSON |
| | | <------------+--------------+
| | | | |
+-+--+ +----+-----+ +------+-------+ +----+----+ +------+---+
| UA | | Resource | | Redirect URI | | AuthzEP | |OpenID2URI|
+----+ +----------+ +--------------+ +---------+ +----------+
In this appendix, the differences between this spec and the Google’s
migration guide as of June 3, 2014 is are [mbj31] explained. The differences are categorized in accordance with the section
number of this specification. Google's migration guide is available at Migrating
to OAuth 2.0 login (OpenID Connect).
2.
Requesting the OpenID 2.0 Identifier and Connect iss/sub pair together
Google uses openid.realm instead. Since OpenID Connect uses
param_name style instead of param.name, as well as the name openid.realm
may mislead the user that it is a Connect parameter proper, it has been changed
to openid2_realm.
Google uses the existence of openid.realm
parameter to switch the behavior at the Connect OP. New scope value openid2
has been introduced in this spec to make it more explicit and semantically
in-line that it is asking for a resource.
3. Verification of the Relying
Party by the OP
Google does not perform RP verification.
4. Returning the OpenID 2.0
Identifier
Google uses the scope value
openid_id instead of openid2_id . It was changed to openid2_id because openid_id
may cause confusion among people that it is the Connect identifier. Since this
spec allows providing openid2_id even after the OpenID 2.0 OP has been taken down, this claim may persists
much longer than the OpenID 2.0 OP. Thus, the chance of confusion should be
minimized.
Google does not take care of XRI while this standard
does.
6.
Verification of the authoritativeness of the Connect OP
Google does not perform authority verification.
In addition to the authors, the OpenID Community would
like to thank the following people for their contributions to this
specification:
Breno de Medeiros (breno@google.com), Google
Ryo Ito (ryo.ito@mixi.co.jp), mixi, Inc.
Michael B. Jones (mbj@microsoft.com), Microsoft
Nov Matake (nov@matake.jp), Independent
Allan Foster [mbj32] (allan.foster@forgerock.com), ForgeRock
Chuck Mortimore (cmortimore@salesforce.com), Salesforce
Torsten Lodderstedt (torsten@lodderstedt.net), Deutsche [mbj33] Telekom
Justin Richer (jricher@mitre.org),
Mitre[mbj34] MITRE Corporation
Copyright (c) 2014 The OpenID Foundation.
The OpenID Foundation (OIDF) grants to any Contributor,
developer, implementer, or other interested party a non-exclusive, royalty
free, worldwide copyright license to reproduce, prepare derivative works from,
distribute, perform and display, this Implementers Draft or Final Specification
solely for the purposes of (i) developing specifications, and (ii) implementing
Implementers Drafts and Final Specifications based on such documents, provided
that attribution be made to the OIDF as the source of the material, but that
such attribution does not indicate an endorsement by the OIDF.
The technology described in this specification was made
available from contributions from various sources, including members of the
OpenID Foundation and others. Although the OpenID Foundation has taken steps to
help ensure that the technology is available for distribution, it takes no
position regarding the validity or scope of any intellectual property or other
rights that might be claimed to pertain to the implementation or use of the
technology described in this specification or the extent to which any license
under such rights might or might not be available; neither does it represent
that it has made any independent effort to identify any such rights. The OpenID
Foundation and the contributors to this specification make no (and hereby
expressly disclaim any) warranties (express, implied, or otherwise), including
implied warranties of merchantability, non-infringement, fitness for a
particular purpose, or title, related to this specification, and the entire
risk as to implementing this specification is assumed by the implementer. The
OpenID Intellectual Property Rights policy requires contributors to offer a
patent promise not to assert certain patent claims against other contributors
and against implementers. The OpenID Foundation invites any interested party to
bring to its attention any copyrights, patents, patent applications, or other
proprietary rights that may cover technology that may be required to practice
this specification.
|
Nat Sakimura |
|
Nomura Research Institute, Ltd. |
Email: |
|
URI: |
|
|
|
|
John Bradley |
|
Ping Identity |
Email: |
|
URI: |
|
|
|
|
|
|
Google |
Email: |
|
URI: |
|
|
|
|
Edmund Jay |
|
Illumila |
Email: |
|
URI: |
Copyright
© OpenID Foundation (2014). All Rights Reserved.
The
OpenID Foundation (OIDF) grants to any Contributor, developer, implementer, or
other interested party a non-exclusive, royalty free, worldwide copyright
license to reproduce, prepare derivative works from, distribute, perform and
display, this Implementers Draft or Final Specification solely for the purposes
of (i) developing specifications, and (ii) implementing Implementers Drafts and
Final Specifications based on such documents, provided that attribution be made
to the OIDF as the source of the material, but that such attribution does not
indicate an endorsement by the OIDF.
The
technology described in this specification was made available from
contributions from various sources, including members of the OpenID Foundation
and others. Although the OpenID Foundation has taken steps to help ensure that
the technology is available for distribution, it takes no position regarding
the validity or scope of any intellectual property or other rights that might
be claimed to pertain to the implementation or use of the technology described
in this specification or the extent to which any license under such rights
might or might not be available; neither does it represent that it has made any
independent effort to identify any such rights. The OpenID Foundation and the
contributors to this specification make no (and hereby expressly disclaim any)
warranties (express, implied, or otherwise), including implied warranties of
merchantability, non-infringement, fitness for a particular purpose, or title,
related to this specification, and the entire risk as to implementing this
specification is assumed by the implementer. The OpenID Intellectual Property
Rights policy requires contributors to offer a patent promise not to assert
certain patent claims against other contributors and against implementers. The
OpenID Foundation invites any interested party to bring to its attention any
copyrights, patents, patent applications, or other proprietary rights that may
cover technology that may be required to practice this specification.
For
OpenID Foundation's IPR Policy, refer to
http://openid.net/ipr/OpenID_IPR_Policy_(Final_Clean_20071221).pdf[mbj36]
[mbj1]We
should always use the term “OpenID Connect” and never abbreviate it to just “Connect”. It’s our brand – let’s use it correctly.
[mbj2]Put
quotation marks around claims names.
This should become “iss”/”sub”. This
should be done for all other protocol literals as well.
[mbj3]Titles
need to be in title case, per English grammar rules. Thus, the P and T must be capitalized.
[mbj4]It’s
inconsistent to use Relying Party and OP together. Spell both out.
[mbj5]This
draft has lots of <title> tags without anchor members, even though I
pointed this out in my -02 comments.
Please fix all of these.
[mbj6]Put
quotation marks around uses of protocol literals
[mbj7]Title
case needed
[mbj8]This
construction is less awkward grammatically
[mbj9]Title
case
[mbj10]Title
case
[mbj11]Title
case
[mbj12]EOL
normally stands for end-of-line. Don’t use abbreviations when they’re not
universally understood.
[mbj13]Title
case
[mbj14]Remove
this duplicate section.
[mbj15]This
construction is more grammatical
[mbj16]Title
case
[mbj17]This
section duplicates the content of the Notices section, and is not in any other
OpenID standards. Please remove it.
[mbj18]OpenID Connect is not a version of OpenID 2.0
[mbj19]This
construction is awkward.
[mbj20]You’re
missing a space here. I pointed this out
in my draft -02 comments but it wasn’t added to -03.
[mbj21]This
is more grammatical
[mbj22]I
would change this term to OpenID Connect OP so that we’re never using “Connect”
without “OpenID”. Again, we should use
our own trademarks correctly.
[mbj23]More
precise
[mbj24]Delete
this extra space
[mbj25]This
should be a period since a list doesn’t immediately follow.
[mbj26]Use
spanx verb around all protocol literals
[mbj27]Less
awkward
[mbj28]Plural
usage
[mbj29]This is awkward
[mbj30]Delete this duplicate, empty section!
[mbj31]Plural
usage
[mbj32]Add
the missing space here
[mbj33]This
was misspelled
[mbj34]MITRE is spelled in uppercase
[mbj35]This
was misspelled
[mbj36]Delete
these. This duplicates the contents of
the Notices section and isn’t how we do this in any of the other OpenID Connect
specs.