Salesforce1 Mobile Security
Salesforce1 Mobile Security
Guide
Version 3, 0
@salesforcedocs
Last updated: July 19, 2022
© Copyright 2000–2022 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark of salesforce.com, inc.,
as are other names and marks. Other marks appearing herein may be trademarks of their respective owners.
CONTENTS
Chapter 1: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Chapter 3: Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Chapter 5: Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
OAuth Pairing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Single Sign On (SSO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Certificates and Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Identity Providers and Service Providers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Inactivity Lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Session Cookie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Restrict Device Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1
CHAPTER 2 Salesforce App Architecture Overview
Salesforce uses the Lightning Platform, with app logic and database storage provided by Salesforce’s
hosted app servers and client apps. The Salesforce solution consists of the Salesforce app server, and
either the client app or mobile web on the handheld mobile device. Supported operating systems are
Apple iOS and Google Android.
The Salesforce client app communicates across the wireless network to display a subset of the user’s
Salesforce data on the handheld device. The client app or browser on the handheld device pulls feed
data on demand to the device. This architecture provides a very high quality of service and a productive
working experience for the end user.
Salesforce provides a sandboxed environment for a user to access Salesforce data from a mobile device,
while an org admin can manage user access, even if the mobile device belongs to the user.
2
CHAPTER 3 Permissions
User Permissions
Access to Salesforce is “default on” and does not require an org admin to grant permission to use the
app. Admins can edit profile and permission sets to revoke access to any user through the admin console
. The Salesforce mobile app provides access to data and functions based on the core permissions and
rights defined for each user by their Salesforce admin. Mobile users are never able to view or access
more than their permissions allow.
• Salesforce for iOS: After installation, iOS requests permission when the app needs access to each
item listed. The user can approve or deny the request.
– Contacts
– Location
– Photo Library
– Camera
– Microphone
– Speech Recognition
– Calendars
3
CHAPTER 4 Communication Security
The Salesforce mobile app uses SSL/TLS v1.2 for Over-The-Air (OTA) communication encryption. All
Salesforce OAuth authorization endpoints are HTTPS only.
Communication requests below TLS v1.2 are denied by Salesforce servers.
4
CHAPTER 5 Authentication
In this chapter ... All components of Salesforce require user authentication at the point and time of access. Salesforce
utilizes OAuth2.0 for authentication through username/password or SSO (single sign-on) credentials.
• OAuth Pairing
• Single Sign On (SSO)
• Certificates and Keys
• Identity Providers and
Service Providers
• Inactivity Lock
• Session Cookie
• Restrict Device
Platforms
5
Authentication OAuth Pairing
OAuth Pairing
During the initial login, the device is uniquely identified and paired with the mobile user’s account using the OAuth 2.0 protocol
(http://tools.ietf.org/html/rfc6749). All requests to the Salesforce service are made using the OAuth token established through the pairing
created during activation.
After initial login, there is no exchange of a password in the communication between the mobile client and the Salesforce server. For
this reason, the Salesforce password is not stored on the device and is not required even when the password is changed or has expired.
A user obtains an access token and refresh token after successfully completing the OAuth User-Agent authentication. A user can use
the refresh token to get a new access token (session ID). Upon logout, the OAuth access and refresh tokens are revoked, and the user
set passcode is wiped (if passcode is enabled by org admin). The user is re-prompted to enter the username/password and reset the
passcode.
The available refresh token expiration policies:
• Refresh token never expires.
• Refresh token expires immediately (for example, the refresh token is never valid).
• Refresh token expires if it isn’t used for an amount of defined time (hours/days/months).
• Refresh token expires in defined amount of time (hours/days/months), regardless of use.
The default access token expiration schedule is set at 2 hours, but can be as short as 15 minutes or as long as 24 hours
6
Authentication Certificates and Keys
7
Authentication Inactivity Lock
Inactivity Lock
Upon initial activation, Salesforce prompts the user to create an arbitrary passcode (if required by the org admin), which is used to unlock
the app after reboot, or an admin defined period of inactivity (1, 5, 10, or 30 minutes).
The passcode lock protects lost or stolen devices that may have their wireless connection disabled, and can’t have their OAuth token
revoked.
Session Cookie
Session cookie is only used for Visualforce pages. It is derived from the OAuth Access Token and is scoped to the Visualforce page. The
WKWebView/WebView stores it in the cache.
8
CHAPTER 6 Application Data Storage
In this chapter ... A mobile device may be lost or stolen at any time. Since mobile devices are small and designed to be
highly portable, they may not remain under the physical control of a trusted person. Therefore, Salesforce
• Local Data Protection provides methods to secure the device data if it passes out of control of the user or the user’s organization.
• Remote Wipe
Salesforce has multiple levels of security at the handheld device level. First, device vendors provide the
ability to enforce OS-level password access restrictions on any device apps or data. Users must be required
to use the device protection in accordance with the owning enterprise’s security policy. If the device is
locked by a strong password, it is difficult for unauthorized persons to do anything with it.
9
Application Data Storage Local Data Protection
• Salesforce for Android: Database encrypted via SQLCipher using 256-bit AES (CBC mode/PBKDF2 key derivation)
Records pertaining to inactive feed item data are evicted from the database after 5 days have elapsed. Temporary files (such as
viewed image attachments) are stored only in memory while used.
• Salesforce Mobile Web: No encryption required. No data is stored locally on the device when using the mobile web.
Offline Sync
If Salesforce users lose their wireless connection, they can enable offline sync to navigate within the app and view most recent items.
• Salesforce for iOS: Database encrypted via SQLCipher using 256-bit AES (CBC mode/PBKDF2 key derivation).
• Salesforce for Android: Database encrypted via SQLCipher using 256-bit AES (CBC mode/PBKDF2 key derivation).
• Salesforce Mobile Web: Offline sync functionality isn’t available in mobile web.
Remote Wipe
To minimize the risk of information loss when a device is compromised, an org admin can:
1. Disable a user completely (for example, termination of an employee) to remove access and wipe the data from the apps.
10
Application Data Storage Remote Wipe
2. View the Connected Apps OAuth Usage report in the administration console to revoke the OAuth refresh token and associated
access tokens. This wipes the app, which forces the user to reauthenticate (e.g. employee loses a phone).
11
CHAPTER 7 Mobile Device Management (MDM)
In this chapter ... Both Salesforce for Android and Salesforce for iOS provide an extra level of security compliance through
interoperation with the most popular MDM (mobile device management) suites. Salesforce for Android
• Sample Property List and iOS, with an MDM, give you enhanced functionality for distribution and control over your users’
Configuration devices. The enhanced security functions when you combine Salesforce with an MDM include
certificate-based authentication and automatic custom host provisioning.
Note: SAML 2.0 (security assertion markup language) must be enabled and configured for your
organization.
There are prerequisites to implement enhanced security for Salesforce for Android.
• First, configure Android for Work for your org. Android for Work is a program that supports enterprise
use of Android devices. See Android Enterprise to learn more about the program and Get Started
with Android Enterprise for setup information.
• Once Android for Work is set up, the next step is to configure your Mobile Device Management
(MDM) suite. There are a multitude of MDM solutions in the market place. When you decide on the
right product, work with your MDM provider to complete the configuration for your org.
• After you have Android for Work and your MDM suite up and running in your org, you’re ready to
implement the enhanced security features of Salesforce for Android.
Certificate-Based Authentication
Using certificates to authenticate simplifies provisioning your mobile users, and your day-to-day mobile
administration tasks by eliminating usernames and passwords. Salesforce uses X.509 certificates to
authenticate users more efficiently, or as a second factor in the login process.
MDM Settings for Certificate-Based Authentication
To enable certificate-based authentication for your mobile users, you need to configure key-value
pair assignments through your MDM suite. Here are the supported keys:
12
Mobile Device Management (MDM)
Once you save your key-value pair assignments, you can push the mobile app with the updated
certificate-based authentication flow to your users via your MDM suite.
AppService String, String Array Android, iOS Labels for the hosts.
HostLabels The number of
AppServiceHostLabels
entries must match the
number of
13
Mobile Device Management (MDM)
Note: If the mobile app stops working unexpectedly, the copied data can remain on the
clipboard. The contents of the clipboard are cleared once the user starts and backgrounds the
mobile app.
This security functionality is available through Android for Android devices running OS 5.0 and
greater, and that have Android for Work set up. Contact your MDM provider to configure this
functionality for your Android users.
14
Mobile Device Management (MDM) Sample Property List Configuration
One method of setting key-value pair assignments is through an XML property list, or plist. The plist contains the key-value pair assignments
that an MDM provider sends to a mobile app to enforce security configurations.
Here is a sample plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AppServiceHosts</key>
<array>
<string>host1</string>
<string>host2</string>
</array>
<key>AppServiceHostLabels</key>
<array>
<string>Production</string>
<string>Sandbox</string>
</array>
<key>RequireCertAuth</key>
<true/>
<key>ClearClipboardOnBackground</key>
<false/>
<key>OnlyShowAuthorizedHosts</key>
<false/>
</dict>
</plist>
15
CHAPTER 8 Mobile Application Management (MAM) with
Enhanced Mobile Security
In this chapter ... Salesforce offers Enhanced Mobile Security, a paid mobile application management (MAM) add-on
designed to meet high security and compliance needs for Salesforce for iOS and Salesforce for Android.
• Get Started Unlike external mobile device management (MDM) solutions, Enhanced Mobile Security protects at the
• Configure Your app level, so it doesn’t need to manage users’ entire devices. Using connected app attributes, you can
Policies configure a range of security policies to limit users’ access and actions, and you can specify the severity
• Monitor User Actions of violations. You can also monitor user actions required for your compliance checks.
• What Your Users See
16
Mobile Application Management (MAM) with Enhanced Get Started
Mobile Security
Get Started
Contact your account executive to purchase Enhanced Mobile Security.
Assign the Enforce Enhanced Mobile App Security user permission to the users you want to apply the policies to. Learn more about user
permissions, permission sets, and data access in Salesforce Help.
Each severity level represents the actions enforced in the event of a violation.
error Blocks access to the app until the issue is resolved, but does not
log user out
warn Notifies the user of the violation and recommends how to resolve,
but user is able to continue using the app
info Blocks prohibited action or logs user action and informs user
The feature ships with default values and severity levels for most policies. If these defaults meet your needs, you’re all set.
To configure your policies, go to Setup and enter Connected Apps in the Quick Find box. Select Manage Connected Apps, then
click the name of the connected app you want to modify. In the Custom Attributes section on the connected app page, click New and
enter the attribute name and value. Click Save.
Severity:
• critical
• error
• warn
Examples:
17
Mobile Application Management (MAM) with Enhanced Configure Your Policies
Mobile Security
• iPhone11,8 (blocks
iPhone XR)
• Google (blocks all Google
devices)
Disable URL Caching (iOS only) mobile.security.DISABLE_URL_CACHING true or false {"value": "false",
"severity":"info"}
Severity: info
Enforce Maximum Days Offline mobile.security.MAX_OFFLINE The number of the maximum {"value": "30",
days offline without a policy "severity":"error"}
refresh.
Severity:
• critical
• error
• warn
Example: 30
18
Mobile Application Management (MAM) with Enhanced Configure Your Policies
Mobile Security
Prohibit File Backups (iOS only) mobile.security.BLOCK_FILE_BACKUP true or false {"value": "false",
"severity":"info"}
Severity: info
Prohibit Share Actions (iOS only) mobile.security.BLOCK_OS_SHARING true or false {"value": "false",
"severity":"info"}
Severity: info
Require Maximum Version of mobile.security.MAXIMUM_APP_VERSION The number of the maximum {"value": "1000",
App app version. "severity":"warn"}
Severity:
• critical
• error
• warn
Example: 220.6
19
Mobile Application Management (MAM) with Enhanced Configure Your Policies
Mobile Security
Severity:
• critical
• error
• warn
Example: 12.1.9
Require Minimum Version of mobile.security.MINIMUM_APP_VERSION The number of the minimum {"value": "18.0",
App app version. "severity":"warn"}
Severity:
• critical
• error
• warn
Example: 1.0
Require Minimum Version of OS mobile.security.MINIMUM_OS_VERSION The number of the minimum OS {"value": "12.1",
version. "severity":"error"}
Severity:
• critical
• error
• warn
Example: 11.9
Tip: Connected app attribute changes take effect when users force quit the Salesforce mobile app or when they log in to a new
session. To ensure that new or modified settings take effect for all users, we recommend that you revoke access to the Salesforce
mobile app so everyone is required to log in again.
We also recommend that you warn users about the changes you intend to make, especially if you restrict previously available
activities.
20
Mobile Application Management (MAM) with Enhanced Monitor User Actions
Mobile Security
21
CHAPTER 9 Salesforce Connected App Security Attributes
Connected Apps
You can control security and access for Salesforce for Android and Salesforce for iOS using settings
components that are installed from the managed Salesforce connected apps package. You can view
and edit the settings for each of the apps, including controlling user access with profiles, permissions,
and IP range restrictions, from the Manage Connected Apps page.
The Salesforce for Android and Salesforce for iOS components are automatically installed when one of
your users installs Salesforce from the App Store or Google Play on a mobile device and authenticates
with your organization by logging in to the mobile app. Alternatively, you can manually install Salesforce
and Chatter Apps connected apps package so you can review and modify the default security and access
settings before rolling out the Salesforce mobile app to your users.
From Setup, enter Connected Apps in the Quick Find box, then select Manage Connected Apps.
Click Edit for the app you want to modify.
22
Salesforce Connected App Security Attributes
FORCE_EMAIL_CLIENT_TO The email app’s URI scheme. Android, If a user taps on an email
Can differ by platform. For iOS action in the Salesforce
example, here's an Android URI mobile app, the user is
scheme example for Blue Mail, directed to the email app
and an iOS URI scheme example specified in the attribute
for Gmail. value.
Note: On 3D
Touch® devices, a
user is able to
select from all
available email
clients when they
touch and hold an
23
Salesforce Connected App Security Attributes
email address on
Visualforce pages
and record pages.
Tip: Connected app attribute changes take effect when users force quit the Salesforce mobile
app or when they log in to a new session. To ensure that new or modified settings take effect for
all users, we recommend that you revoke access to the Salesforce mobile app so everyone is
required to log in again.
We also recommend that you warn users about the changes you intend to make, especially if
you’re going to restrict previously available activities. The Salesforce mobile app doesn’t display
messages or indicators that connected app settings have changed.
24
CHAPTER 10 Notes
• iOS: Prior to entering applicationDidEnterBackground, a benign splash screen is displayed to protect
sensitive data from automatic iOS snapshotting (iOS uses automatic snapshotting for transition
animations). The application prevents any snapshots of customer data during backgrounding.
• Security is not a binary (on/off), but implemented at different levels.
• Salesforce provides multiple levels of security; however, there’s no application that can guarantee
a completely secure system.
25