Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Digging Deeper into Desktop and Mobile App Security


Published on

  • Be the first to comment

  • Be the first to like this

Digging Deeper into Desktop and Mobile App Security

  1. 1. Digging Deeper into Desktop andMobile App SecurityPat Patterson,, Principal Developer Evangelist@metadaddy
  2. 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, 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 products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of, 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., inc. assumes no obligation and does not intend to update these forward- looking statements.
  3. 3. Pat PattersonPrincipal Developer Evangelist@metadaddy
  4. 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. 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. 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. 7. The right stuff: OAuth 2.0 User-Agent Flow Pop up a browser window and sent the user to Let Salesforce handle the authentication process Store the resulting refresh_token securely on the device Like this…
  8. 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. 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. 10. OAuth Roles Authorization Server!!!
  11. 11. OAuth 2.0 Protocol Authorization Server Resource Server App Browser ( (…&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. 12. Identity Service OAuth response contains ‘id’ element:{ myapp://oauth# access_token=00D5...& refresh_token=ABC...& instance_url= id= 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