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_Ris
ks
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
survey
Tap the bell to take a survey2Enroll in a session1

More Related Content

What's hot (20)

PPTX
OAuth with Salesforce - Demystified
Calvin Noronha
 
PDF
Leveraging New Features in CA Single-Sign on to Enable Web Services, Social S...
CA Technologies
 
PDF
Authentication with OAuth and Connected Apps
Salesforce Developers
 
PDF
Salesforce Platform Encryption Developer Strategy
Peter Chittum
 
PPTX
DevOps & Apps - Building and Operating Successful Mobile Apps
Apigee | Google Cloud
 
PDF
Identity As A Service Evaluation, Implementation, Realized Benefits
CA Technologies
 
PPTX
Integrating The Cloud - How to integrate Salesforce
Roy Gilad
 
PDF
API Security and OAuth for the Enterprise
CA API Management
 
PDF
Deep Dive into OAuth for Connected Apps
Salesforce Developers
 
PDF
Going Offline with Salesforce1 Mobile SDK
WinWire Technologies Inc
 
PDF
04 june meetup - An overview of OAuth2 on Force.com projects
Aldo Fernandez
 
PDF
Introducing salesforce shield - Paris Salesforce Developer Group - Oct 15
Paris Salesforce Developer Group
 
PDF
You've Changed: Field Audit Trails and the Salesforce Time Machine
Dreamforce
 
PPTX
Navi Mumbai Salesforce DUG meetup on integration
Rakesh Gupta
 
PPTX
Privileged Access Management (PAM)
danb02
 
PDF
SAP Identity Management Overview
SAP Technology
 
PPTX
Deep-Dive: API Security in the Digital Age
Apigee | Google Cloud
 
PPTX
API Security: Securing Digital Channels and Mobile Apps Against Hacks
Akana
 
PDF
Tech Talk: Defense In Depth Privileged Access Management for Hybrid Enterprises
CA Technologies
 
PDF
Ca siteminder
Roger Xia
 
OAuth with Salesforce - Demystified
Calvin Noronha
 
Leveraging New Features in CA Single-Sign on to Enable Web Services, Social S...
CA Technologies
 
Authentication with OAuth and Connected Apps
Salesforce Developers
 
Salesforce Platform Encryption Developer Strategy
Peter Chittum
 
DevOps & Apps - Building and Operating Successful Mobile Apps
Apigee | Google Cloud
 
Identity As A Service Evaluation, Implementation, Realized Benefits
CA Technologies
 
Integrating The Cloud - How to integrate Salesforce
Roy Gilad
 
API Security and OAuth for the Enterprise
CA API Management
 
Deep Dive into OAuth for Connected Apps
Salesforce Developers
 
Going Offline with Salesforce1 Mobile SDK
WinWire Technologies Inc
 
04 june meetup - An overview of OAuth2 on Force.com projects
Aldo Fernandez
 
Introducing salesforce shield - Paris Salesforce Developer Group - Oct 15
Paris Salesforce Developer Group
 
You've Changed: Field Audit Trails and the Salesforce Time Machine
Dreamforce
 
Navi Mumbai Salesforce DUG meetup on integration
Rakesh Gupta
 
Privileged Access Management (PAM)
danb02
 
SAP Identity Management Overview
SAP Technology
 
Deep-Dive: API Security in the Digital Age
Apigee | Google Cloud
 
API Security: Securing Digital Channels and Mobile Apps Against Hacks
Akana
 
Tech Talk: Defense In Depth Privileged Access Management for Hybrid Enterprises
CA Technologies
 
Ca siteminder
Roger Xia
 

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

PPTX
Secure Development on the Salesforce Platform - Part 3
Mark Adcock
 
PDF
Building secure mobile apps
Martin Vigo
 
PDF
Secure Salesforce: External App Integrations
Salesforce Developers
 
PDF
Secure Salesforce: Common Secure Coding Mistakes
Salesforce Developers
 
PDF
Secure Salesforce: Lightning Components Best Practices
Salesforce Developers
 
PDF
Developing Offline-Capable Apps with the Salesforce Mobile SDK and SmartStore
Salesforce Developers
 
PPTX
Secure Coding: SSL, SOAP, and REST
Salesforce Developers
 
PDF
What’s new in summer’15 release - Security & Compliance
Shesh Kondi
 
PDF
What’s new in summer’15 release - Security & Compliance
Shesh Kondi
 
PPTX
Introduction to lightning out df16
Mohith Shrivastava
 
PPTX
ISV Tech Talk: Distributing Lightning Components
CodeScience
 
PDF
How to Become a Security-Minded Admin
Salesforce Admins
 
POTX
Using the Google SOAP API
Salesforce Developers
 
PDF
OpenID Connect: The new standard for connecting to your Customers, Partners, ...
Salesforce Developers
 
PDF
Introduction to the Salesforce Security Model
Salesforce Developers
 
PDF
Salesforce API Series: Integrating Applications with Force.com Webinar
Salesforce Developers
 
PDF
Salesforce shield & summer 20 release
Devendra Sawant
 
PPTX
Salesforce Identity Management
Jayant Jindal
 
PPT
Designing custom REST and SOAP interfaces on Force.com
Steven Herod
 
PDF
API Design for Your Packaged App
Salesforce Developers
 
Secure Development on the Salesforce Platform - Part 3
Mark Adcock
 
Building secure mobile apps
Martin Vigo
 
Secure Salesforce: External App Integrations
Salesforce Developers
 
Secure Salesforce: Common Secure Coding Mistakes
Salesforce Developers
 
Secure Salesforce: Lightning Components Best Practices
Salesforce Developers
 
Developing Offline-Capable Apps with the Salesforce Mobile SDK and SmartStore
Salesforce Developers
 
Secure Coding: SSL, SOAP, and REST
Salesforce Developers
 
What’s new in summer’15 release - Security & Compliance
Shesh Kondi
 
What’s new in summer’15 release - Security & Compliance
Shesh Kondi
 
Introduction to lightning out df16
Mohith Shrivastava
 
ISV Tech Talk: Distributing Lightning Components
CodeScience
 
How to Become a Security-Minded Admin
Salesforce Admins
 
Using the Google SOAP API
Salesforce Developers
 
OpenID Connect: The new standard for connecting to your Customers, Partners, ...
Salesforce Developers
 
Introduction to the Salesforce Security Model
Salesforce Developers
 
Salesforce API Series: Integrating Applications with Force.com Webinar
Salesforce Developers
 
Salesforce shield & summer 20 release
Devendra Sawant
 
Salesforce Identity Management
Jayant Jindal
 
Designing custom REST and SOAP interfaces on Force.com
Steven Herod
 
API Design for Your Packaged App
Salesforce Developers
 
Ad

More from Martin Vigo (12)

PDF
Phonerator, an advanced *valid* phone number generator for your OSINT/SE needs
Martin Vigo
 
PDF
Phonerator, an advanced *valid* phone number generator for your OSINT/SE needs
Martin Vigo
 
PDF
From email address to phone number, a new OSINT approach
Martin Vigo
 
PDF
Ransombile: yet another reason to ditch sms
Martin Vigo
 
PDF
Compromising online accounts by cracking voicemail systems
Martin Vigo
 
PDF
Mobile apps security. Beyond XSS, CSRF and SQLi
Martin Vigo
 
PDF
Breaking vaults: Stealing Lastpass protected secrets
Martin Vigo
 
PDF
Even the LastPass Will be Stolen Deal with It!
Martin Vigo
 
PDF
Creating secure apps using the salesforce mobile sdk
Martin Vigo
 
PDF
Security Vulnerabilities: How to Defend Against Them
Martin Vigo
 
PDF
Do-it-Yourself Spy Program: Abusing Apple’s Call Relay Protocol
Martin Vigo
 
PDF
Do-it-Yourself Spy Program: Abusing Apple’s Call Relay Protocol
Martin Vigo
 
Phonerator, an advanced *valid* phone number generator for your OSINT/SE needs
Martin Vigo
 
Phonerator, an advanced *valid* phone number generator for your OSINT/SE needs
Martin Vigo
 
From email address to phone number, a new OSINT approach
Martin Vigo
 
Ransombile: yet another reason to ditch sms
Martin Vigo
 
Compromising online accounts by cracking voicemail systems
Martin Vigo
 
Mobile apps security. Beyond XSS, CSRF and SQLi
Martin Vigo
 
Breaking vaults: Stealing Lastpass protected secrets
Martin Vigo
 
Even the LastPass Will be Stolen Deal with It!
Martin Vigo
 
Creating secure apps using the salesforce mobile sdk
Martin Vigo
 
Security Vulnerabilities: How to Defend Against Them
Martin Vigo
 
Do-it-Yourself Spy Program: Abusing Apple’s Call Relay Protocol
Martin Vigo
 
Do-it-Yourself Spy Program: Abusing Apple’s Call Relay Protocol
Martin Vigo
 
Ad

Recently uploaded (20)

PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
The Future of Artificial Intelligence (AI)
Mukul
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 

Secure Salesforce: Hardened Apps with the Mobile SDK

  • 1. Secure Salesforce: Hardened Apps with the Mobile SDK ​Martin Vigo ​Product Security Engineer ​[email protected] ​@martin_vigo ​ ​Max Feldman ​Product Security Engineer ​[email protected]
  • 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 survey Tap the bell to take a survey2Enroll in a session1