Digging Deeper into Desktop and Mobile App Security
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
789
On Slideshare
789
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
15
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Digging Deeper into Desktop andMobile App SecurityPat Patterson, salesforce.com, Principal Developer Evangelist@metadaddy
  • 2. 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 product or service availability, 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, new products and services, 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, the outcome of intellectual property and other litigation, 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-Q for the most recent fiscal quarter ended July 31, 2012. This documents and others containing important disclosures 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 presentations, 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.
  • 3. Pat PattersonPrincipal Developer Evangelist@metadaddy
  • 4. ObjectivesBy the end of this session, you should understand:  Best practices for authenticating from desktop and mobile apps  The OAuth 2.0 Protocol  How to create a Connected App in a Developer Edition org
  • 5. How Not to Do It! Collect user credentials in a form in your app Use SOAP login() or OAuth 2.0 username/password flow Store user credentials on the device Like this…
  • 6. Why Not? The Password Anti-Pattern! Treat personal data such as username/password like toxic waste – don’t handle them unless you absolutely must! Requiring username/password rules out single sign-on If a single client leaks the password, the user must change it for all clients
  • 7. The right stuff: OAuth 2.0 User-Agent Flow Pop up a browser window and sent the user to https://login.salesforce.com/services/oauth2/authorize Let Salesforce handle the authentication process Store the resulting refresh_token securely on the device Like this…
  • 8. Sidebar: The Salesforce Mobile SDK The Mobile SDK provides OAuth 2.0 User-Agent Flow, secure token storage, and token refresh for native and hybrid apps Job done! But what’s actually happening under the covers???
  • 9. OAuth 2.0Authorization for RESTful APIsEvolution of Google AuthSub, Yahoo BBAuth, AOL OpenAuth etc‘Valet key’ for the webEmphasis on simplicity, ease of implementation
  • 10. OAuth Roles Authorization Server!!!
  • 11. OAuth 2.0 Protocol Authorization Server Resource Server App Browser (login.salesforce.com) (na1.salesforce.com)https://login.salesforce.com/services/oauth2/authorize?response_type=token&client_id=XYZ…&redirect_uri=m GET /services/oauth2/authorize? yapp://oauth response_type=token&client_id=XYZ …&redirect_uri=myapp://oauth Authenticate 302 Found Location: myapp://oauth# access_token=…&refresh_token=…& instance_url=…&id=…&signature=… &issued_at=… GET /oauth#access_token=…&… GET /services/data/v25.0/… Authorization: Bearer 00D5… 200 OK Data
  • 12. Force.com Identity Service OAuth response contains ‘id’ element:{ myapp://oauth# access_token=00D5...& refresh_token=ABC...& instance_url=https://na1.salesforce.com& id=https://login.salesforce.com/id/00D50000000IZ3ZEAW/00550000001fg5OAAQ& signature=GhBp…& issued_at=1308806720993 We can access this URL (with the OAuth token) to obtain information on the user Same pattern as OpenID Connect