You're an OAuth enabled Twitter client, and you've already authorized your user. You user wants to use a media providing service like TwitPic. TwitPic, currently, asks for the username and password of your user so it can store the photo on behalf of the Twitter user. You don't have that username and password, so how do you give the ability to TwitPic to verify the identity of your user?
Very pleased that this went out... I've been pushing for this on this list for quite a while now...
Let us know if you need any help in any way...
As a side note - TweetPhoto has claimed on this list that they have some sort of oAuth delegation live?? I haven't played with it yet, but perhaps someone who has can comment on what it actually is that they've done?
In the example, would the user have to grant TwitPic access to his account? I would like to be able to assure TwitPic about the user’s identity without the user having to grant TwitPic any read or read/write access to his account.
Why does the delegator need to send the service provider x_request_method, x_request_url, x_request_parameters, and x_request_authorization? For example, why does Twitter need to know what the user is doing with TwitPic? It seems like an unnecessary disclosure of information that should stay between the consumer and the delegator. The end-user might want to authenticate using his Twitter credentials without telling Twitter what he’s doing.
Instead, the consumer should just sign <some constant>||timestamp||nonce||expiration_date with their Twitter access token/secret, since that’s all Twitter needs to verify the end-user’s possession of the Twitter access token. The delegator should be responsible for securing its own service (e.g. against replay).
In particular, the delegator should be able to use this service, even if the delegator doesn’t otherwise use OAuth for protecting its own resources, and even if the consumer isn’t communicating with the delegator over HTTP (think WebSockets, SPDY, etc.).
Regards,
Brian
Raffi Krikorian wrote:
http://mehack.com/a-proposal-for-delegation-in-oauth-identity-v
The term most frequently used for “delegator” is “relying party.” What you call the service provider is most frequently called the “identity provider.” What you call the consumer is usually called the “subject.” See OpenID, InfoCard, and other similar specifications for example usage of these terms.
The subject does not want just *anybody* to verify his identity; he only wants the *relying party* to be able to verify his identity. So, the subject needs to be able to identify the relying party in the string he signs. Then the identity provider needs to be able to verify that the relying party is the one making the request, so the relying party needs to sign the request with its OAuth credentials.
The subject doesn’t want the relying party to have access to the entire response from the account/verify_credentials request as if he had given the relying party read access to his account. I am not sure if account/verify_credentials returns sensitive information (information only available to apps that have been authorized by the user) yet, but I think it is likely in the future that it will do so. It would be prudent to have delegation use a different resource designed specifically for delegation.
Also, it would be great if the consumer could require the delegator to also use TLS when verifying the identity. Maybe OAuth Wrap/2.0 will mandate HTTPS for this?
Careful attention needs to be paid to whether or not it is safe to expose something the subject has signed to the relying party in OAuth WRAP/2.0, if WRAP/2.0 is designed to have this information always protected from third parties with TLS.
Regards,
Brian
The term most frequently used for “delegator” is “relying party.” What you call the service provider is most frequently called the “identity provider.” What you call the consumer is usually called the “subject.” See OpenID, InfoCard, and other similar specifications for example usage of these terms.
The subject does not want just *anybody* to verify his identity; he only wants the *relying party* to be able to verify his identity. So, the subject needs to be able to identify the relying party in the string he signs. Then the identity provider needs to be able to verify that the relying party is the one making the request, so the relying party needs to sign the request with its OAuth credentials.
The subject doesn’t want the relying party to have access to the entire response from the account/verify_credentials request as if he had given the relying party read access to his account. I am not sure if account/verify_credentials returns sensitive information (information only available to apps that have been authorized by the user) yet, but I think it is likely in the future that it will do so. It would be prudent to have delegation use a different resource designed specifically for delegation.
Also, it would be great if the consumer could require the delegator to also use TLS when verifying the identity. Maybe OAuth Wrap/2.0 will mandate HTTPS for this?
You said, "sends along the user object ass part of it".
Does that explain why the user object is in some cases a bit bloated?
On Feb 10, 1:31 pm, Raffi Krikorian <ra...@twitter.com> wrote:
> > The term most frequently used for “delegator” is “relying party.” What you
> > call the service provider is most frequently called the “identity provider.”
> > What you call the consumer is usually called the “subject.” See OpenID,
> > InfoCard, and other similar specifications for example usage of these terms.
>
> > i hear all this - it just gets a bit complicated with because we are
>
> conflating this with our oauth situation. perhaps its time to move to an
> oauth + openID hybrid system.
>
> > The subject does not want just **anybody** to verify his identity; he
> > only wants the **relying party** to be able to verify his identity. So,
Raffi,
You said, "sends along the user object ass part of it".
Does that explain why the user object is in some cases a bit bloated?
On Wed, Feb 10, 2010 at 11:05 PM, Dewald Pretorius <dpr...@gmail.com> wrote:Raffi,
You said, "sends along the user object ass part of it".
Does that explain why the user object is in some cases a bit bloated?
And what does it mean when the HTTP response code is 503.
The term most frequently used for “delegator” is “relying party.” What you call the service provider is most frequently called the “identity provider.” What you call the consumer is usually called the “subject.” See OpenID, InfoCard, and other similar specifications for example usage of these terms.
i hear all this - it just gets a bit complicated with because we are conflating this with our oauth situation.
perhaps its time to move to an oauth + openID hybrid system.
The subject doesn’t want the relying party to have access to the entire response from the account/verify_credentials request as if he had given the relying party read access to his account. I am not sure if account/verify_credentials returns sensitive information (information only available to apps that have been authorized by the user) yet, but I think it is likely in the future that it will do so. It would be prudent to have delegation use a different resource designed specifically for delegation.
account/verify_credentials discloses information that is private. For example, the HTTP header of account_verify_credentials discloses information about how frequently the user accesses twitter (the rate limit headers). If the user hasn't previously authorized (via OAuth) the delegator (relying party) to have read access to his account, then the delegator (relying party) shouldn't be able to get this information. Also, I think you should plan ahead for the case where account/verify_credentials returns even more sensitive information. If you were going to reuse an existing resource, I'd reuse users/show.format?user_id=<username> instead. But, AFAICT, it's much better to create a new resource for this purpose, and pretty easy to do so.i think this is again a general case vs a twitter case. i think in the general case, the delegator would call some endpoint that would simply verify the identity through a HTTP code (2xx for success, 4xx for failure). twitter, as a special case, sends along the user object [as] part of it?
Feel free to check out what we are doing:
http://groups.google.com/group/tweetphoto/web/oauth-signin
Third-party apps share with us their app's consumer key and secret.
We receive the same level of access to the third-party app using our
photo sharing service.
When two companies work together and are partners there needs to be a
level of trust.
Furthermore, developers can change their consumer secret at any time
so their is no real issue with this method.
There are a few integrations coming out soon with this method in
place.
Please let us know your thoughts and if you have any questions.
Sean
account/verify_credentials discloses information that is private. For example, the HTTP header of account_verify_credentials discloses information about how frequently the user accesses twitter (the rate limit headers). If the user hasn't previously authorized (via OAuth) the delegator (relying party) to have read access to his account, then the delegator (relying party) shouldn't be able to get this information. Also, I think you should plan ahead for the case where account/verify_credentials returns even more sensitive information. If you were going to reuse an existing resource, I'd reuse users/show.format?user_id=<username> instead. But, AFAICT, it's much better to create a new resource for this purpose, and pretty easy to do so.
I think the following would be a better protocol:
Consumer to Relying Party: Give me <RP-SIGNED-TOKEN>, a nonce signed with your OAuth credentials for the relying party'sidentity verification service. Relying Party to Consumer: Here is the token <RP-SIGNED-TOKEN>. (This is done using whatever protocol the consumer and the relying party agree to use.)
Consumer to Identity Provider: Here's <RP-SIGNED-TOKEN>. Give me <IP-SIGNED-TOKEN>, which is (<RP-SIGNED-TOKEN>, screen_name) signed with a signature that the relying party can verify is from the identity provider. Identity Provider to Consumer: I verified that the token was signed by the relying party identified by <RP_ID>. Here is <IP-RP-SIGNED-TOKEN>. (This is an OAuth-protected transaction using the consumer's credentials).
Consumer to Relying Party: Here is <IP-RP-SIGNED-TOKEN>.Relying Party to Consumer: OK, let's continue on with whatever we need to do. (This is done using whatever protocol the consumer and the relying party want to use.)
Notice in particular: (a) each server only has to process one request, (b) the relying part and the identity provider never have to communicate directly with each other, (c) the consumer (user) can control the level of security used in all the communication (e.g. TLS for everything), (d) IP-RP-SIGNED-TOKEN> can be used as the assertion in the OAuth 2.0/WRAP assertion profile, if the relying party is using OAuth WRAP to authenticate the user, (e) the user and the identity provider can both restrict which consumers can sign into which relying parties for which users using this mechanism.
in general, i really like this mechanism. from just a usability standpoint, however, it means that the consumer has to make a few calls simply to perform one action -- they have to call Twitter and then the service provider. on top of that, a real world example would have them:
- call the delegator to get a token;
- send that token to twitter to get another token;
- call the delegator with that received token to perform the action; and then
- (outside this protocol) call twitter to post the status update after that action has been performed.
another possible problem i have with it is that it assumes that the identity provider can sign something in a way that the delegator can verify it? oh - i suppose that may be the case -- we could use the consumer secret of the protected resource/delegator.
The subject does not want just *anybody* to verify his identity; he only wants the *relying party* to be able to verify his identity.
The subject does not want just *anybody* to verify his identity; he only wants the *relying party* to be able to verify his identity.
If I understand correctly, a URL signed using OAuth can be accessed successfully only once, because of the oauth-nonce parameter. Or atleast, it is possible to implement such a restriction at the identity provider's end.