yahoo! openid and oauth · 2010-05-03 · – no need for users to create a site‐specific userid...

89
Yahoo! OpenID and OAuth 1 Allen Tom Yahoo! Membership Architect OpenID Founda;on Board Member atom@yahoo‐inc.com

Upload: others

Post on 13-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

Yahoo!OpenIDandOAuth

1

AllenTomYahoo!MembershipArchitect

OpenIDFounda;onBoardMemberatom@yahoo‐inc.com

Page 2: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

AllenTomBio

•  UCBerkeleyBACS–1996•  Netscape1997‐1999

– LDAP,NetscapeDirectoryServer•  AOL1999‐2005

– Onlineshopping,browserassistants,webtoolbars,streamingmedia

•  Yahoo2005‐Present– MembershipArchitect

•  Accountlifecycle,Authen;ca;on,Security,Abuse2

Page 3: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

Yahoo!Membership

3

– Over350millionac;veusers(uniqueuserswhohavesignedintotheYahoowebsiteinthelastmonth)

– AccountLifecycle:•  Login•  Registra;on•  AccountRecovery•  CustomerCaretools

•  Suspension/Dele;on– Security,Abuse– SingleSignOn(OpenID,SAML)– Authoriza;on(OAuth)

Page 4: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

Yahoo!Login:350millionuniqueusersmonthly

4

Page 5: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

5

Yahoo!

Registra;on

Page 6: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

Yahoo!Login:Devicesandrichapps

6

Yahoo! Mail for iPhone Yahoo! Instant Messenger

Page 7: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

7

Page 8: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

TheOpenStack

•  OpenID–Authen;ca;on– “loggingin”toawebsite– Sharebasicprofileinforma;onusingA`ributeExchange•  Name,profilepicture,emailaddress

•  OAuth–Authoriza;on•  APIaccess•  Neededtocallwebservicesonbehalfoftheuser

8

Page 9: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

YahooMembershipandtheOpenWeb

•  OpenID:OpensYahoo’sMembershipplaformtoallwebsites– UserswhohaveaYahooAccountcanloginwithitatanywebsitethatacceptsOpenID

•  OAuth:Authoriza;onprotocol(accesscontrol)forYahooDataandAPIs–  Contacts(AddressBook)–  YahooMail–  Photos

9

Page 10: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

YahooOpenID+OAuth

10

•  YahoouserscansignintowebsitesusingtheirYahooIDviatheOpenIDProtocol

•  UserscanauthorizedataaccessviaOauth•  ShareyourYahooAddressBook•  Letthe3rdpartyupdateyourStatus•  Uploadphotos

Page 11: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OpenID:Authen;ca;on

•  OpenIDisfor“loggingin”toawebsite•  UseyourYahoo/Google/AOLaccounttologintoanywebsitethatacceptsOpenID

•  OpenIDletsusersproveownershipofauserid

11

Page 12: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OpenID:History

•  OpenIDoriginallyinventedtoallowbloggerstocommentoneachother’sblogs–  Toomuchfric;oninvolvedinregisteringanewusername/passwordforeveryblogyoucommenton

–  OpenID1.0finalizedin2005bygrassrootscommunity– OpenID2.0finalizedinDecember2007

•  OpenIDFounda;onisthecustodianofOpenIDintellectualproperty

•  OpenIDisanOpenStandard:freetoimplement•  h`p://openid.net

12

Page 13: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OpenID:Authen;ca;on

•  OpenID– SupportedbyYahoo,GoogleAccounts,GoogleApps,AOL,MySpace.Microsoj/MSNLiveID(inalpha)

– YahooOpenIDsupportlaunchedinJanuary2008– AllowsuserstologintowebsitesthatacceptOpenID

•  Decentralized– Nocentralauthority– AnyonecansetupanOpenIDProvider

13

Page 14: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

Authen;ca;on,con;nued…

•  [email protected]•  MyOpenIDiden;fierish`ps://me.yahoo.com/allentomdude

•  OpenIDletsmeprovethatIcontrolh`ps://me.yahoo.com/allentomdude

14

Page 15: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

YahooOpenIDExample

•  LogintostackoverflowusingyourYahooID

15

Page 16: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

16

Page 17: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

17

Page 18: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

18

Page 19: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

Alterna;ve“popup”UI

• 

19

Page 20: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

TheOpenStack

•  SingleSignOnusingOpenStandards–  Anyoneisfreetoimplementtheprotocol

•  Logintowebsitesusingexis;ngiden;;es–intendedtostreamlineoreveneliminatewebsitespecificregistra;on–  Noneedforuserstocreateasite‐specificuseridorpassword

•  SupportfromYahoo,Google,AOL,MySpace,PayPal–  FacebookandMicrosojareac;vecontributorstothecorespecifica;ons

20

Page 21: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

Terminology

•  OpenIDProvider(OP)– Thesitewhereyouhaveyouraccount(Yahoo)

•  RelyingParty(RP)–  thesitethatyou’relogginginto(Stackoverflow)

21

Page 22: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OpenIDUnderthecovers

22

1) User clicks on the Yahoo! Button

2) Stackoverflow redirects browser to Yahoo’s OpenID Endpoint

3) User authenticates at Yahoo and approves the authentication request

4) Yahoo redirects browser back to stackoverflow with an assertion containing the user’s identifier

5) Stackoverflow makes a direct server call back to Yahoo to verify the assertion

6) Stackoverflow sets browser session cookies. The user is now signed into stackoverflow stackoverflow Browser Yahoo

Page 23: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OpenIDAuthen;ca;on

•  UserselectstheirOpenIDProvider(Yahoo)–  TheuserclicksontheYahooBu`on–  Alterna;vely,theusercantype“yahoo.com”

•  RelyingPartyrequeststheOPtoauthen;catetheuser–  TheRPPerformsDiscoveryonh`p://yahoo.comtofindtheOpenIDEndpoint

–  TheRPredirectstheuser’sbrowsertotheOpenIDendpointwithanAuthen;ca;onRequest

•  TheOPrespondswithanasser;on–  TheOPredirectsthebrowserbacktotheRPwithanasser;on

–  TheRPverifiestheasser;onbymakingadirectrequestbacktotheOP

23

Page 24: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

Interes;ngOpenIDFeatures

•  OpenIDIden;fiersareURLs–  h`ps://me.yahoo.com/allentomdude–  h`p://allentom.com–  NostandardwaytotransformanemailaddresstoanOpenID

URL(thereareseveralproposals)•  OpenIDDiscovery

–  Fullyautoma;cdiscoveryofOpenIDendpointsandcapabili;es–  Nometadatafiles–  RPsandOPscaninteropwithoutanymanualsetupor

configura;on•  OpenIDA`ributeExchange

–  Shareusera`ributes(name,emailaddress,profilepicture,etc)

24

Page 25: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

UserBenefits

•  Faster&Easierregistra;onandlogin•  PortableProfile,interests,contacts•  Personaliza;on(evenonthefirstvisit)•  SocialFiltering•  Be`erSecurity

25

Page 26: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

WhyisYahoosuppor;ngOpenID?

•  Haveastrongerrela;onshipwithourusers–  UsersareYahoo’s#1asset

•  YahooIDsaremorevaluable–usedforloggingintoYahooandotherwebsites

•  MoreinsightsintouserbehavioronYahooandeverywhereelse–  Neededforadtarge;ngandcontentpersonaliza;on

•  OpenStandard:–  Noneedtoinventyetanotherauthprotocol–  Canleverageindustrybestprac;ces–  OpenSourcelibraries,documenta;on–  DeveloperscanimplementthesameinterfaceacrossallOpsYahoo/Google/AOLarealmostcompletelyinteroperable

26

Page 27: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

WhyshouldsitesacceptOpenID?

•  Newuseronboardingexperienceisgerngincreasinglydifficult–  Username/password–  Name/emailaddress–  ProfilePicture–  Loca;on–  Gender–  Friends–  CAPTCHA

•  Security,Abuse,AccountRecoverycanbeoutsourcedtotheOpenIDProvider

•  Newusersalreadyhaveareputa;on–  Abuse,exper;se,etc

•  ContentandAdscanbepersonalizedandrelevantevenonthefirstvisit

27

Page 28: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

A`ributeExchange

•  RPsmayop;onallyaskforuserdataviatheA`ributeExchangeExtension(supportedbyallmajorOpenIDProviders)– Name

– EmailAddress– ProfilePicture– Age– Gender– Loca;on

28

Page 29: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OpenIDDiscovery

•  Insteadofexchangingmetadatafiles,OpenIDdefinesadiscoverymechanismforRPsandOPstopublishmetadataaboutthemselves

29

Page 30: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OpenIDDiscoveryonYahoo

$curl–L–head\–H“Accept:applica;on/xrds+xml”\

h`p://yahoo.com

HTTP/1.1200OK

[….]

X‐XRDS‐Loca;on:h`p://open.login.yahooapis.com/openid20/www.yahoo.com/xrds

30

YahooOpenIDProvidermetadata• OpenIDendpointURL• Version• SupportedExtensions

Page 31: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

InteroperableProfileviaOpenID

•  SameinterfacecanbeusedwithYahoo,Google,AOL,andMicrosojLiveID–Nearly90%oftheinternetpopula;on–  Name–  Emailaddress–  ProfileURL–  ProfilePic–  Gender–  Zipcode

•  ThesamecodecanbeusedforallOpenIDProviders

31

Page 32: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OpenIDSecurity

•  Implementa;onscanbebuggy•  Nostandardtestsuite•  Issueswithoutsourcingauthen;ca;on•  Orphanedaccounts•  Phishing•  Privacy–correla;on•  NoSingleLogOut

32

Page 33: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

NoSingleLogOut

•  Authen;ca;onsessionsattheOPandRPsarenotsynchronized

•  Bydesign–loggingloggingoutofHuffingtonPostshouldnotlogtheuseroutofYahooMail

•  Difficulttosynchronizelogouteventsacrossmul;pleRPs

•  Verycontroversialtopic:MostOPsarestronglyagainstit

33

Page 34: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OpenID:OutsourcingAuthen;ca;on

•  SitesthatacceptOpenIDeffec;velyoutsourceauthen;ca;ontotheuser’sOpenIDProvider

•  TheOPcanbebuggyorinsecure•  EmployeesattheOPmaybeabletologinasanyoftheirusers

34

Page 35: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OneAccounttoRuleThemAll

•  LosingaccesstoyourOpenIDresultsinlosingaccesstoallsitesthatyouuse– Accountcompromised–thea`ackercangainaccesstoallyouraccounts

35

Page 36: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

AccountComprise

•  Mostwebsiteswillallowpasswordstoberesetviaemail

•  Thismeansthatifyouremailaddressishacked,thea`ackercangainaccesstoallthesitesyouusethatthatallowemailbasedaccountrecovery

•  SamethingashavingyourOpenIDcompromised

36

Page 37: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

AccountRecovery

•  ManywebsitesallowAccountRecoveryviaemail•  OutsourcedAccountRecoverytotheuser’sEmail

provider

37

Page 38: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

EmailBasedAccountRecovery

•  Almostallconsumerorientedwebsitesallowpasswordstoberesetviaemail–  Somesiteswillrequiretheusertoanswerasecretques;onbeforereserngthepasswordviaemail

–  Secretques;onsarenotsecretanddon’twork•  Reserngyourpasswordisthesamethingasloggingin

•  Therefore,fromasecurityperspec;ve,sitesthatallowemailbasedaccountrecoveryalreadyhaveoutsourcedtheirauthen;ca;ontotheuser’semailprovider

38

Page 39: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OpenIDChallenges

•  UIisconfusing– “signinginwithanaccountyoualreadyhave”isanewconcept

– Usersassumesomesortofbusinessrela;onshipbetweentheOPandRP

– TheOpenIDLoginCalltoAc;onisnotscalablepast2or3choices

39

Page 40: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

Morechallenges

•  WhatiftheuserlosesaccesstotheirOpenID?– Accountwashacked/phished– Theusergraduated,changedjobs,etc– Deac;vatedforTermsofServiceviola;ons– Usercan’tremember/recoverpassword

– Nosupportforclientapps•  Onlysupportsloggingintowebsites

– Doesn’tworkforloggingintoapps(desktop,mobile,etc)• We’reworkingonit! 40

Page 41: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

TooManyChoices

41

Page 42: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

TheOpenIDNASCARProblem

42

Page 43: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

Poten;alSolu;ons

•  2steplogin:–  Enteremailaddress–  Iftheuserhasapassword,displaythepasswordfield

– Otherwise,ifthedomainisOpenIDenabled,sendtheuserthroughtheOpenIDflow

•  [email protected]•  [email protected]

43

Page 44: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

UIIssues

•  Plentyofusabilitytes;nginprogressbehindthescenes

•  Manytopdesignersareworkingonthis

44

Page 45: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

Ques;ons?

•  OpenIDisanOpenProtocol– Fullytransparentdevelopmentprocess

– Followusonh`p://openid.net•  (checkwithyourIPlawyersfirst)•  AllcontributorsmusthavetheiremployerssignanIPcontribu;onagreement

•  InternetIden;tyWorkshop– May18‐20– MountainView,CA

– EveryoneworkingonOpenIDwillbethere45

Page 46: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OAuth

•  Authoriza;on(notAuthen;ca;on)•  The“AccessControl”layeroftheOpenWeb

•  Some;mescalledtheValetKeysoftheweb

•  OAuthisneededtoauthorizeAPIaccess– OpenIDdoesnotpassanycreden;alstotheRP

46

Page 47: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OAuth–ValetKeysfortheWeb

•  OAuthallowsuserstograntcreden;alstotheiraccount,withoutgivinguptheirpassword

•  LargerServiceProvidersusuallyissuescopedcreden;als

•  Creden;alscanusuallyberevoked

47

Page 48: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

ThePasswordAn;‐Pa`ern

•  Manysitesaskforyourpasswordsothattheycanaccessthedatathatyouhaveonothersites

48

Page 49: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

Sharingpasswordsisabadidea….

•  Passwordsarenotscoped–  Insteadofauthorizingdatasharingforaspecificresource,

you’regivingupaccesstoyouren;reaccount

•  Mostusersdon’tusedifferentpasswordsfordifferentsites

•  Nowaytorevokeaccesswithoutchangingyourpassword•  Evenifthesiteishonest,mistakeshappen

–  Extensivelogging–passwordsgetsavedtologfiles–  Securitycompromises

49

Page 50: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

WhyOAuth?

•  PriortoOauth,mostserviceprovidersdefinedproprietarydelegatedauthprotocols

•  OAuthcombinedthebestprac;cesofYahooBBAuth,GoogleAuthSub,FlickrAuth,WindowsLiveDelegatedAuth– Allofthemdidthesamething,slightlydifferently

50

Page 51: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

The3LegsofOAuth

Jane

Page 52: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

protected_resources

Page 53: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

oauth_flow_begins

Page 54: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

oauth_request_token

Page 55: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

user_authen;ca;on

Page 56: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

user_authoriza;on

Page 57: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

consumer_callback

Page 58: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

oauth_access_token

Page 59: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

get_protected_resources

Page 60: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

oauth_success

Page 61: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OAuthTerminology

•  Consumer–Theapplica;on(client)•  ServiceProvider–Thesitethattheconsumeris

tryingtoaccess•  ProtectedResource–Theservicethattheconsumer

isaccessing(typicallyaWebServiceAPI)•  3LeggedOauth

–  User–  Consumer–  ServiceProvider

•  2LeggedOauth–  Consumer–  ServiceProvider

61

Page 62: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OAuthTerminology

•  ConsumerKey–Clientiden;fier,equivalenttoAppIDorAPIKeyinotherprotocols

•  ConsumerSecret–sharedsecretusedtoauthen;catetheConsumer

•  AccessToken–Creden;alusedbytheConsumertoaccessProtectedResources

•  OAuthDance–Browsergymnas;cswherethebrowserbouncesbetweentheConsumertotheServiceProviderandbackfortheusertoapproveanAccessToken

•  OauthWRAP–Nextgenera;onOAuth62

Page 63: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OauthProvisioning

•  Applica;ondevelopersusuallymustgototheServiceProvidertoregisterforaConsumerKey– ProcessforobtainingaConsumerKeyisServiceProviderspecificandisnotdefinedintheOauthProtocol

– SPsusuallyrequiredeveloperstoregistertoagreetoTermsofService,aswellastosa;sfytheSP’slegal,business,andproductrequirements

63

Page 64: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

YahooOAuthConsumerKeyRegistra;on

64

Page 65: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

YahooConsumerKeyRegistra;on

•  Applica;onname,descrip;on,logos•  Developername,contactinforma;on(email,phonenumber,website)

•  TermsofServiceagreement

65

Page 66: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

66

Page 67: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

67

Page 68: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OAuthProtocol–RequestPermission

Facebook

browser

1) Consumer gets a Request Token

Page 69: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OAuthProtocol–RequestPermission

Facebook

browser

1) Consumer gets a Request Token

2) Consumer redirects browser to Yahoo OAuth server with request token

Page 70: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OAuthPermissionsPage

• 

Page 71: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

UserAgrees

Facebook

browser 1) YOAuth redirects browser back to consumer to indicate successful authorization

Page 72: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

UserAgrees

•  TheAccessTokenisnotreturnedontheredirectbacktotheconsumer,insteadtheconsumermustmakeabackendserver‐to‐servercalltoretrievetheAccessToken

•  EnablesTokentobeexchangedoverHTTPS

Facebook

browser 1) YOAuth redirects browser back to consumer to indicate successful authorization

2) Consumer exchanges Request Token For Access Token/ATSecret

Page 73: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

YahooOAuthimplementa;on

Facebook

OAuth Service

1)  Exchange Request Token for Access Token and Access Token Secret

2) Request user’s Address Book

CK, AT, sig(CS, ATS)

Page 74: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OAuthDeploymentChallenges

•  Scalability•  TokenRevoca;on:DatabaselookuprequiredtodetermineifATiss;llvalid•  Verydifficulttoscaleforgloballydistributedwebapplica;ons•  Heterogeneousanddistributedproduc;onenvironment•  Securityissues

•  ConsumerSecrethastobewidelydistributedtoallserviceproviders•  AddressBookneedstheconsumersecrettoverifytherequest

•  Verydifficulttoproperlysafeguardtheconsumersecret•  AccessToken(Permanentcreden;al)directlyhandledbyServiceProviders

•  IssueswithsecuritycompromisesonServiceProviders

•  TheYahooOAuthServiceismuchmoresecurethantherestofYahoo•  Closelymonitoredandaudited•  AllowstherestofYahooquicklydeploynewservices

Consumer

OAuth Service

2) Request user’s Address Book

CK, AT, sig( CS, ATS)

Page 75: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

PreferredSolu;on

•  Yahoo’sproprietaryauthprotocolusesshort‐lived(1hour)bearertokenstoaccessprotectedresources

•  ServiceProviderscanverifythebearertokenlocallywithoutadatabaselookup•  BearertokensaresignedbytheAuthservice

•  Persistentcreden;als(consumersecrets,AccessTokens)arenotusedtoaccessanyservices

Consumer

OAuth Service

2) Request user’s Address Book

CK, AT, sig( CS, ATS)

Page 76: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

DeploymentIssueswithOAuthatYahoo

•  Oauthsignaturesarenearlyimpossibletogeneratewithoutalibrary

•  Librariesarebuggytoo•  #1problemisthatdeveloperscan’tgeneratesignatures

Consumer

2) Request user’s Address Book

CK, AT, sig( CS, ATS)

Page 77: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

Oauthsignatures

•  Aauthsignaturesareusedtoprotectagainstreplaya`acks•  WhynotjustuseHTTPS?•  Dataisflyingaroundintheclear•  Doesnotmatch“Cookie”authforBrowsers

•  Allprotectedresourcescanbeaccessedviatheuser’sbrowser•  Browsersarefarmoresuscep;bletoMITMthanwebapplica;ons

•  Oauthissodifficultthatmostdevelopersendupphishingtheuserfortheirpasswordinstead

Consumer

2) Request user’s Address Book

CK, AT, sig( CS, ATS)

Page 78: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OAuthWRAP

•  WRAP==WebResourceAuthoriza;onProtocol•  StartedatInternetIden;tyWorkshopinMay2009•  Contributors:

–  Yahoo–  Google–  Microsoj–  Facebook

•  Goals–  Makeiteasierfordeveloperstouse–  SplitOAuth’sServiceProviderinto2parts:

•  TokenIssuer–Canbeacompletelyseparateen;ty•  ServiceProvider

–  Definedifferent“Profiles”fordifferentusecases•  WebApplica;onProfile•  RichclientappProfile(nobrowser)

78

Page 79: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

WRAPProfiles

•  WRAPdefinesseveralmechanismsforuserstoauthorizeanapplica;on

•  WebAppProfile–  Userwantstoauthorizeawebsite–  Userexperienceiden;caltoOauth

•  Username/PasswordProfile–  Userwantstoauthorizearichclientapplica;on–  Nobrowserisrequired

•  WRAPProfileonlydefinedifferentmechanismsforclientstoobtainanAccessToken

•  AllAccessTokensareusedthesamewayregardlesswhichProfilewasusedtoobtainthem

•  ServiceProvidersdonotneedtocarehowtheAccessTokenwasissued

79

Page 80: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OauthWRAP

•  ConsumersareissuedanAccessTokenwitha1hourlife;me,andaRefreshToken

•  ConsumersaccessProtectedResourcesusingtheAccessToken.NoSignaturesarerequired.•  PassedintheHTTPAuthoriza;on:header

•  IftheAccessTokenisexpired,theConsumercanrequestanewAccessTokenfromtheTokenIssuerusingtheRefreshToken

Consumer

WRAP Auth Server

2) Request user’s Address Book using AT

1) Consumer obtains Access Token 3) If AT was expired, Consumer refreshes it

Page 81: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OAuthWRAPExample

•  $curl–header\‘Authoriza;on:[WRAP]access_token=”accesstoken”‘\h`p://api.example.com/get_data

HTTP/1.1200OK

[…]

Data

81

Page 82: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

ExpiredAccessTokenExample

•  $curl–header‘Authoriza;on:[WRAP]access_token=”accesstoken”‘\h`p://api.example.com/get_data

HTTP/1.1401Unauthorized

•  $curl–dwrap_refresh_token=refreshtoken\h`ps://auth.example.com/refresh_token

HTTP/1.1200OKaccess_token=access_token2

•  $curl–header‘Authoriza;on:[WRAP]access_token=“accesstoken2”’h`p://api.example.com/get_data

HTTP/1.1OK

data82

Page 83: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OAuthExample

•  $curl–header\“Authoriza;on:[WRAP]AccessToken”\

h`p://api.example.com/get_data

HTTP/1.1200OK

[…]

Data

83

Page 84: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

WRAPAdvantages

•  ServiceProviderscanverifycreden;alswithoutaDBlookup

•  ConsumerSecretsandPersistentcreden;alsdonotneedtobedistributedtoServiceProviders

•  Developerscanjustcurltherequests•  Richclientappsdonotneedtouseabrowser•  ServiceProvidersandAuthServerscanbeseparateen;;es–Assumingtheycanagreeonthetokenformat–  SimpleWebToken(SWT)Spec

84

Page 85: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

DeployingWRAPatYahoo

•  WRAPProtectedResourcesonlyneedtoknowhowtovalidateaWRAPAccessToken•  AccessTokencontains

•  UserID•  Scopethatwasauthorized(eg:AddressBook)•  ConsumerKey•  Expira;on;me•  SignedbytheYahooAuthServer

•  Servicesdon’tneedtoworryaboutdeterminingiftheuserortheconsumerkeyisvalid

•  TheYahooAuthSerververifiesthatboththeuserandtheconsumerares;llvalidbeforeissuingtheAccessToken

•  Cons:itcantakeanhourtorevokeaccesstoanapportodeac;vateauser

Consumer

WRAP Access Token

Page 86: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

WhydoesYahoosupportOAuth?

•  OpenstandardsmakeiteasierfordeveloperstouseourAPIs– Reuseexperience,documenta;on,andexper;seacrossServiceProviders

•  Leverageindustrybestprac;ces

86

Page 87: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

OAuth/OAuthWRAPques;ons?

•  GoogleGroups– OAuth– OAuth‐wrap‐wg

•  InternetIden;tyWorkshop– SamegroupofpeoplewhoworkonOpenID– OpenID,Oauth,andOauth‐WRAPallresultedfromdiscussionsatIIW

87

Page 88: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

What’snext?

•  OpenID+OAutharethebuildingblocksofthenextgenera;onofinternetiden;ty–  Elimina;nglogin/registra;onfric;oncaneliminatetheAnonymousWeb

•  Usersmustberecognizedtoserveop;mizedcontentandads

•  Over60millionuniqueuserslogintowebsitesusingFacebookConnect

•  Proprietarysolu;onsareojenbe`er,butusersandthemarketdemandopenandinteroperablestandards

•  Nearly100%ofallinternetusershaveanaccountthatcanbeusedtosignintoothersites

•  Yahoo/Google/GoogleApps/AOL/Hotmail/Facebook/Twi`er

•  Sitespecificregistra;onwillbecomeathingofthepast

88

Page 89: Yahoo! OpenID and OAuth · 2010-05-03 · – No need for users to create a site‐specific userid or password ... • OAuth is needed to authorize API access – OpenID does not

89

AllenTomatom@yahoo‐inc.com

h`p://openid.neth`p://groups.google.com/

– OAuth– OAuth‐WRAP‐WG

h`p://www.interne;den;tyworkshop.com/