Brad Fitzpatrick ([info]bradfitz) wrote in [info]lj_dev,
@ 2005-05-16 16:14:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Distributed Identity: Yadis
Consider this my public announcement of Yadis (a temporary name). Yadis is a distributed identity system.

Here's a demo:

http://www.danga.com/yadis/demo/demo.html
(Note that while this demo is all AJAX-ified, that's not a requirement of the protocol.)

In a nutshell:
-- Your FOAF file points to your chosen identity server. (your LJ FOAF file already contains this, as of last night)

-- Your identity server is responsible for telling the rest of the world if you're you or not, and digitally signing a receipt saying that you said so, but only if you've told your identity server if you want to.

-- Clients on the web that want to verify your identity: ask for your blog or FOAF URL. ("bradfitz.livejournal.com") fetch your blog HTML, find your FOAF URL, fetch your FOAF, find your identity server, then ask the identity server if you're who you said you are. If you're not, or you're not logged in, or you haven't setup trust... in all 3 cases the identity server just tells the client "Sorry, I can't tell you. Throw there user to this URL." So client provides link, or redirects user. User sets up trust on identity server, goes back to site, logs in again.

-- Your global identifier throughout the web isn't "happygirl234324" or an email address, or "bradfitz@identityserver.com", but your FOAF URL. So you also choose how much info you do or do not want to share in there.

-- If you don't trust LiveJournal to be your identity server, run your own identity server, and point your FOAF at that. Or use somebody you trust more.

Future implications:
-- offsite LJ toys that know who you are, without asking for your password
-- adding a yadis user as a friend, and letting him/her read friends-only entries and leave comments to "friend-only-can-comment" entries
-- marking yadis users as can-comment-without-moderation
-- history of comments from FOAF users
-- comment on MovableType/blosxom/etc blogs, retaining your LJ identity, and vice-versa
-- DeadJournal users commenting on LiveJournal (with the little DeadJournal skull icon!)
-- .....
-- .....

Status:
Yadis is functional on LiveJournal now, and offsite tools can (and already have) started using it. But it's subject to change.

Much more sample code for Perl, PHP, Ruby, Python forthcoming. I'll also be releasing an identity server, if [info]mart, [info]supersat, or [info]revjim don't beat me to it. (please do! :-))

This is a call for discussion and place for questions, but first read at least the Yadis page and the specs page. Note that this has been in development for a whole 4 days, so be kind, and beware of changes. (though it has been on my wishlist for at least as many years)

Enjoy!


Page 1 of 2
<<[1] [2] >>

(Post a new comment)


[info]vampwillow
2005-05-16 11:20 pm UTC (link)
gets ready to play ...

(Reply to this) (Thread)


[info]missinight
2005-10-06 05:52 pm UTC (link)
oooou =)
If game will begin is there will be an impressing show.

(Reply to this) (Parent)


[info]isfacat
2005-05-16 11:26 pm UTC (link)
Bug to mention already:

After granting permission, it still requests permission.

But this is a demo, for the most part. It's just there to be fun right now :)

(Reply to this) (Thread)


[info]bradfitz
2005-05-16 11:44 pm UTC (link)
Uh, works for everybody I've seen. You logged in to LJ with the same account you told the demo app?

(Reply to this) (Parent)(Thread)(Expand)

(no subject) - [info]endquote, 2005-05-17 12:05 am UTC (Expand)
(no subject) - [info]nikolasco, 2005-05-17 12:11 am UTC (Expand)
(no subject) - [info]bradfitz, 2005-05-17 12:25 am UTC (Expand)

[info]crschmidt
2005-05-16 11:32 pm UTC (link)
Is there a reason you made the property point to a literal instead of a URI?

(Reply to this) (Thread)


[info]bradfitz
2005-05-16 11:46 pm UTC (link)
In the FOAF? I'm neither a FOAF nor RDF master. Recommend something better and I'm all ears. (You're Mr. Semantic Web / RDF, right?)

(Reply to this) (Parent)(Thread)(Expand)

(no subject) - [info]crschmidt, 2005-05-16 11:54 pm UTC (Expand)
(no subject) - [info]cpm, 2005-05-17 02:46 am UTC (Expand)
(no subject) - [info]crschmidt, 2005-05-17 03:00 am UTC (Expand)

[info]sidelobe
2005-05-16 11:43 pm UTC (link)
Why not submit an RFC to the IETF? This is worthy of that level of scrutiny and publication. This seems to be a handy way of handling low-level trust. That is, trust at a level that won't screw with my bank account or real-world identity. In theory, it may be expanded to any level of trust.

(Reply to this) (Thread)(Expand)


[info]bradfitz
2005-05-16 11:47 pm UTC (link)
I guess I took the more pragmatic approach of building something tangible first to use and play with. The spec route is a possibility, but I'm not considering it at the moment.

(Reply to this) (Parent)(Thread)(Expand)

(no subject) - [info]sidelobe, 2005-05-17 03:08 am UTC (Expand)
(no subject) - [info]nikolasco, 2005-05-17 06:59 am UTC (Expand)
(no subject) - [info]sidelobe, 2005-05-17 11:00 am UTC (Expand)
(no subject) - [info]nikolasco, 2005-05-17 12:06 am UTC (Expand)

[info]duskwuff
2005-05-16 11:52 pm UTC (link)
Demo doesn't work without Javascript enabled. You probably want method='post', not action='post'.

(Reply to this) (Thread)


[info]bradfitz
2005-05-17 12:10 am UTC (link)
This is an AJAX-only demo. I haven't made the "plain" version, but nothing in the protocol requires JavaScript.

(Reply to this) (Parent)


[info]illynova
2005-05-16 11:52 pm UTC (link)
I really, really like this idea. I think I'm going to implement a sample server in both perl or c#, and help with libraries.

Thanks for a fun summer project!

(Reply to this)


[info]crschmidt
2005-05-17 12:00 am UTC (link)
Now that I'm past the FOAF thing :)

I try:

http://www.livejournal.com/misc/yadis.bml?return_to=http://crschmidt.net/&foaf_url=http://www.livejournal.com/users/crschmidt/data/foaf

That redirects to

http://crschmidt.net/?_mode=id_res&user_setup_url=http://www.livejournal.com/misc/yadis-approve.bml%3Fsite%3Dhttp://crschmidt.net/

Which is good, I expected that.

I go there, I hit "Always", and go to

http://www.livejournal.com/misc/yadis.bml?return_to=http://crschmidt.net/&foaf_url=http://www.livejournal.com/users/crschmidt/data/foaf

again.

It redirects me back to crschmidt.net with the same args.

Is there a step I'm missing? Does it have to be from the server or something similar, rather than just from the browser?

(Reply to this) (Thread)


[info]bradfitz
2005-05-17 12:23 am UTC (link)
It's "is_foaf", not "foaf_url". But yes, that should work otherwise, and I just verified it does using the same steps you just did.

(Reply to this) (Parent)(Thread)(Expand)

(no subject) - [info]taral, 2005-05-17 12:39 am UTC (Expand)
(no subject) - [info]taral, 2005-05-17 12:42 am UTC (Expand)
(no subject) - [info]bradfitz, 2005-05-17 01:31 am UTC (Expand)
(no subject) - [info]bradfitz, 2005-05-17 01:30 am UTC (Expand)
(no subject) - [info]crschmidt, 2005-05-17 01:08 am UTC (Expand)

[info]valiskeogh
2005-05-17 12:02 am UTC (link)
so the more "layperson" reason this is neat is:
if you're logged into livejournal, you can be automatically logged into anywhere that uses this scheme?

(Reply to this) (Thread)


[info]bradfitz
2005-05-17 12:30 am UTC (link)
Yes. And thanks for mentioning "can be" before somebody got freaked out. :-)

(Reply to this) (Parent)(Thread)(Expand)

(no subject) - [info]valiskeogh, 2005-05-17 01:13 am UTC (Expand)

[info]nikolasco
2005-05-17 12:03 am UTC (link)
This seems to be almost identical to SEA and very similar to mIDm. Both use simple authentication servers. SEA uses FOAF, like Yadis. mIDm uses user agent header (ick). The major difference I see us the use of a redirect page, which isn't much. I'm also reminded of UMCP's common login system, inasmuch as the redirect API's are similar.

(Reply to this) (Thread)(Expand)


[info]bradfitz
2005-05-17 12:14 am UTC (link)
Thanks! (I wish I would've had those links a few days ago....)

I'll go do some reading to see if I can't merge with one of those. I found the redirect the only way to avoid man-in-the-middle attacks, though, so if neither of those do that, and don't combat the problem in a different way, they may not work.

(Reply to this) (Parent)(Thread)(Expand)

(no subject) - [info]nikolasco, 2005-05-17 12:27 am UTC (Expand)
(no subject) - [info]poisonkitty, 2005-05-17 01:28 pm UTC (Expand)

[info]wetzel
2005-05-17 12:05 am UTC (link)

the yadis demo page seems to be annoyed by URLS without www
it complained when I tried to use
http://livejournal.com/users/wetzel
but
http://www.livejournal.com/users/wetzel
worked without a problem.

just letting you know.

(Reply to this) (Thread)(Expand)


[info]nikolasco
2005-05-17 12:09 am UTC (link)
They're different servers, as far as DNS is concerned. When you visit livejournal.com, you get redirected to www.livejournal.com . This does raise the interesting question of whether or not one identity server should be able to hand you off to another. If so, things like purl could be used for greater consistency.

Just a detail.

(Reply to this) (Parent)(Thread)(Expand)

(no subject) - [info]wetzel, 2005-05-17 12:16 am UTC (Expand)
(no subject) - [info]grahams, 2005-05-17 12:43 am UTC (Expand)
(no subject) - [info]grahams, 2005-05-17 12:45 am UTC (Expand)
(no subject) - [info]ruakh, 2005-05-17 01:26 am UTC (Expand)
(no subject) - [info]bradfitz, 2005-05-17 12:16 am UTC (Expand)

[info]legolas
2005-05-17 12:24 am UTC (link)
I just tried to auth with someone else's LJ address. It doesn't work, but it isn't very clear about this either.
1 I'm logged in to lj as legolas
2 I entered http://www.livejournal.com/users/wetzel into the demo
3 It says "Note: You need to grant permission for this site to know who you are. Once you do so, press Login again."
4 I click, end up on a page and click 'just this time'
5 I go back to the demo, hit reload, entered http://www.livejournal.com/users/wetzel again
6 It still says "Note: You need to grant permission for this site to know who you are. Once you do so, press Login again."

I'm not entirely clear what I just agreed on by clicking the 'just this time' button? That the site gets the identity of the currently logged in user (legolas) or that of wetzel (that would be bad) or something else?

(it's late, so I'll leave it at this and check again tomorrow).

(Reply to this) (Thread)


[info]bradfitz
2005-05-17 12:28 am UTC (link)
Well, on bullet #3: the message can't be any more explicit. See this bit on the specs page:

(Conditional) user_setup_url = [url] If assert_foaf fails, the server provides this URL for where the user can do whatever's necessary to fulfill the assertion, be it login, setup permissions, etc. The server should return a URL which doesn't imply anything about what's needed, so the client is left in the dark about why the assertion failed.

Otherwise the client would know you are or are not the person you said, without getting the server's permission.

But what I /should/ do is pass along the FOAF url that the client already discovered, so LiveJournal at least can tell you, "Uh, you're not wetzel, you're legolas."

But you gave permission to legolas, not wetzel.

This is a LiveJournal bug, though, not a yadis protocol bug.

Thanks!

(Reply to this) (Parent)(Thread)(Expand)

(no subject) - [info]j4k0b, 2005-05-17 01:01 am UTC (Expand)
(no subject) - [info]bradfitz, 2005-05-17 01:33 am UTC (Expand)
(no subject) - [info]j4k0b, 2005-05-17 01:47 am UTC (Expand)
(no subject) - [info]nikolasco, 2005-05-17 02:45 am UTC (Expand)
(no subject) - [info]legolas, 2005-05-17 07:19 pm UTC (Expand)

[info]poisonkitty
2005-05-17 02:25 am UTC (link)
I haven't read the specs page yet, but based on the description, I just wanted to say a very big THANK YOU!

(Reply to this)


[info]mvc
2005-05-17 02:59 am UTC (link)
I'm not sure whether this is a serious security hole or just an unavoidable consequence of using http rather than https, but if someone can sniff the URL that you're redirected to, they can spoof your identity. Is there any way around this?

(Reply to this) (Thread)


[info]crschmidt
2005-05-17 02:41 pm UTC (link)
If someone can sniff the traffic that you're doing at that level, isn't it equally likely that they could read your cookies, in which case they could spoof your identity anyway?

(Reply to this) (Parent)(Thread)(Expand)

(no subject) - [info]mvc, 2005-05-17 05:00 pm UTC (Expand)
(no subject) - [info]technoshaman, 2005-05-19 08:34 pm UTC (Expand)

[info]crschmidt
2005-05-17 03:07 am UTC (link)
http://crschmidt.net/yadis/?source=1

This does the equivilant of what the JS interface does, only it's still specific to LiveJournal cause it just guesses at /data/foaf.

Does LJ plan to change its policy of not allowing people to scrape HTML pages? Otherwise, finding the FOAF urls doesn't seem like it would work right, if you're not allowed to scrape that page.

(I don't think it's heavily persecuted in any case, but I don't want to risk some kind of automatic block.)

You can try it by removing the ?source=1 arg.

(Reply to this) (Thread)


[info]crschmidt
2005-05-17 03:05 pm UTC (link)
And, an equivilant version, using minidom instead of Redland to find the identityServer:

http://crschmidt.net/yadis/minidom?source=1

(Reply to this) (Parent)


[info]kunzite1
2005-05-17 03:19 am UTC (link)
Then you finish your comment, submit it, and the someblog.com server validates your identity behind the scenes, doing some mild crypto stuff explained in specs. If someblog.com is playing by the rules, nobody else can fake your identity. Of course any site can lie, but what fun is a thousand people all saying they're Bill Gates, and message boards allowing it? So respectable sites (where you'd hang out) would play by the rules.

so... many people could look like [info]kunzite1 if they dont play by the rules?

This system doesn't sign comments. If a rogue site says it's yadis-enabled but actually isn't and claims to have posts from your identity (your FOAF URL), that doesn't mean anything. This system isn't designed to prevent that. The goal of this is for sites that do care about preventing spoofed comments/identities to be able to do so, if they play along.

how will we know that it is in fact "real" yadis?

(Reply to this) (Thread)


[info]duskwuff
2005-05-17 03:33 am UTC (link)
so... many people could look like [info]kunzite1 if they dont play by the rules?

If the sites they're posting on don't use Yadis, then yes - anyone can still call themselves [info]kunzite1 or [info]georgebush or whoever they want. Nothing new there - if a web system doesn't implement any sort of identification check, then anyone can use whatever name they want.

how will we know that it is in fact "real" yadis?

Ask. As you quoted, "if a rogue site says it's yadis-enabled but actually isn't and claims to have posts from your identity (your FOAF URL), that doesn't mean anything."

(Reply to this) (Parent)(Thread)(Expand)

(no subject) - [info]kunzite1, 2005-05-17 03:37 am UTC (Expand)
(no subject) - [info]duskwuff, 2005-05-17 04:14 am UTC (Expand)
(no subject) - [info]nikolasco, 2005-05-17 07:09 am UTC (Expand)
(no subject) - [info]kunzite1, 2005-05-17 07:12 am UTC (Expand)
(no subject) - [info]kunzite1, 2005-05-17 08:02 pm UTC (Expand)

[info]duskwuff
2005-05-17 03:30 am UTC (link)
The AJAX demo is broken in Safari 2.0 (webcore 412) under Mac OS X 10.4.0 and 10.4.1 - even if you've already approved the access, you still get told you need to approve. Works just fine in Firefox, though.

(Reply to this) (Thread)

You need to change your cookie settings...
[info]bennolan
2005-05-17 06:46 am UTC (link)
to allow third party sites to read cookies.

(Reply to this) (Parent)(Thread)(Expand)

Re: You need to change your cookie settings... - [info]brad, 2005-05-17 06:58 am UTC (Expand)

[info]brentdax
2005-05-17 08:36 am UTC (link)
I'm not sure I understand the scope of Yadis. Specifically, I can see the identification component, but not the authentication component (if there is one). If Alice allows (say) Wikipedia to use her LiveJournal identity, is there anything to stop Eve from plugging in Alice's address?

(Reply to this) (Thread)(Expand)


[info]brentdax
2005-05-17 08:51 am UTC (link)
Oh, and as long as I have your ear (yeah right), OpenID is an obvious naming choice. There's a SourceForge project with that name, but they've never released anything, and they're letting their domain names expire. (They even linked to Yadis from openid.net.) Dot-com and dot-org are owned, but dot-net is (imho) the right TLD for this anyway. 38k Google hits, mostly programming examples involving an openid function.

(Reply to this) (Parent)

(no subject) - [info]crschmidt, 2005-05-17 02:40 pm UTC (Expand)
Can I enable 'all'?
[info]andrewducker
2005-05-17 11:42 am UTC (link)
I can't, at the moment, think of a problem with allowing all requesters to verify that I am who I say I am. Rather than having to whitelist every blog that I comment on (a barrier to me actually bothering to comment) - how about having the option to just allow all?

(Reply to this) (Thread)

Re: Can I enable 'all'?
[info]crschmidt
2005-05-17 11:50 am UTC (link)
In which case, anyone who knows your Livejournal name can comment on any blog. Unless I'm really missing some step, but it doesn't seem like there's any extra verification: You enter a site name: andrewducker.livejournal.com. Assuming you've "allow all"'ed, anyone can now pretend to be andrewducker.

(Reply to this) (Parent)(Thread)(Expand)

Re: Can I enable 'all'? - [info]mvc, 2005-05-17 01:47 pm UTC (Expand)
Re: Can I enable 'all'? - [info]crschmidt, 2005-05-17 02:39 pm UTC (Expand)
Re: Can I enable 'all'? - [info]andrewducker, 2005-05-17 07:29 pm UTC (Expand)
Not so - [info]andrewducker, 2005-05-17 07:27 pm UTC (Expand)

[info]theorb
2005-05-17 11:43 am UTC (link)
Read through the specs last night, looks very interesting. Just starting to look at the demo now. First thing I notice is a minor usability problem: "no" should be an option on the "grant identity validation" just like the two "yes" options -- a button. Also, there should be a clear statement of what ID you are validating, and an option to log in as somebody else. These are all minor issues; it looks very nice for an early beta.

There should probably be FOAFy ways to say "the cannonical URL for this person isn't the URL you fetched this from, but some other URL". There might already be such a thing, my RDF-fu isn't the hottest. That way, http://brad.livejournal.com/ can redirect to http://www.livejournal.com/user/brad, which is more perm, if a little harder to type.

I'm still wondering how well this will work for non-browser-based applications. I'll write a sepperate post once I figure that out.

(Reply to this) (Thread)


[info]crschmidt
2005-05-17 11:52 am UTC (link)
That depends on what you want to say. LiveJournal already says "The weblog for Brad is www.livejournal.com/users/brad/": But I'm not sure how that helps. What end would it serve, exactly? You want someone to fetch an RDF file, read it, then fetch another (different) RDF file instead?

(Reply to this) (Parent)


[info]crschmidt
2005-05-17 11:54 am UTC (link)
I'm not sure how I'm supposed to use LiveJournal's public key to decrypt the data: I can't find anything simple on decrypting DSA signatures in PHP, and when I try to tell GPG to import the public key LJ is spitting out, it claims there is no OpenPGP data in it. Tips?

(Reply to this)


[info]teemus
2005-05-17 12:45 pm UTC (link)
AWESOME!

(Reply to this)

minor issue with the demo
[info]node
2005-05-17 12:51 pm UTC (link)
It doesn't like urls with underscores escaped to hyphens — like anonymous-bozo.livejournal.com. It's okay with http://www.livejournal.com/users/anonymous_bozo.

(Reply to this)


[info]davesawyer
2005-05-17 03:16 pm UTC (link)
Sometimes I wish I knew what the hell everyone was talking about around this community. It's still interesting to read and feel like I'm on the cutting edge though. :)

(Reply to this)


[info]shepline
2005-05-17 07:48 pm UTC (link)
Interesting. Does www.flickr.com support Yadis yet, as it is the only off-site tool which I have trusted to "blog to my journal"?

(Reply to this) (Thread)


[info]kunzite1
2005-05-18 10:21 am UTC (link)
as far as i can tell, yadis was just born. and it's now called openid.

so... i'd venture to say "no."

tho, once the program is near perfected, or at least in a stable condition, i'd like to see it spread like a virus.

it'd be handy to be able to log into places like deadjournal and typepad and be able to leave comments on other blogs without having to create a deadjournal or typepad account.

it is 321am and i should be asleep.

(Reply to this) (Parent)

Foopad
[info]bennolan
2005-05-17 10:35 pm UTC (link)
I added this too foopad.com as a demo of what you can do. It'd be cool to be able to be able to grant access the livejournal metaweblog api via YADIS as well. :)

(Reply to this)


Page 1 of 2
<<[1] [2] >>

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…