SlideShare a Scribd company logo
1 of 25
Download to read offline
OAuth
An introduction to OAuth and Instagram
Me


Daniel Oskarsson, Lead Mobile Developer


LinkedIn, http://danieloskarsson.com/
Facebook, http://danieloskarsson.se/
Agenda

Purpose
Flow
Demo
State
Wikipedia
_"OAuth is an open standard for authorization. It
allows users to share their private resources (e.g.
photos, videos, contact lists) stored on one site
with another site without having to hand out their
credentials, typically supplying username and
password tokens instead. Each token grants access
to a specific site (e.g., a video editing site) for
specific resources (e.g., just videos from a
specific album) and for a defined duration (e.g.,
the next 2 hours). This allows a user to grant a
third party site access to their information stored
with another service provider, without sharing
their access permissions or the full extent of
their data."_

Source: Wikipedia
Authorization

_"The process of authorization is distinct from
that of authentication. Whereas authentication is
the process of verifying that "you are who you say
you are", authorization is the process of verifying
that "you are permitted to do what you are trying
to do". Authorization thus presupposes
authentication."_

Source: Wikipedia
Origin

OAuth started in November 2006
when Twitter looked into attaching
OpenID (decentralized
authentication) to their public
API. Discussions concluded _"that
there were no open standards for
API access delegation."_
Twitter
Facebook
Facebook OAuth Apps
Users
From a user standpoint OAuth provides a way of using
applications without giving away the personal username and
password to service providers. Facebook Apps are probably the
most recognized example of OAuth applications. The user:

    Starts the client application

    If not already done, authorizes the request

OAuth also allows for scoping by listing the privileges that
an application will get if the user authorizes the request.

    E.g. read your email, post as you...

It is up to the user to authorize the entire scope (all
privileges), or to not authorize the request.
Developers
From an app developer perspective, the flow is something like this:

    Create an account at the Service Provider

    Register your client application at the Service Provider

The Service Provider provides a client id and client secret:

    CLIENT ID: a8427e34273a4aeea67792e34d020771

    CLIENT SECRET: 9b3b93a9c08f400cb066c8848d0b4bad

When you want data from the Service Provider, you make a request to
the service using your client id:

    curl https://api.instagram.com/v1/media/popular?
    client_id=a8427e34273a4aeea67792e34d020771

The command above uses the media/popular endpoint and the provided
client_id to get JSON data about popular media.
Scoping
Which data that is accessible only by
authenticating with a client id is determined by
the Service Provider.

Instagram: _"For the most part, Instagram’s API
only requires the use of a client_id. A client_id
simply associates your server, script, or program
with a specific application. However, some requests
require authentication - specifically requests made
on behalf of a user."_

Making API calls on behalf of an Instagram user
requires an access token.
Access tokens
The only way for a client application to obtain an access
token is to have the user authorize the application with the
provided scope (granting privileges).

The process starts with a client application request to the an
authorization server, providing client id, secret and a
redirect url. The server appends the code and redirects to an
authorization dialog.

    If the user is not logged in, he or she will be asked to
    authenticate

    If the user has not authorized the application he or she
    will be asked to do so

The user is then redirected to the redirection url provided in
the first request.

Here two things can happen...
Server side or Implicit

Either the redirection url leads to a server controlled by the client
application developer that takes the provided code parameter and
exchanges it for an access token by posting the code to an access
token url. This is referred to as the server side flow.

 or

The access token is appended as a fragment in the redirection URL.
This method allows applications without any server component to
receive an access_token with ease. It is used by my demo application
and is being referred to as the implicit flow.

A user can at any time explicitly revoke an authorization and render
the obtained access token useless. Some Service Providers, such as
Facebook, also invalidate access tokens after a certain time.
Result
ACCESS TOKEN:
223611870.f59def8.c188753de3b843be
b3b1ac15a2356cad
curl “https://api.instagram.com/
v1/media/search?
lat=57.7018646&lng=11.9549555&acce
ss_token=223611870.f59def8.c188753
de3b843beb3b1ac15a2356cad”
Demo
Getting Instagram data based on GPS position
Demo

Clone source
Login to Instagram
Register a client
Copy client id and secret to app
Test
Test cases

Not logged into Instagram, Not
authorized client
Logged into Instagram, Authorized
client
Logged into Instagram, Not
authorized client
Versions
OAuth 2.0

_"OAuth 2.0 is the next evolution of the OAuth protocol and is not
backward compatible with OAuth 1.0. OAuth 2.0 focuses on client
developer simplicity while providing specific authorization flows for
web applications, desktop applications, mobile phones, and living
room devices. The specification is being developed[2] within the IETF
OAuth WG and was expected to be finalized by the end of 2010
according to Eran Hammer.[3] However, due to discording views about
the evolution of OAuth, Hammer left the working group[4]"_

_"Facebook's new Graph API only supports OAuth 2.0 and is the largest
implementation of the emerging standard.[5] As of 2011, both
Google[6] and Microsoft[7] had added OAuth 2.0 experimental support
to their APIs."_

Source: Wikipedia
Critique
_"When compared with OAuth 1.0, the 2.0 specification is more
complex, less interoperable, less useful, more incomplete, and most
importantly, less secure."_

Eran Hammer one of the leaders of the effort describes how he, and
OAuth, failed. [OAuth 2.0 and the Road to Hell]

_"At the core of the problem is the strong and unbridgeable conflict
between the web and the enterprise worlds. The OAuth working group at
the IETF started with strong web presence. But as the work dragged on
(and on) past its first year, those web folks left along with every
member of the original 1.0 community. The group that was left was
largely all enterprise… and me."_

Source: [OAuth 2.0 and the Road to Hell](http://hueniverse.com/
2012/07/oauth-2-0-and-the-road-to-hell/), July, 2012
Service Providers ...
Dropbox        Instagram

Facebook       Microsoft

Flickr         LinkedIn

Foursquare     Netflix

Github         Tumblr

Google         Twitter
Source


https://github.com/
danieloskarsson/

More Related Content

What's hot

Claims-Based Identity in SharePoint 2010
Claims-Based Identity in SharePoint 2010Claims-Based Identity in SharePoint 2010
Claims-Based Identity in SharePoint 2010Danny Jessee
 
O auth2 with angular js
O auth2 with angular jsO auth2 with angular js
O auth2 with angular jsBixlabs
 
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the CloudSharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the CloudDanny Jessee
 
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Aaron Parecki
 
Optimizing your job apply pages with the LinkedIn profile API
Optimizing your job apply pages with the LinkedIn profile APIOptimizing your job apply pages with the LinkedIn profile API
Optimizing your job apply pages with the LinkedIn profile APIIvo Brett
 
Google+ sign in for mobile & web apps
Google+ sign in for mobile & web appsGoogle+ sign in for mobile & web apps
Google+ sign in for mobile & web appsLakhdar Meftah
 
OAuth 2.0 - The fundamentals, the good , the bad, technical primer and commo...
OAuth 2.0  - The fundamentals, the good , the bad, technical primer and commo...OAuth 2.0  - The fundamentals, the good , the bad, technical primer and commo...
OAuth 2.0 - The fundamentals, the good , the bad, technical primer and commo...Good Dog Labs, Inc.
 
3rd-Party Authn/Authz
3rd-Party Authn/Authz3rd-Party Authn/Authz
3rd-Party Authn/Authzphilipsharp
 
08 asp.net session11
08 asp.net session1108 asp.net session11
08 asp.net session11Vivek chan
 
OAuth2 and Spring Security
OAuth2 and Spring SecurityOAuth2 and Spring Security
OAuth2 and Spring SecurityOrest Ivasiv
 
OAuth2 Introduction
OAuth2 IntroductionOAuth2 Introduction
OAuth2 IntroductionArpit Suthar
 
Creating a Sign On with Open id connect
Creating a Sign On with Open id connectCreating a Sign On with Open id connect
Creating a Sign On with Open id connectDerek Binkley
 

What's hot (19)

Claims-Based Identity in SharePoint 2010
Claims-Based Identity in SharePoint 2010Claims-Based Identity in SharePoint 2010
Claims-Based Identity in SharePoint 2010
 
O auth2 with angular js
O auth2 with angular jsO auth2 with angular js
O auth2 with angular js
 
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the CloudSharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
 
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
 
Optimizing your job apply pages with the LinkedIn profile API
Optimizing your job apply pages with the LinkedIn profile APIOptimizing your job apply pages with the LinkedIn profile API
Optimizing your job apply pages with the LinkedIn profile API
 
Google+ sign in for mobile & web apps
Google+ sign in for mobile & web appsGoogle+ sign in for mobile & web apps
Google+ sign in for mobile & web apps
 
OAuth 2.0 - The fundamentals, the good , the bad, technical primer and commo...
OAuth 2.0  - The fundamentals, the good , the bad, technical primer and commo...OAuth 2.0  - The fundamentals, the good , the bad, technical primer and commo...
OAuth 2.0 - The fundamentals, the good , the bad, technical primer and commo...
 
Maintest
MaintestMaintest
Maintest
 
OAuth 2
OAuth 2OAuth 2
OAuth 2
 
Maintest3
Maintest3Maintest3
Maintest3
 
Maintest2
Maintest2Maintest2
Maintest2
 
3rd-Party Authn/Authz
3rd-Party Authn/Authz3rd-Party Authn/Authz
3rd-Party Authn/Authz
 
MainFinalOAuth
MainFinalOAuthMainFinalOAuth
MainFinalOAuth
 
08 asp.net session11
08 asp.net session1108 asp.net session11
08 asp.net session11
 
OAuth2 and Spring Security
OAuth2 and Spring SecurityOAuth2 and Spring Security
OAuth2 and Spring Security
 
Microservice with OAuth2
Microservice with OAuth2Microservice with OAuth2
Microservice with OAuth2
 
OAuth2 Introduction
OAuth2 IntroductionOAuth2 Introduction
OAuth2 Introduction
 
OAuth
OAuthOAuth
OAuth
 
Creating a Sign On with Open id connect
Creating a Sign On with Open id connectCreating a Sign On with Open id connect
Creating a Sign On with Open id connect
 

Similar to OAuth Intro - Auth Without Sharing Credentials

Devteach 2017 OAuth and Open id connect demystified
Devteach 2017 OAuth and Open id connect demystifiedDevteach 2017 OAuth and Open id connect demystified
Devteach 2017 OAuth and Open id connect demystifiedTaswar Bhatti
 
Flaws in Oauth 2.0 Can Oauth be used as a Security Server
Flaws in Oauth 2.0 Can Oauth be used as a Security ServerFlaws in Oauth 2.0 Can Oauth be used as a Security Server
Flaws in Oauth 2.0 Can Oauth be used as a Security Serverijtsrd
 
Oauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 supportOauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 supportGaurav Sharma
 
Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)
Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)
Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)gemziebeth
 
OAuth with Salesforce - Demystified
OAuth with Salesforce - DemystifiedOAuth with Salesforce - Demystified
OAuth with Salesforce - DemystifiedCalvin Noronha
 
Implementing open authentication_in_your_app
Implementing open authentication_in_your_appImplementing open authentication_in_your_app
Implementing open authentication_in_your_appNuhil Mehdy
 
Stateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWTStateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWTMobiliya
 
OAuth - Don’t Throw the Baby Out with the Bathwater
OAuth - Don’t Throw the Baby Out with the Bathwater OAuth - Don’t Throw the Baby Out with the Bathwater
OAuth - Don’t Throw the Baby Out with the Bathwater Apigee | Google Cloud
 
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Microservice security with spring security 5.1,Oauth 2.0 and open id connect Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Microservice security with spring security 5.1,Oauth 2.0 and open id connect Nilanjan Roy
 
Stateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWTStateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWTGaurav Roy
 
OAuth2 - Introduction
OAuth2 - IntroductionOAuth2 - Introduction
OAuth2 - IntroductionKnoldus Inc.
 
SAML VS OAuth 2.0 VS OpenID Connect
SAML VS OAuth 2.0 VS OpenID ConnectSAML VS OAuth 2.0 VS OpenID Connect
SAML VS OAuth 2.0 VS OpenID ConnectUbisecure
 
Managing enterprise applications, permissions, and consent in Azure Active Di...
Managing enterprise applications, permissions, and consent in Azure Active Di...Managing enterprise applications, permissions, and consent in Azure Active Di...
Managing enterprise applications, permissions, and consent in Azure Active Di...CoLaboraDK
 
Managing enterprise applications, permissions, and consent in Azure Active Di...
Managing enterprise applications, permissions, and consent in Azure Active Di...Managing enterprise applications, permissions, and consent in Azure Active Di...
Managing enterprise applications, permissions, and consent in Azure Active Di...Peter Selch Dahl
 

Similar to OAuth Intro - Auth Without Sharing Credentials (20)

OAuth2 Presentaion
OAuth2 PresentaionOAuth2 Presentaion
OAuth2 Presentaion
 
Devteach 2017 OAuth and Open id connect demystified
Devteach 2017 OAuth and Open id connect demystifiedDevteach 2017 OAuth and Open id connect demystified
Devteach 2017 OAuth and Open id connect demystified
 
Flaws in Oauth 2.0 Can Oauth be used as a Security Server
Flaws in Oauth 2.0 Can Oauth be used as a Security ServerFlaws in Oauth 2.0 Can Oauth be used as a Security Server
Flaws in Oauth 2.0 Can Oauth be used as a Security Server
 
Oauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 supportOauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 support
 
Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)
Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)
Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)
 
OAuth with Salesforce - Demystified
OAuth with Salesforce - DemystifiedOAuth with Salesforce - Demystified
OAuth with Salesforce - Demystified
 
OAuth
OAuthOAuth
OAuth
 
Oauth2.0 tutorial
Oauth2.0 tutorialOauth2.0 tutorial
Oauth2.0 tutorial
 
Implementing open authentication_in_your_app
Implementing open authentication_in_your_appImplementing open authentication_in_your_app
Implementing open authentication_in_your_app
 
Stateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWTStateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWT
 
Oauth
OauthOauth
Oauth
 
OAuth - Don’t Throw the Baby Out with the Bathwater
OAuth - Don’t Throw the Baby Out with the Bathwater OAuth - Don’t Throw the Baby Out with the Bathwater
OAuth - Don’t Throw the Baby Out with the Bathwater
 
OAuth
OAuthOAuth
OAuth
 
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Microservice security with spring security 5.1,Oauth 2.0 and open id connect Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
 
Stateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWTStateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWT
 
OAuth2 - Introduction
OAuth2 - IntroductionOAuth2 - Introduction
OAuth2 - Introduction
 
Kt 15 07-2013
Kt 15 07-2013Kt 15 07-2013
Kt 15 07-2013
 
SAML VS OAuth 2.0 VS OpenID Connect
SAML VS OAuth 2.0 VS OpenID ConnectSAML VS OAuth 2.0 VS OpenID Connect
SAML VS OAuth 2.0 VS OpenID Connect
 
Managing enterprise applications, permissions, and consent in Azure Active Di...
Managing enterprise applications, permissions, and consent in Azure Active Di...Managing enterprise applications, permissions, and consent in Azure Active Di...
Managing enterprise applications, permissions, and consent in Azure Active Di...
 
Managing enterprise applications, permissions, and consent in Azure Active Di...
Managing enterprise applications, permissions, and consent in Azure Active Di...Managing enterprise applications, permissions, and consent in Azure Active Di...
Managing enterprise applications, permissions, and consent in Azure Active Di...
 

Recently uploaded

Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessWSO2
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...itnewsafrica
 

Recently uploaded (20)

Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
 

OAuth Intro - Auth Without Sharing Credentials

  • 1. OAuth An introduction to OAuth and Instagram
  • 2. Me Daniel Oskarsson, Lead Mobile Developer LinkedIn, http://danieloskarsson.com/ Facebook, http://danieloskarsson.se/
  • 4. Wikipedia _"OAuth is an open standard for authorization. It allows users to share their private resources (e.g. photos, videos, contact lists) stored on one site with another site without having to hand out their credentials, typically supplying username and password tokens instead. Each token grants access to a specific site (e.g., a video editing site) for specific resources (e.g., just videos from a specific album) and for a defined duration (e.g., the next 2 hours). This allows a user to grant a third party site access to their information stored with another service provider, without sharing their access permissions or the full extent of their data."_ Source: Wikipedia
  • 5. Authorization _"The process of authorization is distinct from that of authentication. Whereas authentication is the process of verifying that "you are who you say you are", authorization is the process of verifying that "you are permitted to do what you are trying to do". Authorization thus presupposes authentication."_ Source: Wikipedia
  • 6. Origin OAuth started in November 2006 when Twitter looked into attaching OpenID (decentralized authentication) to their public API. Discussions concluded _"that there were no open standards for API access delegation."_
  • 10. Users From a user standpoint OAuth provides a way of using applications without giving away the personal username and password to service providers. Facebook Apps are probably the most recognized example of OAuth applications. The user: Starts the client application If not already done, authorizes the request OAuth also allows for scoping by listing the privileges that an application will get if the user authorizes the request. E.g. read your email, post as you... It is up to the user to authorize the entire scope (all privileges), or to not authorize the request.
  • 11. Developers From an app developer perspective, the flow is something like this: Create an account at the Service Provider Register your client application at the Service Provider The Service Provider provides a client id and client secret: CLIENT ID: a8427e34273a4aeea67792e34d020771 CLIENT SECRET: 9b3b93a9c08f400cb066c8848d0b4bad When you want data from the Service Provider, you make a request to the service using your client id: curl https://api.instagram.com/v1/media/popular? client_id=a8427e34273a4aeea67792e34d020771 The command above uses the media/popular endpoint and the provided client_id to get JSON data about popular media.
  • 12. Scoping Which data that is accessible only by authenticating with a client id is determined by the Service Provider. Instagram: _"For the most part, Instagram’s API only requires the use of a client_id. A client_id simply associates your server, script, or program with a specific application. However, some requests require authentication - specifically requests made on behalf of a user."_ Making API calls on behalf of an Instagram user requires an access token.
  • 13. Access tokens The only way for a client application to obtain an access token is to have the user authorize the application with the provided scope (granting privileges). The process starts with a client application request to the an authorization server, providing client id, secret and a redirect url. The server appends the code and redirects to an authorization dialog. If the user is not logged in, he or she will be asked to authenticate If the user has not authorized the application he or she will be asked to do so The user is then redirected to the redirection url provided in the first request. Here two things can happen...
  • 14. Server side or Implicit Either the redirection url leads to a server controlled by the client application developer that takes the provided code parameter and exchanges it for an access token by posting the code to an access token url. This is referred to as the server side flow. or The access token is appended as a fragment in the redirection URL. This method allows applications without any server component to receive an access_token with ease. It is used by my demo application and is being referred to as the implicit flow. A user can at any time explicitly revoke an authorization and render the obtained access token useless. Some Service Providers, such as Facebook, also invalidate access tokens after a certain time.
  • 16. Demo Getting Instagram data based on GPS position
  • 17.
  • 18.
  • 19. Demo Clone source Login to Instagram Register a client Copy client id and secret to app Test
  • 20. Test cases Not logged into Instagram, Not authorized client Logged into Instagram, Authorized client Logged into Instagram, Not authorized client
  • 22. OAuth 2.0 _"OAuth 2.0 is the next evolution of the OAuth protocol and is not backward compatible with OAuth 1.0. OAuth 2.0 focuses on client developer simplicity while providing specific authorization flows for web applications, desktop applications, mobile phones, and living room devices. The specification is being developed[2] within the IETF OAuth WG and was expected to be finalized by the end of 2010 according to Eran Hammer.[3] However, due to discording views about the evolution of OAuth, Hammer left the working group[4]"_ _"Facebook's new Graph API only supports OAuth 2.0 and is the largest implementation of the emerging standard.[5] As of 2011, both Google[6] and Microsoft[7] had added OAuth 2.0 experimental support to their APIs."_ Source: Wikipedia
  • 23. Critique _"When compared with OAuth 1.0, the 2.0 specification is more complex, less interoperable, less useful, more incomplete, and most importantly, less secure."_ Eran Hammer one of the leaders of the effort describes how he, and OAuth, failed. [OAuth 2.0 and the Road to Hell] _"At the core of the problem is the strong and unbridgeable conflict between the web and the enterprise worlds. The OAuth working group at the IETF started with strong web presence. But as the work dragged on (and on) past its first year, those web folks left along with every member of the original 1.0 community. The group that was left was largely all enterprise… and me."_ Source: [OAuth 2.0 and the Road to Hell](http://hueniverse.com/ 2012/07/oauth-2-0-and-the-road-to-hell/), July, 2012
  • 24. Service Providers ... Dropbox Instagram Facebook Microsoft Flickr LinkedIn Foursquare Netflix Github Tumblr Google Twitter

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n