building and using web services with oauth

41
BUILDING AND USING SECURE WEB SERVICES WITH OAUTH Skillswap Goes Portable, November 25, 2008 Bruce Boughton [email protected] http://bruceboughton.me.uk http://lab.madgex.com/

Upload: bruceboughton

Post on 12-May-2015

3.637 views

Category:

Education


2 download

DESCRIPTION

My talk from Skillswap goes Portable, giving an introduction to OAuth

TRANSCRIPT

Page 1: Building and using web services with OAuth

BUILDING AND USING SECURE WEB SERVICES WITH OAUTH Skillswap Goes Portable, November 25, 2008

Bruce [email protected]://bruceboughton.me.uk

http://lab.madgex.com/

Page 2: Building and using web services with OAuth

web services are about data let’s think about data...

Page 3: Building and using web services with OAuth

DATA SHOULD BE PORTABLE(even your private data)

The Internet is awash with data(put there by our users)

Page 4: Building and using web services with OAuth

why?

Page 5: Building and using web services with OAuth

CONTROL YOUR DATADon't get locked into one vendor

Page 6: Building and using web services with OAuth

Mash|ups < data> MORE INTERESTING

http://pipes.yahoo.com/bruceboughton/skillswapmashup

Page 7: Building and using web services with OAuth

RE-PURPOSE YOUR DATAin different contexts

Page 8: Building and using web services with OAuth

INTERPRET ITACCESS IT

Data is portable if you can easily

Page 9: Building and using web services with OAuth

Data should be available inSTANDARD DATA FORMATS

<xml/>POSH

JSONμf

Page 10: Building and using web services with OAuth

How can users let third partiesACCESS THEIR PRIVATE DATA?

User data is moving to the cloud

Page 11: Building and using web services with OAuth
Page 12: Building and using web services with OAuth
Page 13: Building and using web services with OAuth

40-60% OF TWEETS VIA API*Blaine Cook co-authored OAuth

Why pick on Twitter?

Page 14: Building and using web services with OAuth
Page 15: Building and using web services with OAuth

http://kecute.wordpress.com/2007/11/05/cat-computer-geek/

Page 16: Building and using web services with OAuth

we need an easy,user-friendly standard

for third party api security

Page 17: Building and using web services with OAuth
Page 18: Building and using web services with OAuth

GOOGLE CONTACTS DEMOhttp://lab.madgex.com/oauth-net/googlecontacts/

Page 19: Building and using web services with OAuth

YOU CHOOSE who you share YOUR DATA with

OAuth puts the user back in control

Page 20: Building and using web services with OAuth

NO NEED to give outyour PASSWORD

OAuth is secure

Page 21: Building and using web services with OAuth

FIRE EAGLE LOCATION DEMOhttp://whereami.lab.madgex.com/

Page 22: Building and using web services with OAuth

Supports FINE-GRAINED privacy controls

Lightweight and open for extension

Page 23: Building and using web services with OAuth

Google YahooOpenSocial NetflixMySpace PownceMa.gnolia SmugMugGetSatisfaction and more...

Big name adoption

Page 24: Building and using web services with OAuth

one thing: OAuth != OpenID

(but they do play nicely)

Page 25: Building and using web services with OAuth

OpenID is authenticationOAUTH IS ACCESS CONTROL

Page 26: Building and using web services with OAuth

let’s get technical

Page 27: Building and using web services with OAuth

Protected resources

are exposed by service providersand used by consumer

applicationson behalf of users

Page 28: Building and using web services with OAuth

e.g. My physical location

is exposed by the Fire Eagle APIand used by the Madgex Lab demo

on my behalf

Page 29: Building and using web services with OAuth

Consumer identity asserted using CONSUMER KEY and SECRET

Page 30: Building and using web services with OAuth

Consumer gets an ACCESS TOKEN(tied to a user, usually re-usable)

To fetch a protected resource

Page 31: Building and using web services with OAuth

Consumer asks USER TO LOG IN and AUTHORIZE request

To get an access token

Page 32: Building and using web services with OAuth

Requests are SIGNED and include a TIMESTAMP and NONCE

Page 33: Building and using web services with OAuth

This is just PLAIN OLD HTTPwith added super powers

Page 34: Building and using web services with OAuth

don’t worry, there are plenty of

open source libraries

Page 35: Building and using web services with OAuth

Ruby .NETPython PHPJava JavaScriptObjective-C and more...

http://oauth.net/code

Page 36: Building and using web services with OAuth

do we have time for some code?

OAuth.net libraryhttp://lab.madgex.com/oauth-net

Page 37: Building and using web services with OAuth

Configuring the Fire Eagle service(without discovery)

Page 38: Building and using web services with OAuth

Requesting the user’s location

Page 39: Building and using web services with OAuth

Handling authorization(if we didn’t already have an access token)

Page 40: Building and using web services with OAuth

Using the protected resource

Page 41: Building and using web services with OAuth

QUESTIONS?OR BEER.

Bruce [email protected]://bruceboughton.me.uk

http://lab.madgex.com/