SlideShare uma empresa Scribd logo
1 de 27
HOW TO AVOID LOSING
     YOUR PANTS
    USING OAUTH
EVERYTHING YOU NEED TO KNOW TO KEEP YOUR USERS
   SAFE AND MAINTAIN YOUR SANITY WITH OAUTH


                      JESSE STAY
                 CEO, SOCIALTOO.COM
                HTTP://STAYNALIVE.COM
A LONG TIME AGO, IN A GALAXY FAR, FAR AWAY, THERE
     WAS A STORY OF A WISE OLD EMPEROR...

             OKAY, NOT THIS EMPEROR!
THE “UNTOLD” TRUTH
     DON’T BE STUPID!
DON’T GET CAUGHT WITH YOUR PANTS DOWN!
                                                        MORAL OF THE STORY
PHOTO VIA HTTP://WWW.FLICKR.COM/PHOTOS/WIRETHREAD/175023943/
WHAT IS OAUTH?
WHAT IS OAUTH?




OAUTH IS OPEN
WHAT IS OAUTH?




OAUTH IS OPEN

OAUTH IS SECURE
WHAT IS OAUTH?



OAUTH IS OPEN

OAUTH IS SECURE

OAUTH IS
AUTHORIZATION
WHAT IS OAUTH?



OAUTH IS OPEN

OAUTH IS SECURE

OAUTH IS
AUTHORIZATION

OAUTH IS A STANDARD
COMPONENTS OF OAUTH
       THE USER
COMPONENTS OF OAUTH
      THE CONSUMER
COMPONENTS OF OAUTH
    THE SERVICE PROVIDER
BASIC FLOW OF AN OAUTH APP




USER VISITS
APPLICATION, CLICKS
“AUTHORIZE” BUTTON
BASIC FLOW OF AN OAUTH APP



USER VISITS
CONSUMER, CLICKS
“AUTHORIZE” BUTTON

CONSUMER REDIRECTS
USER TO SERVICE
PROVIDER FOR AUTH
BASIC FLOW OF AN OAUTH APP

USER VISITS
CONSUMER, CLICKS
“AUTHORIZE” BUTTON

CONSUMER REDIRECTS
USER TO SERVICE
PROVIDER FOR AUTH

PROVIDER RETURNS
USER TO CONSUMER
W/ TOKEN TO ACT ON
BEHALF OF PROVIDER
FOR THAT USER
“BEHIND” THE SCENES

CONSUMER FORMATS
A REQUEST TO
PROVIDER TO GET A
REQUEST TOKEN,
APPENDS REQUEST
TOKEN TO THE
PROVIDER AUTH URL

CONSUMER THEN
REDIRECTS USER TO
PROVIDER AUTH URL
W/ THE REQUEST
TOKEN
“BEHIND” THE SCENES



USER AUTHENTICATES
WITH PROVIDER,
AUTHORIZES
CONSUMER TO MAKE
CALLS ON BEHALF OF
USER
“BEHIND” THE SCENES

PROVIDER REDIRECTS
USER BACK TO
CONSUMER’S CALLBACK
URL (SPECIFIED IN
ORIGINAL CONSUMER
TO PROVIDER REDIRECT
OR IN APP SETTINGS)

CONSUMER SENDS
ORIGINAL REQUEST
TOKEN, REQUESTING
ACCESS TOKEN FROM
PROVIDER
“BEHIND” THE SCENES

PROVIDER SENDS
CONSUMER ACCESS
TOKEN AND ACCESS
TOKEN SECRET, GIVING
CONSUMER
PERMISSION TO MAKE
API CALLS ON BEHALF
OF USER

CONSUMER MAKES API
CALLS FOR USER!
CONSUMER CALL AND REDIRECT TO PROVIDER:




      REAL WORLD EXAMPLE
     (THERE’S MORE THAN ONE WAY TO DO IT!)
CONSUMER CALLBACK ON REDIRECT FROM
            PROVIDER:




    REAL WORLD EXAMPLE
    (THERE’S MORE THAN ONE WAY TO DO IT!)
MAKE SOME API CALLS!




REAL WORLD EXAMPLE
(THERE’S MORE THAN ONE WAY TO DO IT!)
OAUTH ON THE IPHONE
OAUTH FOR DESKTOP

PROVIDER ASKS USER
FOR PIN

USER ENTERS PIN IN
CONSUMER DESKTOP
APP

CONSUMER SENDS PIN
WITH REQUEST FOR
ACCESS TOKEN
FLAWS OF OAUTH

MULTIPLE STEPS FOR
USER TO AUTHENTICATE

USER HAS TO LEAVE THE
CONSUMER SITE

NOT BUILT AS AN
AUTHENTICATION
PLATFORM - WHEN
PROVIDER IS DOWN, SO
IS OAUTH FOR THAT
PROVIDER
FACEBOOK CONNECT

AUTHENTICATION AND
AUTHORIZATION IN
ONE

USER NEVER LEAVES
SITE

MANY MORE
INTEGRATED TOOLS

CLOSED, PROPRIETARY
ANY QUESTIONS?
          HTTP://WIKI.OAUTH.NET
         HTTP://STAYNALIVE.COM
HTTP://APIWIKI.TWITTER.COM/AUTHENTICATION

Mais conteúdo relacionado

Semelhante a How to Avoid Losing Your Pants Using oAuth

Rosario Valotta. Abusing Browser User Interfaces for Fun and Profit.
Rosario Valotta. Abusing Browser User Interfaces for Fun and Profit.Rosario Valotta. Abusing Browser User Interfaces for Fun and Profit.
Rosario Valotta. Abusing Browser User Interfaces for Fun and Profit.
Positive Hack Days
 
(Pdf) yury chemerkin _null_con_2013
(Pdf) yury chemerkin _null_con_2013(Pdf) yury chemerkin _null_con_2013
(Pdf) yury chemerkin _null_con_2013
STO STRATEGY
 
(Pdf) yury chemerkin _icitst_2012
(Pdf) yury chemerkin _icitst_2012(Pdf) yury chemerkin _icitst_2012
(Pdf) yury chemerkin _icitst_2012
STO STRATEGY
 

Semelhante a How to Avoid Losing Your Pants Using oAuth (20)

Clone Scripts
Clone ScriptsClone Scripts
Clone Scripts
 
OAuth using PHP5
OAuth using PHP5OAuth using PHP5
OAuth using PHP5
 
Cannes Cyber Lions 2011 — Winners and Trends
Cannes Cyber Lions 2011 — Winners and TrendsCannes Cyber Lions 2011 — Winners and Trends
Cannes Cyber Lions 2011 — Winners and Trends
 
Api pain points
Api pain pointsApi pain points
Api pain points
 
Shopping Reinvented: Next Generation Apparel Retailing
Shopping Reinvented: Next Generation Apparel RetailingShopping Reinvented: Next Generation Apparel Retailing
Shopping Reinvented: Next Generation Apparel Retailing
 
I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)
 
apidays London 2023 - Building Multi-Factor Authentication into your applicat...
apidays London 2023 - Building Multi-Factor Authentication into your applicat...apidays London 2023 - Building Multi-Factor Authentication into your applicat...
apidays London 2023 - Building Multi-Factor Authentication into your applicat...
 
Rubbing the Sankara Stones the wrong way - From the Front 2014
Rubbing the Sankara Stones the wrong way - From the Front 2014Rubbing the Sankara Stones the wrong way - From the Front 2014
Rubbing the Sankara Stones the wrong way - From the Front 2014
 
The New Banking has to be S.U.P.E.R.
The New Banking has to be S.U.P.E.R.The New Banking has to be S.U.P.E.R.
The New Banking has to be S.U.P.E.R.
 
Rosario Valotta. Abusing Browser User Interfaces for Fun and Profit.
Rosario Valotta. Abusing Browser User Interfaces for Fun and Profit.Rosario Valotta. Abusing Browser User Interfaces for Fun and Profit.
Rosario Valotta. Abusing Browser User Interfaces for Fun and Profit.
 
(Pdf) yury chemerkin _null_con_2013
(Pdf) yury chemerkin _null_con_2013(Pdf) yury chemerkin _null_con_2013
(Pdf) yury chemerkin _null_con_2013
 
(Pdf) yury chemerkin _icitst_2012
(Pdf) yury chemerkin _icitst_2012(Pdf) yury chemerkin _icitst_2012
(Pdf) yury chemerkin _icitst_2012
 
Mobile Convention Brussels 2014 - InBeacon - Remco Bron
Mobile Convention Brussels 2014 - InBeacon - Remco BronMobile Convention Brussels 2014 - InBeacon - Remco Bron
Mobile Convention Brussels 2014 - InBeacon - Remco Bron
 
Shopping Reinvented: Next Generation Apparel Retailing
Shopping Reinvented: Next Generation Apparel RetailingShopping Reinvented: Next Generation Apparel Retailing
Shopping Reinvented: Next Generation Apparel Retailing
 
Secure your SPA with Auth0
Secure your SPA with Auth0Secure your SPA with Auth0
Secure your SPA with Auth0
 
Stateless authentication for microservices
Stateless authentication for microservicesStateless authentication for microservices
Stateless authentication for microservices
 
ISBG The 3 S's a guide to single sign on
ISBG  The 3 S's a guide to single sign onISBG  The 3 S's a guide to single sign on
ISBG The 3 S's a guide to single sign on
 
WTH is a JWT
WTH is a JWTWTH is a JWT
WTH is a JWT
 
Mike king - Digital body language 2.0
Mike king - Digital body language 2.0Mike king - Digital body language 2.0
Mike king - Digital body language 2.0
 
Token Authentication for Java Applications
Token Authentication for Java ApplicationsToken Authentication for Java Applications
Token Authentication for Java Applications
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

How to Avoid Losing Your Pants Using oAuth

  • 1. HOW TO AVOID LOSING YOUR PANTS USING OAUTH EVERYTHING YOU NEED TO KNOW TO KEEP YOUR USERS SAFE AND MAINTAIN YOUR SANITY WITH OAUTH JESSE STAY CEO, SOCIALTOO.COM HTTP://STAYNALIVE.COM
  • 2. A LONG TIME AGO, IN A GALAXY FAR, FAR AWAY, THERE WAS A STORY OF A WISE OLD EMPEROR... OKAY, NOT THIS EMPEROR!
  • 3. THE “UNTOLD” TRUTH DON’T BE STUPID!
  • 4. DON’T GET CAUGHT WITH YOUR PANTS DOWN! MORAL OF THE STORY PHOTO VIA HTTP://WWW.FLICKR.COM/PHOTOS/WIRETHREAD/175023943/
  • 7. WHAT IS OAUTH? OAUTH IS OPEN OAUTH IS SECURE
  • 8. WHAT IS OAUTH? OAUTH IS OPEN OAUTH IS SECURE OAUTH IS AUTHORIZATION
  • 9. WHAT IS OAUTH? OAUTH IS OPEN OAUTH IS SECURE OAUTH IS AUTHORIZATION OAUTH IS A STANDARD
  • 11. COMPONENTS OF OAUTH THE CONSUMER
  • 12. COMPONENTS OF OAUTH THE SERVICE PROVIDER
  • 13. BASIC FLOW OF AN OAUTH APP USER VISITS APPLICATION, CLICKS “AUTHORIZE” BUTTON
  • 14. BASIC FLOW OF AN OAUTH APP USER VISITS CONSUMER, CLICKS “AUTHORIZE” BUTTON CONSUMER REDIRECTS USER TO SERVICE PROVIDER FOR AUTH
  • 15. BASIC FLOW OF AN OAUTH APP USER VISITS CONSUMER, CLICKS “AUTHORIZE” BUTTON CONSUMER REDIRECTS USER TO SERVICE PROVIDER FOR AUTH PROVIDER RETURNS USER TO CONSUMER W/ TOKEN TO ACT ON BEHALF OF PROVIDER FOR THAT USER
  • 16. “BEHIND” THE SCENES CONSUMER FORMATS A REQUEST TO PROVIDER TO GET A REQUEST TOKEN, APPENDS REQUEST TOKEN TO THE PROVIDER AUTH URL CONSUMER THEN REDIRECTS USER TO PROVIDER AUTH URL W/ THE REQUEST TOKEN
  • 17. “BEHIND” THE SCENES USER AUTHENTICATES WITH PROVIDER, AUTHORIZES CONSUMER TO MAKE CALLS ON BEHALF OF USER
  • 18. “BEHIND” THE SCENES PROVIDER REDIRECTS USER BACK TO CONSUMER’S CALLBACK URL (SPECIFIED IN ORIGINAL CONSUMER TO PROVIDER REDIRECT OR IN APP SETTINGS) CONSUMER SENDS ORIGINAL REQUEST TOKEN, REQUESTING ACCESS TOKEN FROM PROVIDER
  • 19. “BEHIND” THE SCENES PROVIDER SENDS CONSUMER ACCESS TOKEN AND ACCESS TOKEN SECRET, GIVING CONSUMER PERMISSION TO MAKE API CALLS ON BEHALF OF USER CONSUMER MAKES API CALLS FOR USER!
  • 20. CONSUMER CALL AND REDIRECT TO PROVIDER: REAL WORLD EXAMPLE (THERE’S MORE THAN ONE WAY TO DO IT!)
  • 21. CONSUMER CALLBACK ON REDIRECT FROM PROVIDER: REAL WORLD EXAMPLE (THERE’S MORE THAN ONE WAY TO DO IT!)
  • 22. MAKE SOME API CALLS! REAL WORLD EXAMPLE (THERE’S MORE THAN ONE WAY TO DO IT!)
  • 23. OAUTH ON THE IPHONE
  • 24. OAUTH FOR DESKTOP PROVIDER ASKS USER FOR PIN USER ENTERS PIN IN CONSUMER DESKTOP APP CONSUMER SENDS PIN WITH REQUEST FOR ACCESS TOKEN
  • 25. FLAWS OF OAUTH MULTIPLE STEPS FOR USER TO AUTHENTICATE USER HAS TO LEAVE THE CONSUMER SITE NOT BUILT AS AN AUTHENTICATION PLATFORM - WHEN PROVIDER IS DOWN, SO IS OAUTH FOR THAT PROVIDER
  • 26. FACEBOOK CONNECT AUTHENTICATION AND AUTHORIZATION IN ONE USER NEVER LEAVES SITE MANY MORE INTEGRATED TOOLS CLOSED, PROPRIETARY
  • 27. ANY QUESTIONS? HTTP://WIKI.OAUTH.NET HTTP://STAYNALIVE.COM HTTP://APIWIKI.TWITTER.COM/AUTHENTICATION