SlideShare a Scribd company logo
OAuth2.0
An overview of OAuth2.0 on Force.com projects
June 11th 2015
Aldo Fernandez
Technical Consultant
@aldoforce
Safe Harbor
Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve
risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com,
inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of
historical fact could be deemed forward-looking, including any projections of subscriber growth, earnings, revenues, or other financial items and any
statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or
upgraded services or technology developments and customer contracts or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our
service, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in
our Web hosting, breach of our security measures, risks associated with possible mergers and acquisitions, the immature market in which we operate,
our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and
successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers.
Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the
most recent fiscal quarter ended July 31, 2011. This document and others are available on the SEC Filings section of the Investor Information section of
our Web site.
Any unreleased services or features referenced in this or other press releases or public statements are not currently available and may not be delivered
on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available.
Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
Follow UYSDUG for the latest news
@uysdug #uysdug
/Uruguay-Salesforce-Developer-User-Group/
www.uysdug.com
Join us and share your knowledge!
▪ Got something to share with the world?
▪ We are open for talks/sessions
▪ Check www.uysdug.com/cfp or get in contact with
someone from the Technical Board for more information
▪ UPCOMING EVENTS:
▪ July (Trailhead week)
▪ August (New Summer15 APIs)*
▪ September (Dreamforce 15!)
Agenda
▪ What is OAuth2.0?
▪ OAuth roles from Force.com perspective
▪ Connected apps as a gateway
▪ Authentication flows
▪ Tokens, tokens… tokens everywhere
▪ Step by step flows
What is OAuth 2.0? (formal)
▪ Is the evolution of OAuth protocol originally created in 2006
▪ “OAuth2.0 focuses on client developer simplicity while providing
specific authorization flows for web, desktop and mobile applications
and living room devices” — oauth.net/2
▪ If feeling brave, check the final version of the spec at: http://
tools.ietf.org/html/rfc6749
What is OAuth 2.0? (for the common people)
▪ OAuth2 is an authorization framework that enables applications to
obtain limited access to user accounts on an HTTP service
▪ It works by delegating user authentication to the service that hosts
the user account and authorizing 3rd party apps to access the user
account
▪ It provides authorization flows for web/desktop apps and mobile
devices
▪ The “valet key for the web”
OAuth roles from Force.com perspective
▪ Resource owner (Salesforce User)
▪ Client (an external app trying to do some cool stuff with Salesforce)
▪ Resource server (the salesforce instance na1.salesforce.com)
▪ Authorization server (the salesforce login hub login.salesforce.com)
OAuth roles from Force.com perspective
Connected Apps as a gateway
▪ Previously known a “remote access apps”
▪ Is an application that integrates with Salesforce using APIs such
REST and SOAP.
▪ Provides standard OAuth capabilities
▪ Allow administrators to set security policies and have explicit control
over who may use the app
▪ Package and deploy friendly (hello ISVs!)
▪ It’s the Salesforce’s abstraction of your external apps
Connected Apps
▪ When creating, you define OAuth metadata like:
▪ Basic descriptive and contact information for the app
▪ OAuth scopes and callback URL
▪ IP ranges where the app might be running (optional)
▪ Information about mobile policies (optional)
▪ In return you will receive:
▪ A client id (consumer key)
▪ A client secret (consumer secret)
▪ You will need BOTH for almost all authentication flows!
Connected Apps
Scopes
▪ API: allows access to the curent logged in user’s account over the
Salesforce APIs (includes chatter API)
▪ CHATTER_API: allows acces to Chatter API only
▪ FULL: allows access to all data accessible by current user. Doesn’t
include refresh_token
▪ REFRESH_TOKEN: allows to return a refresh token for logged in user.
▪ VISUALFORCE: allows access to Visualforce pages
▪ WEB: allows the ability to use access_token on the Web (includes
Visualforce scope)
A HA
moment!
Callback URL
▪ AKA ‘redirect URI’
▪ Is an endpoint(*) in your application to which Force.com can redirect
the user’s browser with an authentication code or access token
▪ To protect the tokens transactions HTTPS is enforced. HTTP only
allowed to localhost
▪ The redirect is a browser redirect
OAuth flows
▪ Web Server *
▪ User Agent *
▪ JWT (JSON Web Token)
▪ SAML Bearer assertion
▪ SAML assertion
▪ Username and password *
▪ Token refresh *
* most used/popular
Tokens, tokens… tokens everywhere!
▪ Authorization code: short lived token created by the authorization server and
passed to the client app via browser. The client app sends the authorization code to
the authorization server to obtain an access token or refresh token.
▪ Access token: used by the client app to make authenticated requests on behalf of
the end user. Lifetime on the order of minutes/hours, then a new access token
must be obtained.
▪ Refresh token: unlimited lifetime or until explicitly revoked by end-user. The client
app can store the refresh token to periodically obtain fresh access tokens. MUST
PROTECT AS A PASSWORD
▪ ID token: Used and defined by OpenID Connect. Provides information about the
logged in user.
Web Server flow
Web Server flow (step by step)
User Agent flow
Username and password flow
Token refresh
Resources + Kudos
▪ Pat Patterson @metadaddy “Digging Deeper into OAuth
2.0 on Force.com”
▪ Pat Patterson @metadaddy “Getting started with
Force.com REST API” @salesforcedocs
▪ OAuth community site (oauth.net)
Thank You!
OAuth2.0
An overview of OAuth2.0 on Force.com projects
Uruguay
Salesforce Developer Group
June 11, 2015 #UYSDUG
Aldo Fernandez
Technical Consultant
@aldoforce
#uysdug
#oauth

More Related Content

What's hot (20)

PDF
Secure Salesforce: Hardened Apps with the Mobile SDK
Salesforce Developers
 
PPTX
Integrating The Cloud - How to integrate Salesforce
Roy Gilad
 
PPTX
Secure Development on the Salesforce Platform - Part 3
Mark Adcock
 
PPT
Advanced Platform Series - OAuth and Social Authentication
Salesforce Developers
 
PDF
Build Amazing Website without coding using Salesforce SiteForce
vraopolisetti
 
PDF
Cisco UCCX/UCCE Integration With ServiceNow
PRANJOL SAIKIA
 
PPTX
Diving Into Heroku Private Spaces
Salesforce Developers
 
PDF
Introducing Salesforce Identity
Salesforce Developers
 
PPTX
Modern UI development with Lightning Components - Spanish!
Alba Azcona Rivas
 
PPT
How Force.com developers do more in less time
Abhinav Gupta
 
PDF
Cisco UCCX/UCCE Integration With SFDC Salesforce
PRANJOL SAIKIA
 
PPTX
Build Better Communities with Lightning
Salesforce Developers
 
PDF
Integrate CMS Content Into Lightning Communities with CMS Connect
Salesforce Developers
 
PDF
Secure Salesforce: Org Access Controls
Salesforce Developers
 
PDF
Easy REST Integrations with Lightning Components and Salesforce1
Salesforce Developers
 
PPTX
Mastering Force.com: Advanced Visualforce
Salesforce Developers
 
PPTX
Building apps faster with lightning and winter '17
Salesforce Developers
 
PPTX
Javascript and Remote Objects on Force.com Winter 15
Peter Chittum
 
PDF
Lightning Components - Advanced Features
Salesforce Developers
 
PPTX
Webinar: Build Apps Customers Love as a Salesforce Developer
Salesforce Developers
 
Secure Salesforce: Hardened Apps with the Mobile SDK
Salesforce Developers
 
Integrating The Cloud - How to integrate Salesforce
Roy Gilad
 
Secure Development on the Salesforce Platform - Part 3
Mark Adcock
 
Advanced Platform Series - OAuth and Social Authentication
Salesforce Developers
 
Build Amazing Website without coding using Salesforce SiteForce
vraopolisetti
 
Cisco UCCX/UCCE Integration With ServiceNow
PRANJOL SAIKIA
 
Diving Into Heroku Private Spaces
Salesforce Developers
 
Introducing Salesforce Identity
Salesforce Developers
 
Modern UI development with Lightning Components - Spanish!
Alba Azcona Rivas
 
How Force.com developers do more in less time
Abhinav Gupta
 
Cisco UCCX/UCCE Integration With SFDC Salesforce
PRANJOL SAIKIA
 
Build Better Communities with Lightning
Salesforce Developers
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Salesforce Developers
 
Secure Salesforce: Org Access Controls
Salesforce Developers
 
Easy REST Integrations with Lightning Components and Salesforce1
Salesforce Developers
 
Mastering Force.com: Advanced Visualforce
Salesforce Developers
 
Building apps faster with lightning and winter '17
Salesforce Developers
 
Javascript and Remote Objects on Force.com Winter 15
Peter Chittum
 
Lightning Components - Advanced Features
Salesforce Developers
 
Webinar: Build Apps Customers Love as a Salesforce Developer
Salesforce Developers
 

Similar to 04 june meetup - An overview of OAuth2 on Force.com projects (20)

PDF
Digging Deeper into Desktop and Mobile App Security
Salesforce Developers
 
PPTX
Hands-on with OAuth, Facebook and the Force.com Platform
Pat Patterson
 
PPTX
Deep dive into Salesforce Connected App
Dhanik Sahni
 
PDF
Iam f42 a
SelectedPresentations
 
PPTX
Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)
gemziebeth
 
PDF
ABCs of Security in the Cloud Webinar
Salesforce Developers
 
PPTX
O auth with facebook and google using .net
Sathyaish Chakravarthy
 
PPTX
Salesforce Identity Management
Jayant Jindal
 
PDF
OpenID Connect: The new standard for connecting to your Customers, Partners, ...
Salesforce Developers
 
PPTX
Ladies Be Architects: Integration Study Group: Security & State Management
gemziebeth
 
PPT
O auth 2
Nisha Baswal
 
PPTX
Oauth2 and OWSM OAuth2 support
Gaurav Sharma
 
PPT
Oauth2.0
Yasmine Gaber
 
PDF
Demystifying OAuth 2.0
Karl McGuinness
 
PDF
Oauth2.0 tutorial
HarikaReddy115
 
PPTX
Devteach 2017 OAuth and Open id connect demystified
Taswar Bhatti
 
PPTX
OAuth 2.0
Mihir Shah
 
PDF
OAuth In The Real World : 10 actual implementations you can't guess
Mehdi Medjaoui
 
PPTX
OAuth
Tom Elrod
 
PPTX
Oauth 2.0 security
vinoth kumar
 
Digging Deeper into Desktop and Mobile App Security
Salesforce Developers
 
Hands-on with OAuth, Facebook and the Force.com Platform
Pat Patterson
 
Deep dive into Salesforce Connected App
Dhanik Sahni
 
Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)
gemziebeth
 
ABCs of Security in the Cloud Webinar
Salesforce Developers
 
O auth with facebook and google using .net
Sathyaish Chakravarthy
 
Salesforce Identity Management
Jayant Jindal
 
OpenID Connect: The new standard for connecting to your Customers, Partners, ...
Salesforce Developers
 
Ladies Be Architects: Integration Study Group: Security & State Management
gemziebeth
 
O auth 2
Nisha Baswal
 
Oauth2 and OWSM OAuth2 support
Gaurav Sharma
 
Oauth2.0
Yasmine Gaber
 
Demystifying OAuth 2.0
Karl McGuinness
 
Oauth2.0 tutorial
HarikaReddy115
 
Devteach 2017 OAuth and Open id connect demystified
Taswar Bhatti
 
OAuth 2.0
Mihir Shah
 
OAuth In The Real World : 10 actual implementations you can't guess
Mehdi Medjaoui
 
OAuth
Tom Elrod
 
Oauth 2.0 security
vinoth kumar
 
Ad

More from Aldo Fernandez (9)

PDF
Test Driven Development (TDD) on Force.com projects
Aldo Fernandez
 
PDF
November meetup - Hello Winter'16
Aldo Fernandez
 
PDF
06 august meetup - enterprise integration architecture
Aldo Fernandez
 
PDF
Procesando Salesforce Outbound Messages con PHP en Heroku
Aldo Fernandez
 
PDF
Processing outbound messages with Node.js
Aldo Fernandez
 
PDF
Continuous Integration - Software development lifecycle for Force.com projects
Aldo Fernandez
 
PDF
Salesforce1 dev week UYSDUG 2014 - the force canvas spark
Aldo Fernandez
 
PDF
Salesforce1 lightning dev week UYSDUG 2015 - Lightning Connect
Aldo Fernandez
 
PDF
Salesforce mobile dev weel UYSDUG 2013 - Enabling restful services for mobile...
Aldo Fernandez
 
Test Driven Development (TDD) on Force.com projects
Aldo Fernandez
 
November meetup - Hello Winter'16
Aldo Fernandez
 
06 august meetup - enterprise integration architecture
Aldo Fernandez
 
Procesando Salesforce Outbound Messages con PHP en Heroku
Aldo Fernandez
 
Processing outbound messages with Node.js
Aldo Fernandez
 
Continuous Integration - Software development lifecycle for Force.com projects
Aldo Fernandez
 
Salesforce1 dev week UYSDUG 2014 - the force canvas spark
Aldo Fernandez
 
Salesforce1 lightning dev week UYSDUG 2015 - Lightning Connect
Aldo Fernandez
 
Salesforce mobile dev weel UYSDUG 2013 - Enabling restful services for mobile...
Aldo Fernandez
 
Ad

Recently uploaded (20)

PPTX
MATLAB : Introduction , Features , Display Windows, Syntax, Operators, Graph...
Amity University, Patna
 
PPT
Carmon_Remote Sensing GIS by Mahesh kumar
DhananjayM6
 
PPTX
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
PDF
Halide Perovskites’ Multifunctional Properties: Coordination Engineering, Coo...
TaameBerhe2
 
PDF
PORTFOLIO Golam Kibria Khan — architect with a passion for thoughtful design...
MasumKhan59
 
PDF
20ES1152 Programming for Problem Solving Lab Manual VRSEC.pdf
Ashutosh Satapathy
 
PPTX
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
PPTX
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
PDF
AN EMPIRICAL STUDY ON THE USAGE OF SOCIAL MEDIA IN GERMAN B2C-ONLINE STORES
ijait
 
PDF
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
PPTX
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
PPT
New_school_Engineering_presentation_011707.ppt
VinayKumar304579
 
PPTX
Introduction to Design of Machine Elements
PradeepKumarS27
 
PPTX
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
PDF
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
PDF
Water Industry Process Automation & Control Monthly July 2025
Water Industry Process Automation & Control
 
PDF
Electrical Engineer operation Supervisor
ssaruntatapower143
 
PPTX
Water Resources Engineering (CVE 728)--Slide 3.pptx
mohammedado3
 
PDF
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
PPTX
How Industrial Project Management Differs From Construction.pptx
jamespit799
 
MATLAB : Introduction , Features , Display Windows, Syntax, Operators, Graph...
Amity University, Patna
 
Carmon_Remote Sensing GIS by Mahesh kumar
DhananjayM6
 
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
Halide Perovskites’ Multifunctional Properties: Coordination Engineering, Coo...
TaameBerhe2
 
PORTFOLIO Golam Kibria Khan — architect with a passion for thoughtful design...
MasumKhan59
 
20ES1152 Programming for Problem Solving Lab Manual VRSEC.pdf
Ashutosh Satapathy
 
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
AN EMPIRICAL STUDY ON THE USAGE OF SOCIAL MEDIA IN GERMAN B2C-ONLINE STORES
ijait
 
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
New_school_Engineering_presentation_011707.ppt
VinayKumar304579
 
Introduction to Design of Machine Elements
PradeepKumarS27
 
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
Water Industry Process Automation & Control Monthly July 2025
Water Industry Process Automation & Control
 
Electrical Engineer operation Supervisor
ssaruntatapower143
 
Water Resources Engineering (CVE 728)--Slide 3.pptx
mohammedado3
 
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
How Industrial Project Management Differs From Construction.pptx
jamespit799
 

04 june meetup - An overview of OAuth2 on Force.com projects

  • 1. OAuth2.0 An overview of OAuth2.0 on Force.com projects June 11th 2015
  • 3. Safe Harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, risks associated with possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal quarter ended July 31, 2011. This document and others are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
  • 4. Follow UYSDUG for the latest news @uysdug #uysdug /Uruguay-Salesforce-Developer-User-Group/ www.uysdug.com
  • 5. Join us and share your knowledge! ▪ Got something to share with the world? ▪ We are open for talks/sessions ▪ Check www.uysdug.com/cfp or get in contact with someone from the Technical Board for more information ▪ UPCOMING EVENTS: ▪ July (Trailhead week) ▪ August (New Summer15 APIs)* ▪ September (Dreamforce 15!)
  • 6. Agenda ▪ What is OAuth2.0? ▪ OAuth roles from Force.com perspective ▪ Connected apps as a gateway ▪ Authentication flows ▪ Tokens, tokens… tokens everywhere ▪ Step by step flows
  • 7. What is OAuth 2.0? (formal) ▪ Is the evolution of OAuth protocol originally created in 2006 ▪ “OAuth2.0 focuses on client developer simplicity while providing specific authorization flows for web, desktop and mobile applications and living room devices” — oauth.net/2 ▪ If feeling brave, check the final version of the spec at: http:// tools.ietf.org/html/rfc6749
  • 8. What is OAuth 2.0? (for the common people) ▪ OAuth2 is an authorization framework that enables applications to obtain limited access to user accounts on an HTTP service ▪ It works by delegating user authentication to the service that hosts the user account and authorizing 3rd party apps to access the user account ▪ It provides authorization flows for web/desktop apps and mobile devices ▪ The “valet key for the web”
  • 9. OAuth roles from Force.com perspective ▪ Resource owner (Salesforce User) ▪ Client (an external app trying to do some cool stuff with Salesforce) ▪ Resource server (the salesforce instance na1.salesforce.com) ▪ Authorization server (the salesforce login hub login.salesforce.com)
  • 10. OAuth roles from Force.com perspective
  • 11. Connected Apps as a gateway ▪ Previously known a “remote access apps” ▪ Is an application that integrates with Salesforce using APIs such REST and SOAP. ▪ Provides standard OAuth capabilities ▪ Allow administrators to set security policies and have explicit control over who may use the app ▪ Package and deploy friendly (hello ISVs!) ▪ It’s the Salesforce’s abstraction of your external apps
  • 12. Connected Apps ▪ When creating, you define OAuth metadata like: ▪ Basic descriptive and contact information for the app ▪ OAuth scopes and callback URL ▪ IP ranges where the app might be running (optional) ▪ Information about mobile policies (optional) ▪ In return you will receive: ▪ A client id (consumer key) ▪ A client secret (consumer secret) ▪ You will need BOTH for almost all authentication flows!
  • 14. Scopes ▪ API: allows access to the curent logged in user’s account over the Salesforce APIs (includes chatter API) ▪ CHATTER_API: allows acces to Chatter API only ▪ FULL: allows access to all data accessible by current user. Doesn’t include refresh_token ▪ REFRESH_TOKEN: allows to return a refresh token for logged in user. ▪ VISUALFORCE: allows access to Visualforce pages ▪ WEB: allows the ability to use access_token on the Web (includes Visualforce scope)
  • 16. Callback URL ▪ AKA ‘redirect URI’ ▪ Is an endpoint(*) in your application to which Force.com can redirect the user’s browser with an authentication code or access token ▪ To protect the tokens transactions HTTPS is enforced. HTTP only allowed to localhost ▪ The redirect is a browser redirect
  • 17. OAuth flows ▪ Web Server * ▪ User Agent * ▪ JWT (JSON Web Token) ▪ SAML Bearer assertion ▪ SAML assertion ▪ Username and password * ▪ Token refresh * * most used/popular
  • 18. Tokens, tokens… tokens everywhere! ▪ Authorization code: short lived token created by the authorization server and passed to the client app via browser. The client app sends the authorization code to the authorization server to obtain an access token or refresh token. ▪ Access token: used by the client app to make authenticated requests on behalf of the end user. Lifetime on the order of minutes/hours, then a new access token must be obtained. ▪ Refresh token: unlimited lifetime or until explicitly revoked by end-user. The client app can store the refresh token to periodically obtain fresh access tokens. MUST PROTECT AS A PASSWORD ▪ ID token: Used and defined by OpenID Connect. Provides information about the logged in user.
  • 20. Web Server flow (step by step)
  • 24. Resources + Kudos ▪ Pat Patterson @metadaddy “Digging Deeper into OAuth 2.0 on Force.com” ▪ Pat Patterson @metadaddy “Getting started with Force.com REST API” @salesforcedocs ▪ OAuth community site (oauth.net)
  • 25. Thank You! OAuth2.0 An overview of OAuth2.0 on Force.com projects Uruguay Salesforce Developer Group June 11, 2015 #UYSDUG Aldo Fernandez Technical Consultant @aldoforce #uysdug #oauth