IRC Log for #openid on 2010-05-21
Timestamps are in UTC.
- [00:52:26] * oxi (~oxi@unaffiliated/oxi) Quit (Quit: oxi)
- [01:04:18] * brandondb (~brandondb@ool-44c22f6f.dyn.optonline.net) has joined #openid
- [01:04:49] <brandondb>
hello, is this a good place to ask an open id implementation question?
- [01:07:44] * brandondb (~brandondb@ool-44c22f6f.dyn.optonline.net) has left #openid
- [01:08:39] * brandondb (~brandondb@ool-44c22f6f.dyn.optonline.net) has joined #openid
- [01:10:29] <flaccid>
sure
- [01:11:13] <brandondb>
thanks -- I'm trying to implement openid for integrating with the Google Apps Marketplace
- [01:11:37] <brandondb>
I spotted this code in the Facebook Tornado server: http://github.com/facebook/tornado/blob/master/tornado/auth.py
- [01:12:06] <brandondb>
the interesting bit is that the relying party redirects to google, then google redirects back to the relying party
- [01:12:17] <brandondb>
but I don't see any checking of the signature or anything
- [01:13:26] <brandondb>
so my question is: what do I need to do to verify the request is real? it seems like this code, and other documentation I have read are vulnerable to replay attacks
- [01:13:50] <brandondb>
and other spoofing
- [01:14:34] <brandondb>
http://code.google.com/apis/accounts/docs/OpenID.html for example, doesn't talk about validating the response
- [01:15:26] * daleolds (~daleolds@137.65.156.30) has left #openid
- [01:21:55] <flaccid>
the response is signed
- [01:22:12] <brandondb>
but with what key?
- [01:22:55] <flaccid>
openid.sig and openid.assoc_handle for the association plus the dated openid.response_nonce
- [01:24:30] <brandondb>
so is there a symmetric or asymmetric key?
- [01:24:49] <flaccid>
did you look at the spec?
- [01:25:11] <brandondb>
i did, but honestly I'm having a hard time reconciling the spec with practice
- [01:25:35] <flaccid>
yeah
- [01:25:48] <flaccid>
you could checkout one of the libraries and examples
- [01:25:58] <brandondb>
I've been reading the source to python-openid as well
- [01:26:28] <brandondb>
but it seems a bit more complicated than I need, considering I only want to support Google Apps accounts
- [01:26:41] <flaccid>
i've never done any google apps stuff..
- [01:26:57] <brandondb>
well i figured that's exactly 1 "association"
- [01:27:11] <brandondb>
so I should be able to get their public key and then use that to verify the signature
- [01:30:01] <flaccid>
i got no idea of the flow sorry..
- [01:30:07] <flaccid>
not for google apps
- [01:30:13] <brandondb>
ok thanks
- [01:30:32] <brandondb>
I'm looking at the spec now
- [01:30:56] <flaccid>
google further complicates things and irc forks openid/oauth in some ways
- [01:31:07] <flaccid>
so yeah i would expect research and learning will be required
- [01:31:12] <brandondb>
yeah, they are doing some crazy voodoo
- [01:31:18] <brandondb>
I've been banging my head against this for 2 days now
- [01:31:19] <flaccid>
unless someone else he can jump in to help out
- [01:31:31] <flaccid>
yeah don worry i banged myself on openid for weeks
- [01:31:44] <flaccid>
but creating an OP and RP with a lib is a good way to learn
- [01:31:48] <flaccid>
against the spec..
- [01:32:00] <yangman>
google's OID isn't too crazy
- [01:32:14] <brandondb>
hi yangman
- [01:33:05] <brandondb>
I can craft a redirect URL to google, and after logging in, am redirected back to my site
- [01:33:26] <yangman>
yeah. you verify it using that's in the URL
- [01:33:27] <brandondb>
but I do not know how to verify the the authenticated login request
- [01:33:35] <brandondb>
huh?
- [01:33:45] <yangman>
*what's in the URL
- [01:33:46] <flaccid>
in the libs there is a method for that..
- [01:34:11] <yangman>
there is no key based signing
- [01:34:27] <brandondb>
right, but we need a shared secret or something right? otherwise people can spoof that, right?
- [01:34:42] <yangman>
there's enough uniquely identifiable information in the redirect URLs themselves to prevent spoofing
- [01:34:58] <yangman>
any secret is between the User and OP
- [01:35:02] <yangman>
the relying party does not get involved
- [01:35:38] <yangman>
what the RP verifies is that the final redirect is valid
- [01:35:50] <brandondb>
hmmm ok im not sure how that works though. here's why:
- [01:35:54] <brandondb>
you go to example.com/login
- [01:35:56] <yangman>
it can inject whatever it needs into the final redirect URL to identify uniqueness internally
- [01:36:01] <brandondb>
get redirected to google.com/whatever
- [01:36:16] <brandondb>
the user logs in there and gets redireted to example.com/login2
- [01:36:53] <brandondb>
what is stopping a random user from going to example.com/login2?openid.claimed_id=https://www.google.com/blahblah
- [01:36:59] <brandondb>
and stealing a random user's identity?
- [01:37:11] <brandondb>
that's the part i don't get
- [01:37:16] <flaccid>
the fields i mentioned before... mainly the association
- [01:37:40] <brandondb>
assoc_handle ?
- [01:38:03] <brandondb>
so that is unique between example.com <--> google.com ?
- [01:38:13] <flaccid>
well thats what an association would be..
- [01:38:19] <brandondb>
right, that's what i thought
- [01:38:29] <brandondb>
but then couldn't i just copy the assoc handle from another request?
- [01:38:33] <brandondb>
i can just copy paste that
- [01:38:38] <brandondb>
it's not cryptographically secure
- [01:38:41] <yangman>
sorry, yeah, there's a step where RP and OP establishes a shared secret
- [01:38:50] <brandondb>
ok, right, that's what i thought
- [01:38:51] <flaccid>
its not just the assoc
- [01:39:10] <brandondb>
so that shared secret is in the openid.sig param somehow?
- [01:39:41] <brandondb>
base64(HMAC(secret(assoc_handle), token_contents)
- [01:39:45] <brandondb>
is what I see in the spec
- [01:40:33] <brandondb>
although i'm not entirely sure what "secret(assoc_handle)" means... is that some function of the assoc handle and the secret or is that more like secrets[OP]
- [01:40:44] <yangman>
gtg. will be back in a few hours if you still need help
- [01:41:00] <brandondb>
thanks!
- [02:03:50] * jdk2588_ is now known as jdk2588
- [02:05:19] * jdk2588 (~jdk2588@117.199.113.33) Quit (Remote host closed the connection)
- [02:07:48] * jdk2588_ (~jdk2588@117.199.113.33) has joined #openid
- [02:11:50] * jdk2588_ is now known as jdk2588
- [02:12:04] * jdk2588 (~jdk2588@117.199.113.33) Quit (Changing host)
- [02:12:04] * jdk2588 (~jdk2588@unaffiliated/jdk2588) has joined #openid
- [02:15:52] * karstensrage (~karstensr@c-71-202-243-186.hsd1.ca.comcast.net) has joined #openid
- [02:55:04] <brandondb>
ok so I finally figured it out!
- [02:55:32] <brandondb>
there is no shared secret in stateless mode
- [02:55:59] <brandondb>
After the client redirects to you, you can do an additional query to the open id endpoint, but change openid.mode=check_authentication
- [02:56:20] <brandondb>
check_authentication will let the provider verify the nonce and signature for you!
- [02:57:15] <brandondb>
It's actually covered in http://wiki.openid.net/Introduction but I read that 2 days ago and simply couldn't wrap my head around it until now
- [02:57:25] <brandondb>
thanks flaccid and yangman for your help
- [02:57:58] <brandondb>
but whew, I really think that the openid ecosystem is a bit of a cluster fuck of unnecessary complexity =-O
- [02:58:01] <brandondb>
thanks again, cheers
- [02:59:49] <flaccid>
nps
- [03:00:04] <flaccid>
if you want something to be secure, chances are you will need crypto
- [03:00:13] <flaccid>
which is never simple
- [03:07:37] <brandondb>
well that's the thing: you *don't* need crypto in this case :-)
- [03:07:38] <brandondb>
I thought I did
- [03:08:47] <flaccid>
um thats what openid uses
- [03:41:34] * jdk2588 (~jdk2588@unaffiliated/jdk2588) Quit (Ping timeout: 240 seconds)
- [04:00:06] * brandondb (~brandondb@ool-44c22f6f.dyn.optonline.net) Quit (Quit: brandondb)
- [06:40:32] * MacTed (~Thud@c-24-61-62-241.hsd1.ma.comcast.net) has joined #openid
- [07:12:27] * tbbrown (~tbbrown@tx-71-52-73-250.dhcp.embarqhsd.net) has joined #openid
- [07:20:32] * xpo (~xpo@bearstech/xpo) Quit (Quit: xpo)
- [08:17:27] * xpo (~xpo@bearstech/xpo) has joined #openid
- [09:02:44] * xpo (~xpo@bearstech/xpo) Quit (Ping timeout: 264 seconds)
- [09:20:48] * xpo (~xpo@bearstech/xpo) has joined #openid
- [09:36:24] * xpo (~xpo@bearstech/xpo) Quit (Ping timeout: 240 seconds)
- [09:53:37] * kengyu (~kengyu@210.242.151.101) Quit (Ping timeout: 248 seconds)
- [11:05:17] * ponchopilate (~markthomp@host81-149-182-71.in-addr.btopenworld.com) has joined #openid
- [11:07:18] * ponchopilate (~markthomp@host81-149-182-71.in-addr.btopenworld.com) Quit (Client Quit)
- [11:14:12] * xpo (~xpo@bearstech/xpo) has joined #openid
- [14:01:52] * tbbrown (~tbbrown@tx-71-52-73-250.dhcp.embarqhsd.net) Quit (Ping timeout: 240 seconds)
- [14:28:02] * karstensrage (~karstensr@c-71-202-243-186.hsd1.ca.comcast.net) Quit (Quit: Leaving)
- [15:09:48] * jdk2588 (~jdk2588@117.199.120.148) has joined #openid
- [15:54:52] * daleolds (~daleolds@137.65.156.30) has joined #openid
- [16:31:12] * jdk2588 (~jdk2588@117.199.120.148) Quit (Ping timeout: 258 seconds)
- [16:53:56] * xpo (~xpo@bearstech/xpo) Quit (Quit: xpo)
- [17:39:00] * xpo (~xpo@bearstech/xpo) has joined #openid
- [17:49:11] * xpo (~xpo@bearstech/xpo) Quit (Quit: xpo)
- [18:00:32] * xpo (~xpo@bearstech/xpo) has joined #openid
- [18:12:13] * xpo (~xpo@bearstech/xpo) Quit (Quit: xpo)
- [18:13:17] * xpo (~xpo@bearstech/xpo) has joined #openid
- [20:53:16] * flaccid_ (~flaccid@ppp59-167-171-15.static.internode.on.net) has joined #openid
- [20:53:17] * flaccid_ (~flaccid@ppp59-167-171-15.static.internode.on.net) Quit (Changing host)
- [20:53:17] * flaccid_ (~flaccid@unaffiliated/flaccid) has joined #openid
- [20:53:30] * flaccid_ (~flaccid@unaffiliated/flaccid) Quit (Client Quit)
- [20:56:29] * flaccid (~flaccid@unaffiliated/flaccid) Quit (Ping timeout: 260 seconds)
- [23:12:53] * daleolds (~daleolds@137.65.156.30) has left #openid
- [23:15:01] * daleolds (~daleolds@137.65.156.30) has joined #openid
- [23:37:28] * daleolds (~daleolds@137.65.156.30) Quit (Ping timeout: 258 seconds)
- [23:38:06] * daleolds (~daleolds@137.65.156.30) has joined #openid
- [23:38:16] * daleolds (~daleolds@137.65.156.30) has left #openid
- [23:49:56] * daleolds (~daleolds@137.65.156.30) has joined #openid
These logs were automatically created by OpenIDlogbot on
chat.freenode.net
using a modified version of the Java IRC LogBot.