SlideShare a Scribd company logo
Secure Salesforce:
Hardened Apps with the Mobile SDK
​ Martin Vigo
​ Product Security Engineer
​ mvigo@salesforce.com
​ @martin_vigo
​ 
​ Max Feldman
​ Product Security Engineer
​ m.feldman@salesforce.com
​ 
​ 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 any
litigation, risks associated with completed and any 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 year and in our quarterly report on Form 10-Q for the most recent fiscal quarter.
These 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.
Safe Harbor
Slides will be made available after the talk
No photos required
Martin Vigo
Product Security Engineer
@martin_vigo
Max Feldman
Product Security Engineer
https://www.owasp.org/index.php/OWASP_Mobile_Security_Project#tab=Top_10_Mobile_Risks
OWASP Top 10
Native VS Hybrid
Native VS Hybrid
​ Overview
•  File system / Insecure storage
•  Network communication
•  Crypto
•  Clipboard
•  Backups
•  RPC, URL scheme handlers
•  XSS
•  CSRF
•  SQLi
•  Input validation
•  Output encoding
•  Application logic flaws
Native VS Hybrid
​ Threats
Binary Protections/Server Side
Controls
•  Binary protections
•  Best practice
•  Security through obscurity
•  Server side controls
•  Our servers take care of this
•  The SDK will talk to our APIs
Not applicable
Binary Protections/Server Side Controls
Insecure Storage
•  Explicit storage
•  Credentials / OAuth tokens
•  Personal data
•  Preferences
•  Logs
•  Automatic storage
•  Temp files
•  Cache data
Storing secrets the wrong way
Insecure Storage
App Sandbox
External storage
Backups
Hardcoded data
•  Logs
•  Debugging information
•  Crashes
•  Analytics
•  Caches
•  Unique urls
•  Requests/Responses containing sensitive data
•  Images
Leaving traces behind
Data Leakage
Broken Crypto
•  ROT-13 isn’t the only insecure means of encrypting
•  “secret” => “frperg”
•  AES - advanced encryption standard
•  Secure, but that security depends on
•  Key length
•  Cipher mode
•  Others
•  Lots of ways to mess up
•  So what can you do?
https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_Codebook_.28ECB.29
Keeping your secrets safe
Encryption
Original Encrypted with ECB mode
SmartStore Demo
Secure storage with the SDK
How to store a secret
SmartStore
Bad TLS / Transport Security
•  HTTP?
•  No guarantee of confidentiality
•  HTTPS
•  Which protocol? Which version? Which cipher suites?
•  How can this go wrong?
•  Handled by our servers automatically
•  Certificates
•  What will we accept? Self-signed? Mismatched hostnames?
•  How can this go wrong?
•  The mobile SDK will take care of this
Securely transmitting data
TLS/Secure Transport
Secure Transport with the SDK
Demo
The SDK can easily handle secure callouts to Salesforce
How to query Salesforce securely
Secure Transport
Client Side Injection
•  Tampering with network traffic
•  Bypass validations
•  Modify user flow
•  Break restrictions
•  Tampering with the application logic
•  Activities / Intents
•  RPC and URL scheme handlers
•  Memory
Tampering with data locally
Client Side Injection
•  Validation / Sanitization must be server side
•  Everything can be tampered with client side
•  Client side validation is only for usability, not security
•  Don’t make security decisions based on client side data
Delegating to the server
Client Side Injection
Authentication and Authorization
Proper access controls
•  Authentication – verify that someone claiming to be
“Bob” is indeed “Bob”
•  Authorization – verifying that Bob can access only
what he should
•  No guarantee of confidentiality
•  We want a user to be able to login and access their
Salesforce data
•  But we don’t want every app developer to have the
credentials of a Salesforce user
•  OAuth allows us to do this
•  Only Salesforce sees their credentials
•  The mobile SDK makes this easy and accessible
Who is who and what can they access
Authentication and Authorization
Session Management
•  Sessions must be:
•  Unguessable/unpredictable
•  Short-lived enough to be secure, long-lived enough to be useful
•  Other requirements
•  The OAuth flow, sessions, tokens are all managed by our servers
•  then stored and managed securely by the SDK
https://www.owasp.org/index.php/Session_Management_Cheat_Sheet
Session Management
Mobile SDK OAuth Demo
The SDK makes OAuth easy
Security Decisions via Untrusted
Inputs
•  Malicious apps can try to interact with our app
•  We have to verify who is talking to us
•  Use whitelists of trusted applications
•  Handlers can trigger sensitive actions
•  Make the user aware of them
•  Don’t perform actions automatically
•  Spoofing / Eavesdropping
•  Don’t pass any sensitive information
•  Malicious payloads
•  Always validate IPC input
Trusting malicious sources
Untrusted Inputs
Conclusion
•  Open source platform
•  Active project
•  Provides secure storage through encryption
•  Enforces secure communication
•  Provides easy authentication/authorization
•  Uses platform-specific security mechanisms
•  Follows best practices and secure coding guidelines
Security-wise
What is the Mobile SDK?
•  Secure storage and data management
•  Use SmartStore
•  Secure transport and data transmission
•  Use built in SFDC APIs
•  Easy and manageable authentication and authorization
•  Use SDK’s OAuth handling
•  Untrusted inputs
•  Salesforce enforces server side validation
Recap
•  Mobile SDK - https://developer.salesforce.com/page/Mobile_SDK
•  Secure Coding Guidelines -
https://developer.salesforce.com/page/Testing_CRUD_and_FLS_Enforcement
•  CRUD & FLS Enforcement Guide -
https://developer.salesforce.com/page/Enforcing_CRUD_and_FLS
•  Salesforce StackExchange - http://salesforce.stackexchange.com/questions/tagged/security
•  Developer.Salesforce.com Security Forum -
https://developer.salesforce.com/forums/#!/feedtype=RECENT&criteria=ALLQUESTIONS
•  Security Office Hours (Partners) - http://security.force.com/security/contact/ohours
•  Security Implementation Guide -
https://developer.salesforce.com/docs/atlas.en-us.securityImplGuide.meta/
securityImplGuide/
Additional Resources
Secure Salesforce at Dreamforce 2015
​  10 DevZone Talks and 2 Lighting Zone Talks covering all aspects of
Security on the Salesforce Platform
​  Visit our booth in the DevZone with any security questions
​  Check out the schedule and details at http://bit.ly/DF15Sec
​  Admin-related security questions?
​  Join us for coffee in the Admin Zone Security Cafe
Q&A
Secure Salesforce
​  Code Scanning with Checkmarx
​  Robert Sussland and Gideon Kreiner
​  3:30 pm in Moscone West 2011
​  Lightning Components Best Practices
​  Robert Sussland and Sergey Gorbaty
​  4:45 pm in Moscone West 2007
​  Common Secure Coding Mistakes
​  Rachel Black and Alejandro Raigon Munoz
​  5:00 pm in Moscone West 2006
​  Chimera: External Integration Security
​  Tim Bach and Travis Safford
​  Friday, 9/18 10:00 am in Moscone West 2009
Share Your Feedback, and Win a GoPro!
3
Earn a GoPro prize entry for each completed
surveyTap the bell to take a survey2Enroll in a session1

More Related Content

PDF
Secure Salesforce: Hardened Apps with the Mobile SDK
PPTX
Salesforce Security Review Tips and Tricks
PDF
Secure Salesforce: Code Scanning with Checkmarx
PDF
Secure Salesforce: Secret Storage in Your Salesforce Instance
PDF
Secure Salesforce: Org Access Controls
PDF
MuleSoft Meetup Dubai Anypoint security with api-led Connectivity
PDF
Salesforce Shield: How to Deliver a New Level of Trust and Security in the Cloud
PPTX
Building better security for your API platform using Azure API Management
Secure Salesforce: Hardened Apps with the Mobile SDK
Salesforce Security Review Tips and Tricks
Secure Salesforce: Code Scanning with Checkmarx
Secure Salesforce: Secret Storage in Your Salesforce Instance
Secure Salesforce: Org Access Controls
MuleSoft Meetup Dubai Anypoint security with api-led Connectivity
Salesforce Shield: How to Deliver a New Level of Trust and Security in the Cloud
Building better security for your API platform using Azure API Management

What's hot (20)

PDF
Security Best Practices for Mobile Development
PDF
Dreamforce 15 - Platform Encryption for Developers
POTX
OAuth for Non Developers in Salesforce
PDF
Leveraging New Features in CA Single-Sign on to Enable Web Services, Social S...
PPTX
OAuth with Salesforce - Demystified
PPTX
OAuth - Don’t Throw the Baby Out with the Bathwater
PDF
Salesforce Platform Encryption Developer Strategy
PDF
What’s new in summer’15 release - Security & Compliance
PDF
Authentication with OAuth and Connected Apps
PDF
Identity As A Service Evaluation, Implementation, Realized Benefits
PDF
Checkmarx meetup API Security - API Security top 10 - Erez Yalon
PPTX
DevOps & Apps - Building and Operating Successful Mobile Apps
PPTX
Integrating The Cloud - How to integrate Salesforce
PDF
Going Offline with Salesforce1 Mobile SDK
PDF
Deep Dive into OAuth for Connected Apps
PDF
API Security and OAuth for the Enterprise
PPTX
Managing Identities in the World of APIs
PPTX
Navi Mumbai Salesforce DUG meetup on integration
PPTX
Privileged Access Management (PAM)
PPTX
Data-driven API Security
Security Best Practices for Mobile Development
Dreamforce 15 - Platform Encryption for Developers
OAuth for Non Developers in Salesforce
Leveraging New Features in CA Single-Sign on to Enable Web Services, Social S...
OAuth with Salesforce - Demystified
OAuth - Don’t Throw the Baby Out with the Bathwater
Salesforce Platform Encryption Developer Strategy
What’s new in summer’15 release - Security & Compliance
Authentication with OAuth and Connected Apps
Identity As A Service Evaluation, Implementation, Realized Benefits
Checkmarx meetup API Security - API Security top 10 - Erez Yalon
DevOps & Apps - Building and Operating Successful Mobile Apps
Integrating The Cloud - How to integrate Salesforce
Going Offline with Salesforce1 Mobile SDK
Deep Dive into OAuth for Connected Apps
API Security and OAuth for the Enterprise
Managing Identities in the World of APIs
Navi Mumbai Salesforce DUG meetup on integration
Privileged Access Management (PAM)
Data-driven API Security
Ad

Viewers also liked (15)

PPTX
Addressing the OWASP Mobile Security Threats using Xamarin
PPTX
Analisi e sviluppo di un algoritmo di pianificazione ordini di una ditta di t...
PDF
Tugas minggu 1
PPTX
Ques una Taxonomia XBRL
PPTX
Presentación
PDF
Ascm powerpoint
PDF
Asset Price Bubbles
PDF
El informador renegociación del tlcan, sobre la mesa
PPTX
Windows Azure 개요
PPTX
Diapositiva informatica android e ios
PDF
Analisi sperimentale comparativa dell’evolvibilità nei sistemi di evoluzione ...
PPTX
Azure Architecture Solutions Overview: Part 1
PDF
Las Campañas Cyber Days - 2016
PDF
Distance measure between two biological sequences
Addressing the OWASP Mobile Security Threats using Xamarin
Analisi e sviluppo di un algoritmo di pianificazione ordini di una ditta di t...
Tugas minggu 1
Ques una Taxonomia XBRL
Presentación
Ascm powerpoint
Asset Price Bubbles
El informador renegociación del tlcan, sobre la mesa
Windows Azure 개요
Diapositiva informatica android e ios
Analisi sperimentale comparativa dell’evolvibilità nei sistemi di evoluzione ...
Azure Architecture Solutions Overview: Part 1
Las Campañas Cyber Days - 2016
Distance measure between two biological sequences
Ad

Similar to Secure Salesforce: Hardened Apps with the Mobile SDK (20)

PPTX
Secure Development on the Salesforce Platform - Part 3
PDF
Building secure mobile apps
PDF
Secure Salesforce: Lightning Components Best Practices
PDF
Secure Salesforce: External App Integrations
PDF
Secure Salesforce: Common Secure Coding Mistakes
PDF
Developing Offline-Capable Apps with the Salesforce Mobile SDK and SmartStore
PPTX
Secure Coding: SSL, SOAP, and REST
PPTX
ISV Tech Talk: Distributing Lightning Components
PPTX
Introduction to lightning out df16
PDF
What’s new in summer’15 release - Security & Compliance
PDF
How to Become a Security-Minded Admin
PDF
Introduction to the Salesforce Security Model
POTX
Using the Google SOAP API
PPTX
How a PDO Can Help Get You to Market Faster
PDF
Salesforce shield & summer 20 release
PDF
OpenID Connect: The new standard for connecting to your Customers, Partners, ...
PPTX
Salesforce Identity Management
PDF
Salesforce API Series: Integrating Applications with Force.com Webinar
PPTX
Building Apps Faster with Lightning and Winter '17
PPTX
Building apps faster with lightning and winter '17
Secure Development on the Salesforce Platform - Part 3
Building secure mobile apps
Secure Salesforce: Lightning Components Best Practices
Secure Salesforce: External App Integrations
Secure Salesforce: Common Secure Coding Mistakes
Developing Offline-Capable Apps with the Salesforce Mobile SDK and SmartStore
Secure Coding: SSL, SOAP, and REST
ISV Tech Talk: Distributing Lightning Components
Introduction to lightning out df16
What’s new in summer’15 release - Security & Compliance
How to Become a Security-Minded Admin
Introduction to the Salesforce Security Model
Using the Google SOAP API
How a PDO Can Help Get You to Market Faster
Salesforce shield & summer 20 release
OpenID Connect: The new standard for connecting to your Customers, Partners, ...
Salesforce Identity Management
Salesforce API Series: Integrating Applications with Force.com Webinar
Building Apps Faster with Lightning and Winter '17
Building apps faster with lightning and winter '17

More from Salesforce Developers (20)

PDF
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
PDF
Maximizing Salesforce Lightning Experience and Lightning Component Performance
PDF
Local development with Open Source Base Components
PPTX
TrailheaDX India : Developer Highlights
PDF
Why developers shouldn’t miss TrailheaDX India
PPTX
CodeLive: Build Lightning Web Components faster with Local Development
PPTX
CodeLive: Converting Aura Components to Lightning Web Components
PPTX
Enterprise-grade UI with open source Lightning Web Components
PPTX
TrailheaDX and Summer '19: Developer Highlights
PDF
Live coding with LWC
PDF
Lightning web components - Episode 4 : Security and Testing
PDF
LWC Episode 3- Component Communication and Aura Interoperability
PDF
Lightning web components episode 2- work with salesforce data
PDF
Lightning web components - Episode 1 - An Introduction
PDF
Migrating CPQ to Advanced Calculator and JSQCP
PDF
Scale with Large Data Volumes and Big Objects in Salesforce
PDF
Replicate Salesforce Data in Real Time with Change Data Capture
PDF
Modern Development with Salesforce DX
PDF
Get Into Lightning Flow Development
PDF
Integrate CMS Content Into Lightning Communities with CMS Connect
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Local development with Open Source Base Components
TrailheaDX India : Developer Highlights
Why developers shouldn’t miss TrailheaDX India
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Converting Aura Components to Lightning Web Components
Enterprise-grade UI with open source Lightning Web Components
TrailheaDX and Summer '19: Developer Highlights
Live coding with LWC
Lightning web components - Episode 4 : Security and Testing
LWC Episode 3- Component Communication and Aura Interoperability
Lightning web components episode 2- work with salesforce data
Lightning web components - Episode 1 - An Introduction
Migrating CPQ to Advanced Calculator and JSQCP
Scale with Large Data Volumes and Big Objects in Salesforce
Replicate Salesforce Data in Real Time with Change Data Capture
Modern Development with Salesforce DX
Get Into Lightning Flow Development
Integrate CMS Content Into Lightning Communities with CMS Connect

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
cuic standard and advanced reporting.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Electronic commerce courselecture one. Pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Approach and Philosophy of On baking technology
PDF
KodekX | Application Modernization Development
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
Cloud computing and distributed systems.
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Encapsulation theory and applications.pdf
Spectral efficient network and resource selection model in 5G networks
Programs and apps: productivity, graphics, security and other tools
cuic standard and advanced reporting.pdf
Network Security Unit 5.pdf for BCA BBA.
Electronic commerce courselecture one. Pdf
The AUB Centre for AI in Media Proposal.docx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Chapter 3 Spatial Domain Image Processing.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Advanced methodologies resolving dimensionality complications for autism neur...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Approach and Philosophy of On baking technology
KodekX | Application Modernization Development
MIND Revenue Release Quarter 2 2025 Press Release
20250228 LYD VKU AI Blended-Learning.pptx

Secure Salesforce: Hardened Apps with the Mobile SDK

  • 1. Secure Salesforce: Hardened Apps with the Mobile SDK ​ Martin Vigo ​ Product Security Engineer ​ mvigo@salesforce.com ​ @martin_vigo ​  ​ Max Feldman ​ Product Security Engineer ​ m.feldman@salesforce.com ​ 
  • 2. ​ 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 any litigation, risks associated with completed and any 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 year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These 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. Safe Harbor
  • 3. Slides will be made available after the talk No photos required
  • 4. Martin Vigo Product Security Engineer @martin_vigo
  • 9. •  File system / Insecure storage •  Network communication •  Crypto •  Clipboard •  Backups •  RPC, URL scheme handlers •  XSS •  CSRF •  SQLi •  Input validation •  Output encoding •  Application logic flaws Native VS Hybrid ​ Threats
  • 11. •  Binary protections •  Best practice •  Security through obscurity •  Server side controls •  Our servers take care of this •  The SDK will talk to our APIs Not applicable Binary Protections/Server Side Controls
  • 13. •  Explicit storage •  Credentials / OAuth tokens •  Personal data •  Preferences •  Logs •  Automatic storage •  Temp files •  Cache data Storing secrets the wrong way Insecure Storage App Sandbox External storage Backups Hardcoded data
  • 14. •  Logs •  Debugging information •  Crashes •  Analytics •  Caches •  Unique urls •  Requests/Responses containing sensitive data •  Images Leaving traces behind Data Leakage
  • 16. •  ROT-13 isn’t the only insecure means of encrypting •  “secret” => “frperg” •  AES - advanced encryption standard •  Secure, but that security depends on •  Key length •  Cipher mode •  Others •  Lots of ways to mess up •  So what can you do? https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_Codebook_.28ECB.29 Keeping your secrets safe Encryption Original Encrypted with ECB mode
  • 18. How to store a secret SmartStore
  • 19. Bad TLS / Transport Security
  • 20. •  HTTP? •  No guarantee of confidentiality •  HTTPS •  Which protocol? Which version? Which cipher suites? •  How can this go wrong? •  Handled by our servers automatically •  Certificates •  What will we accept? Self-signed? Mismatched hostnames? •  How can this go wrong? •  The mobile SDK will take care of this Securely transmitting data TLS/Secure Transport
  • 21. Secure Transport with the SDK Demo The SDK can easily handle secure callouts to Salesforce
  • 22. How to query Salesforce securely Secure Transport
  • 24. •  Tampering with network traffic •  Bypass validations •  Modify user flow •  Break restrictions •  Tampering with the application logic •  Activities / Intents •  RPC and URL scheme handlers •  Memory Tampering with data locally Client Side Injection
  • 25. •  Validation / Sanitization must be server side •  Everything can be tampered with client side •  Client side validation is only for usability, not security •  Don’t make security decisions based on client side data Delegating to the server Client Side Injection
  • 27. •  Authentication – verify that someone claiming to be “Bob” is indeed “Bob” •  Authorization – verifying that Bob can access only what he should •  No guarantee of confidentiality •  We want a user to be able to login and access their Salesforce data •  But we don’t want every app developer to have the credentials of a Salesforce user •  OAuth allows us to do this •  Only Salesforce sees their credentials •  The mobile SDK makes this easy and accessible Who is who and what can they access Authentication and Authorization
  • 29. •  Sessions must be: •  Unguessable/unpredictable •  Short-lived enough to be secure, long-lived enough to be useful •  Other requirements •  The OAuth flow, sessions, tokens are all managed by our servers •  then stored and managed securely by the SDK https://www.owasp.org/index.php/Session_Management_Cheat_Sheet Session Management
  • 30. Mobile SDK OAuth Demo The SDK makes OAuth easy
  • 31. Security Decisions via Untrusted Inputs
  • 32. •  Malicious apps can try to interact with our app •  We have to verify who is talking to us •  Use whitelists of trusted applications •  Handlers can trigger sensitive actions •  Make the user aware of them •  Don’t perform actions automatically •  Spoofing / Eavesdropping •  Don’t pass any sensitive information •  Malicious payloads •  Always validate IPC input Trusting malicious sources Untrusted Inputs
  • 34. •  Open source platform •  Active project •  Provides secure storage through encryption •  Enforces secure communication •  Provides easy authentication/authorization •  Uses platform-specific security mechanisms •  Follows best practices and secure coding guidelines Security-wise What is the Mobile SDK?
  • 35. •  Secure storage and data management •  Use SmartStore •  Secure transport and data transmission •  Use built in SFDC APIs •  Easy and manageable authentication and authorization •  Use SDK’s OAuth handling •  Untrusted inputs •  Salesforce enforces server side validation Recap
  • 36. •  Mobile SDK - https://developer.salesforce.com/page/Mobile_SDK •  Secure Coding Guidelines - https://developer.salesforce.com/page/Testing_CRUD_and_FLS_Enforcement •  CRUD & FLS Enforcement Guide - https://developer.salesforce.com/page/Enforcing_CRUD_and_FLS •  Salesforce StackExchange - http://salesforce.stackexchange.com/questions/tagged/security •  Developer.Salesforce.com Security Forum - https://developer.salesforce.com/forums/#!/feedtype=RECENT&criteria=ALLQUESTIONS •  Security Office Hours (Partners) - http://security.force.com/security/contact/ohours •  Security Implementation Guide - https://developer.salesforce.com/docs/atlas.en-us.securityImplGuide.meta/ securityImplGuide/ Additional Resources
  • 37. Secure Salesforce at Dreamforce 2015 ​  10 DevZone Talks and 2 Lighting Zone Talks covering all aspects of Security on the Salesforce Platform ​  Visit our booth in the DevZone with any security questions ​  Check out the schedule and details at http://bit.ly/DF15Sec ​  Admin-related security questions? ​  Join us for coffee in the Admin Zone Security Cafe
  • 38. Q&A
  • 39. Secure Salesforce ​  Code Scanning with Checkmarx ​  Robert Sussland and Gideon Kreiner ​  3:30 pm in Moscone West 2011 ​  Lightning Components Best Practices ​  Robert Sussland and Sergey Gorbaty ​  4:45 pm in Moscone West 2007 ​  Common Secure Coding Mistakes ​  Rachel Black and Alejandro Raigon Munoz ​  5:00 pm in Moscone West 2006 ​  Chimera: External Integration Security ​  Tim Bach and Travis Safford ​  Friday, 9/18 10:00 am in Moscone West 2009
  • 40. Share Your Feedback, and Win a GoPro! 3 Earn a GoPro prize entry for each completed surveyTap the bell to take a survey2Enroll in a session1