TOC |
|
OpenID Authenticaion provides a way to prove that an End User owns an Identity URL. It does this without passing around their password, email address, or anything they don't want it to.
OpenID is completely decentralized meaning that anyone can choose to be a Consumer or Identity Provider without having to register or be approved by any central authority. End User's can pick which Identity Provider they wish to use and preserve their Identity as they move between Providers.
While nothing in the protocol requires JavaScript or modern browsers, the authentication scheme plays nicely with "AJAX"-style setups, so an End User can prove their Identity to a Consumer without having to leave the page they are on.
The OpenID Authentication specification does not provide any mechanism to exchange profile information, though Consumers of an Identity can learn more about an End User from any public, semantically interesting documents linked thereunder (FOAF, RSS, Atom, vCARD, etc.). Extensions are being built on top of the foundation created by OpenID Authentication to provide mechanisms to exchange profile information.
1.
Requirements Notation
2.
Terminology
3.
Overview
3.1.
Transforming a HTML Document Into an Identifier
3.1.1.
Delegating Authentication
3.2.
Submitting a Claimed Identifier
3.3.
Consumer Site Fetches the Identifier URL
3.4.
Smart vs Dumb Mode
3.5.
Consumer Verifies the Identifier
4.
Modes
4.1.
associate
4.1.1.
Request Parameters
4.1.2.
Response Parameters
4.1.3.
Extra Notes
4.2.
checkid_immediate
4.2.1.
Request Parameters
4.2.2.
Response Parameters
4.2.3.
Extra Notes
4.3.
checkid_setup
4.3.1.
Request Parameters
4.3.2.
Respone Parameters
4.3.3.
Extra Notes
4.4.
check_authentication
4.4.1.
Request Parameters
4.4.2.
Response Parameters
4.4.3.
Extra Notes
5.
Security Considerations
Appendix A.
Default Values
Appendix A.1.
Diffie-Hellman P Value
Appendix B.
Error Responses
Appendix C.
Key-Value Format
Appendix D.
Limits
Appendix E.
Misc
6.
Normative References
§
Authors' Addresses
TOC |
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 [RFC2119] (Bradner, B., “Key words for use in RFCs to Indicate Requirement Levels,” .).
TOC |
- End User:
- The actual human user who wants to prove their Identity to a Consumer.
- Identifier:
- An Identifier is just a URL. The whole flow of the OpenID Authentication protocol is about proving that an End User is, owns, a URL.
- Claimed Identifier:
- An Identifier that the End User says they own, though that has not yet been verified by the Consumer.
- Verified Identifier:
- An Identifier that the End User has proven to a Consumer that they own.
- Consumer:
- A web service that wants proof that the End User owns the Claimed Identifier.
- Identity Provider:
- Also called "IdP" or "Server". This is the OpenID Authentication server that a Consumer contacts for cryptographic proof that the End User owns the Claimed Identifier.
How the End User authenticates to their Identity Provider is outside of the scope of OpenID Authenticaiton.- User-Agent:
- The End User's web browser. No special plug-ins or JavaScript required.
TOC |
TOC |
In order for a Consumer to know the Identity Provider authoritative for an Identifier, the End User must add markup to the HEAD section of the HTML document located at their URL. The host of the HTML document is NOT REQUIRED to also be the End User's Identity Provider; the Identifier URL and Identity Provider can be fully decoupled services.
To use http://example.com/ as the End User's Identifier http://openid.example.com as their Identity Provider, the following tag would be added to the HEAD section of the HTML document returned when fetching their Identifier URL.
<link rel="openid.server" href="http://openid.example.com/">
TOC |
If the End User's host is not capable of running an Identity Provider, or the End User wishes to use one running on a different host, they will need to delegate their authentication. For example, if they want to use their website, http://www.example.com/, as their Identifier, but don't have the means, or desire, to run an Identity Provider.
If they have a LiveJournal account (say, user "exampleuser"), and know that LiveJournal provides an OpenID Identity Provider and that it'll assert that they control the Identifier http://exampleuser.livejournal.com/ they would be able to delegate their authentication to LiveJournal's Identity Provider..
So, to use www.example.com as their Identifier, but have Consumers actually verify http://exampleuser.livejournal.com/ with the Identity Provider located at http://www.livejournal.com/openid/server.bml, they'd add the following tags to the HEAD section of the HTML document returned when fetching their Identifier URL.
<link rel="openid.server" href="http://www.livejournal.com/openid/server.bml">
<link rel="openid.delegate" href="http://exampleuser.livejournal.com/">
Now, when a Consumer sees that, it'll talk to http://www.livejournal.com/openid/server.bml and ask if the End User is exampleuser.livejournal.com, never mentioning www.example.com anywhere on the wire.
The main advantage of this is that an End User can keep their Identifier over many years, even as services come and go; they'll just keep changing who they delegate to.
TOC |
TOC |
Continuing this example, the End User visits a Consumer site which supports OpenID Authentication. The Consumer presents the End User with a form field for them to enter their Identifier URL.
For Example:
---------------------------------- |[logo]example.com | [Login Button] ----------------------------------
TOC |
TOC |
Now the Consumer site fetchs the document located at the End User's Claimed Identifier. The Consumer then parses the HEAD section for the "openid.server" and the optional "openid.delegate" declarations.
TOC |
TOC |
OpenID Authentication supports both a "smart mode" and "dumb mode" to accomodate Consumers of differing capabilities. A smart Consumer does a little more work at the beginning to save itself work later, but requires local caching of state information. A dumb Consumer is completely stateless, but requires extra an HTTP request.
TOC |
TOC |
The Consumer now constructs a URL to the Identity Provider's checkid_immediate (checkid_immediate) (or checkid_setup (checkid_setup)) URLs and sends the User-Agent to it.
By sending the User-Agent there, the End User's cookies and whatever other login credentials are sent back to their trusted Identity Provider. The Identity Provider does its work, appends its response onto the supplied openid.return_to URL, and sends the User-Agent back to the Consumer.
TOC |
TOC |
TOC |
Value: "associate"
Value: Preferred association type
Default: "HMAC-SHA1"
Note: Optional; Currently only one value.
Value: Blank or "DH-SHA1"
Default: Blank. (cleartext)
Note: It is RECOMMENDED that DH-SHA1 mode is used to encrypt the shared secret.
Value: base64(btwoc(p))
Note: See Appendix A.1 (Diffie-Hellman P Value) for default p value.
Value: base64(btwoc(g))
Default: g = 2
Note: Only if using DH-SHA1 session_type. Should be specified if openid.dh_modulus is specified.
Value: base64(btwoc(g ^ x mod p))
Note: REQUIRED if using DH-SHA1 session_type.
TOC |
Response format: Key-Value Pairs
Value: The association type for the returned handle.
Note: The only current mode is HMAC-SHA1, and all Consumers MUST support it. When caching, the Consumer MUST map an assoc_handle to both its secret and its assoc_type.
Value: The association handle to be provided in future transactions.
Note: Consumers MUST NOT reuse this association handle after the corresponding expires_in value.
Value: The number of seconds this association handle is good for in base10 ASCII.
Value: The encryption mode that the Provider chose. MAY be blank, absent, or "DH-SHA1".
Value: base64(btwoc(g ^ y mod p))
Description: The Provider's Diffie-Hellman public key (Rescorla, E., “Diffie-Hellman Key Agreement Method,” .) [RFC2631], if using DH-SHA1.
Value: base64(SHA1(btwoc(g ^ (xy) mod p)) XOR secret(assoc_handle))
Description: The encrypted shared secret, if using DH-SHA1.
Value: base64(secret(assoc_handle))
Description: The plaintext shared secret, if not using DH-SHA1.
TOC |
TOC |
TOC |
Value: "checkid_immediate"
Value: Claimed Identifier
Value: The assoc_handle from the associate request.
Note: Optional; Consumer MUST use check_authentication if an association handle isn't provided or the Identity Provider feels it is invalid.
Value: URL where the Provider SHOULD return the User-Agent back to.
Value: URL the Provider SHALL ask the End User to trust.
Default: return_to URL
Optional; the URL which the End User SHALL actually see to approve.
TOC |
Response format: query string arguments
TOC |
Value: "id_res"
TOC |
Value: URL to redirect User-Agent to so the End User can do whatever's necessary to fulfill the assertion.
TOC |
Value: Verified Identifier
Value: Opaque association handle being used to find the HMAC key for the signature.
Value: Verbatim copy of the return_to URL parameter sent in the request, before the Provider modified it.
Value: Comma-seperated list of signed fields.
Note: Fields without the "openid." prefix that the signature covers. For example, "mode,identity,return_to".
Value: base64(HMAC(secret(assoc_handle), token_contents)
Note: Where token_contents is a key-value format string of all the signed keys and values in this response. They MUST be in the same order as listed in the openid.signed field. Consumer SHALL recreate the token_contents string prior to checking the signature. See Appendix D (Limits).
Value: Optional; The association handle sent in the request if the Provider did not accept or recognize it.
TOC |
TOC |
TOC |
Value: "checkid_setup"
Value: Claimed Identifier
Value: The assoc_handle from the associate request.
Note: Optional; Consumer MUST use check_authentication if an association handle isn't provided or the Identity Provider feels it is invalid.
Value: URL where the Provider SHOULD return the User-Agent back to.
Value: URL the Provider SHALL ask the End User to trust.
Default: return_to URL
Optional; the URL which the End User SHALL actually see to approve.
TOC |
Response format: query string arguments
TOC |
Value: "id_res" or "cancel"
TOC |
Value: Verified Identifier
Value: Opaque association handle being used to fine the HMAC key for the signature.
Value: Verbatim copy of the return_to URL parameter sent in the request, before the Provider modified it.
Value: Comma-seperated list of signed fields.
Note: Fields without the "openid." prefix that the signature covers. For example, "mode,identity,return_to".
Value: base64(HMAC(secret(assoc_handle), token_contents)
Note: Where token_contents is a key-value format string of all the signed keys and values in this response. They MUST be in the same order as listed in the openid.signed field. Consumer SHALL recreate the token_contents string prior to checking the signature. See Appendix D (Limits).
Value: Optional; The association handle sent in the request if the Provider did not accept or recognize it.
TOC |
TOC |
TOC |
Value: "check_authentication"
Value: The association handle from checkid_setup or checkid_immediate response.
Value: The signature from the checkid_setup or checkid_immediate request the Consumer wishes to verify.
Value: The list of signed fields from the checkid_setup or checkid_immediate request the Consumer wishes to verify the signature of.
Value: The Consumer MUST send all the openid.* response parameters from the openid.signed list which they'd previously gotten back from a checkid_setup or checkid_immediate request, with their values being exactly what were returned from the Provider.
Value: Optional; association handle returned via invalidate_handle.
TOC |
Response format: Key-Value Pairs
Value: "id_res"
Value: "true" or "false"
Description: Boolean; whether the signature is valid.
Value: opaque association handle
Description: If present, the Consumer SHOULD uncache the returned association handle.
TOC |
TOC |
TOC |
TOC |
1551728981814736974712322577637155\ 3991572480196691540447970779531405\ 7629378541917580651227423698188993\ 7278161526466314385615958256881888\ 8995127215884267541995034125870655\ 6549803580104870537681476726513255\ 7470407658574792912915723345106432\ 4509471500722962109419434978392598\ 4760375594985848253359305585439638443
TOC |
This section pertains to protocol/run-time errors, not authentication errors. Authentication errors are defined in the protocol.
TOC |
Lines of:
TOC |
TOC |
TOC |
[RFC2119] | Bradner, B., “Key words for use in RFCs to Indicate Requirement Levels.” |
[RFC2396] | Berners-Lee, T., “Uniform Resource Identifiers (URI): Generic Syntax.” |
[RFC2631] | Rescorla, E., “Diffie-Hellman Key Agreement Method.” |
TOC |
David Recordon | |
Email: | [email protected] |
Brad Fitzpatrick | |
Email: | [email protected] |