Epeus' epigone

Edifying exquisite equine entrapments

Monday, 5 May 2008

Mixing degrees of publicness in HTTP

At the Data Sharing Workshop the other day, we had a discussion about how to combine OAuth and Feeds, which I was reminded of by Tim Bray's discussion of Adriana and Alec's VRM proposal today.
The session was tersely summarized here, but let me recap the problem.

When you are browsing the web, you often encounter pages that show different things depending on who you are, such as blog, wikis, webmail or even banking sites. They do this by getting you to log in, and then using a client-side cookie to save you the bother of doing that every time. When you want to give a site access to another one's data (for example when letting Flickr check your Google Contacts for friends), you need to give it a URL to look things up at.

The easy case is public data - then the site can just fetch it, or use a service that caches public data from several places, like the Social Graph API. This is like a normal webpage, which is the same for everyone, returning a HTTP 200 response with the data.

The other common case is where the data is private. OAuth is a great way for you to delegate access to a web service for someone else, which is done by returning an HTTP 401 response with a WWW-Authenticate: OAuth header showing that authentication is needed. If the fetching site sends a valid Authorization header, it can have access to the data.

The tricky case is where there is useful data that can be returned to anyone with a 200, but additional information could be supplied to a caller with authentication (think of this like the social network case, where friends get to see your home phone number and address, but strangers just get your hometown). In this case, returning a 401 would be incorrect,as there is useful data there.

What struck me was that in this case, the server could return a 200, but include a WWW-Authenticate: OAuth header to indicate that more information is available if you authenticate correctly. This seems the minimal change that could support this duality, and much easier than requiring and signalling separate authenticated and unauthenticated endpoints through a HTML-level discovery model, or, worse, adding a new response to HTTP. What I'd like to know from people with deeper HTTP experience than me is whether this is viable, and is it likely to be benign for existing clients — will they choke on a 200 with a WWW-Authenticate header?

HTTP does have a 203 response meaning Non-Authoritative Data, but I suspect returning that is more likely to have side effects.

Posted by Kevin Marks at 15:26
Labels: feeds, http, OAuth, public, VRM

1 comments:

Niall Kennedy said...

Why not add OAuth in the Server header? It's preserved through proxies (through Via) and "contains information about the software used by the origin server to handle the request." It's a small hint at increased capabilities.

May 05, 2008 8:57 PM

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

This is my personal blog. Any views you read here are mine, and not my employers.

Subscribe to my Events

Atom Feed

 

Support the Open Rights Group
Technorati search

mediAgora
encourage copying, expect payment

Kevin Marks
My Shared Stuff

People's thoughts I read:

Daily

Rosie
San Jose Young People's Theatre
Dave Weinberger
Doc Searls
Gonzo Engaged
AKMA
Tomalak's Realm
Cory & friends
Denise Howell
Dave Winer
Charles Wiltgen
Shelley Powers
Jonathon Delacour
Dorothea Salo
James Lileks
Megan McArdle
Tim Oren
Suw Charman
Halley Suitt

Weekly

Andrew Marks
Blogsisters
Arts & Letters Daily
Bricklin, Frankston & Reed
Marek
Steve Yost
Jeneane Sessum
Brian Micklethwait et al
Donna Wentworth - CopyFight
Chris Locke
Arnold Kling
Jonathan Peterson
Dana Blankenhorn
Tom Matrullo
Gary Turner
Marc Canter
St Luke's Chapel (Michael Penfield)

Sporadically

As the Apple Turns (back at last)
Small Pieces
Stuart Cheshire
RageBoy
Nonzero
Neil Gaiman
Thomas Vincent
Brad deLong
Andrew Odlyzko
Frank Paynter
ProSUA

No to Mickey Mouse Computers

powered by blogger

Blog Archive

  • ▼ 2009 (11)
    • ▼ June (2)
      • Celebrities - social objects or fake friends?
      • Farewell to Google
    • ► May (2)
      • Faces call the trust code in our brains
      • Press Release Use Causes "Serious" Brain Damage, M...
    • ► April (1)
      • WSJ dubbed internet parasite by WSJ editor
    • ► February (2)
      • A load of Thunderer
      • OpenSocial WeekendApps
    • ► January (4)
      • Mark Cuban's Big Lie
      • Notes on Charlene Li's Future of Social Networks S...
      • Hold your breath while Googling to save the planet...
      • MacWorld wishlist
  • ► 2008 (29)
    • ► December (2)
      • My twittered notes on the Leweb Social panel
      • Cycling to new layers of freedom
    • ► November (3)
      • OpenSocial’s birthday today
      • Missing the point of OpenID
      • Blogging's not dead, it's becoming like air
    • ► August (1)
      • Social Disease, or making magic?
    • ► July (3)
      • Open Source and Social Cloud Computing
      • Here Comes Everybody - Tummlers, Geishas, Animateu...
      • Shortening URLs, or getting inbetween?
    • ► June (3)
      • Google as a restaurant? Watch Gordon Ramsay
      • I'm with the stupid network
      • How not to be viral
    • ► May (5)
      • Miasma theory - wrong in the 1840s, wrong now
      • An API is a bespoke suit, a standard is a t-shirt
      • Talking about OpenSocial all over the place
      • Portable Apps, not data?
      • Mixing degrees of publicness in HTTP
    • ► April (2)
      • Digital publics, Conversations and Twitter
      • Comcast's Bialystock and Bloom Business Model?
    • ► February (3)
      • Be Organic, not Viral
      • The Social Cloud
      • LIFT Conference starts
    • ► January (7)
      • Sheet music redux
      • Fear of the new - the Internet, Tea, and MapReduc...
      • OpenSocial Hackathon next week in SF
      • Identity Theft is not a crime
      • memes, dreams and themes
      • URLs are people too
      • Tardy blogging
  • ► 2007 (45)
    • ► November (3)
      • Do not fold, bend, mutilate or Kindle
      • Open Rights Group - Happy ORG day
      • OpenSocial and Social Software history
    • ► October (4)
      • All bloggers are above average
      • AtomPub is an RFC
      • Bladerunner and Middlesbrough
      • Storytelling and performance
    • ► September (4)
      • iPod progress
      • Bubbles and Facebook
      • Journalists slumming online
    • ► August (10)
    • ► July (3)
    • ► June (8)
    • ► April (2)
    • ► March (6)
    • ► February (3)
    • ► January (2)
  • ► 2006 (119)
    • ► December (13)
    • ► November (8)
    • ► October (16)
    • ► September (10)
    • ► August (3)
    • ► July (6)
    • ► June (24)
    • ► May (3)
    • ► April (10)
    • ► March (7)
    • ► February (8)
    • ► January (11)
  • ► 2005 (101)
    • ► December (10)
    • ► November (13)
    • ► October (9)
    • ► September (8)
    • ► August (7)
    • ► July (7)
    • ► June (8)
    • ► May (12)
    • ► April (7)
    • ► March (6)
    • ► February (1)
    • ► January (13)
  • ► 2004 (53)
    • ► December (8)
    • ► November (5)
    • ► October (6)
    • ► September (7)
    • ► July (5)
    • ► June (3)
    • ► May (2)
    • ► March (3)
    • ► February (7)
    • ► January (7)
  • ► 2003 (196)
    • ► December (12)
    • ► November (14)
    • ► October (21)
    • ► September (23)
    • ► August (19)
    • ► July (11)
    • ► June (14)
    • ► May (9)
    • ► April (22)
    • ► March (20)
    • ► February (16)
    • ► January (15)
  • ► 2002 (225)
    • ► December (15)
    • ► November (21)
    • ► October (22)
    • ► September (12)
    • ► August (11)
    • ► July (28)
    • ► June (19)
    • ► May (29)
    • ► April (18)
    • ► March (19)
    • ► February (17)
    • ► January (14)
  • ► 2001 (13)
    • ► December (2)
    • ► November (11)

About Me

My Photo
Kevin Marks
Kevin Marks works at Google. From September 2003 to January 2007 he was Principal Engineer at Technorati responsible for the spiders that make sense of the web and track millions of blogs daily. He has been inventing and innovating for over 17 years in emerging technologies where people, media and computers meet. Before joining Technorati, Kevin spent 5 years in the Quicktime Engineering team at Apple, building video capture and live streaming into OS X. He was a founder of The Multimedia Corporation in the UK, where he served as Production Manager and Executive Producer, shipping million-selling products and winning International awards. He has a Masters degree in Physics from Cambridge University and is a BBC-qualified Video Engineer.One of the driving forces behind microformats.org he regularly speaks at Conferences and Symposia on emergent net technologies and their cultural impact.
View my complete profile