On this page
- Application Users
- Data Access Permissions
- App Services Applications with Sync
- MongoDB Atlas Data Sources
- Developer Access
- Network Security
- Transport Layer Security (TLS)
- Firewall Configuration
- Communicate from the Client to the Sync Server
- Allowed Request Origins
- IP Access List
- API Access List
- Values and Secrets
Atlas App Services provides a variety of security features to protect your data and prevent unauthorized access to your application. This includes things like:
Built-in user management
Data access permissions
Network security features
The ability to store and substitute values and secrets
You can secure App Services Apps with built-in user management. With the built-in user management of App Services, only authorized users can access your App. You can delete or disable users, and revoke user sessions. Users can log in with:
Anonymous authentication, if you don't need to store user data
You can enable one or more authentication providers in the App Services backend, and then implement them in your client code. You can also link user accounts with client SDKs.
Use App Services data access rules to grant read and write access to data. Apps that use Atlas Device Sync define data access permissions during the process of enabling Device Sync. Apps that do not use Device Sync can link an MongoDB Atlas data source, and define permissions to perform CRUD operations on that data source.
MongoDB data access rules prevent operations where users do not have appropriate permissions. Users who do not meet your data access rules cannot view or modify data.
Atlas Device Sync allows you to define data access rules that determine which users can read or write which data. To learn how to configure these rules, refer to Sync Permissions Overview.
When you access MongoDB Atlas through App Services, you can define roles that enable users to read and modify data. App Services uses a strict rules system that prevents all operations unless they are explicitly enabled.
When you define a role, you create a set of CRUD permissions that App Services evaluates individually for each document associated with a query. You can set roles to have document-level or field-level access, and you can give roles read or read and write access. App Services blocks requests from roles that do not have permission to search or read data.
When you access MongoDB Atlas through an App with Atlas Device Sync enabled, the permissions you define for Device Sync apply, instead of the role-based permissions you define when you link an MongoDB Atlas data source.
Every App is associated with a specific MongoDB Atlas organization and project. App Services determines the developer access permissions for a given MongoDB Cloud user based on their assigned project roles in the project that contains an app.
The following table describes the access permissions associated with a given project role:
Full read-write access for all Apps associated with the project.
All Other Roles
Read-only access for all Apps associated with the project.
For more information about adding users and teams to Atlas, see Atlas Users and Teams.
App Services uses a range of network security protocols to prevent unauthorized access to your data. This includes:
Using TLS to secure network requests to and from your application
Defining IP addreses from which all outbound requests originate
Letting you define URLs and IP addresses from which inbound requests may originate
App Services uses TLS 1.3 to secure all network requests to and from your application, including:
Apps that connect from a Realm SDK.
Data API and GraphQL requests sent over HTTPS.
Queries and operations on a linked MongoDB Atlas data source.
The TLS certificate is pre-defined and cannot be customized or disabled.
App Services only sends outbound requests from a set list of IP addresses. The exact list depends on the cloud provider that the app server is deployed to. You can copy the IP addresses listed in this section to an allowlist for incoming requests on your firewall.
If you run a function from the Atlas App Services UI, the request originates from the server nearest to you, not the region the app is deployed to.
Outbound requests from an app deployed to AWS will originate from one of the following IP addresses:
22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11
Outbound requests from an app deployed to Azure will originate from one of the following IP addresses:
18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124
Outbound requests from an app deployed to GCP will originate from one of the following IP addresses:
126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168
The above IP lists only apply to outgoing requests from Atlas Functions, including triggers and HTTPS endpoints that make outgoing requests.
For requests that originate from the Sync server, we recommend allowlisting the entire subnet of the App's Deployment Region and cloud provider. You can find the Deployment Region in the App Services UI under App Settings > General > Deployment Region.
When you use Device Sync, you can use DNS filtering to allow connections
from the Sync client to the Sync server. Using DNS filtering, you can access
*.realm.mongodb.com via HTTPS or port 443.
You can define this configuration option in the
realm_config.json file. This field accepts an array of
URLs that incoming requests may originate from. If you define any allowed
request origins, then App Services blocks any incoming request from
an origin that is not listed.
App Services allows client requests from the enabled entries in the app's IP access list. Allowed requests will still use App Services's authentication and authorization rules. When you add IP access list entries, App Services blocks any request originating from an IP that is not on the access list.
By default, any newly-created App allows access from any client IP by adding an access list entry for 0.0.0.0/0. If you delete this entry, no client can access your App from any IP address.
When you create an API key, you can specify IP addresses that can use this API key to access your project or organization. If you specify an IP address, App Services blocks any request originating from an IP address that is not on the access list.
All internal communication between App Services and Atlas is encrypted with x509 certificates.
App Services enables you to define values and secrets that you can access or link to from your application. This enables you to remove deployment-specific configuration data and sensitive information from your app's business logic. Instead, you refer to it by name and App Services substitutes the value when executing your request.
Built-in user management handles authentication and ensures only logged-in users can access your App.
Data access permissions enable you to specify read and write permissions for Atlas Device Sync, linked MongoDB Atlas data sources, and developers building your apps.
Network security features enable you to guard against unauthorized access from unknown IP addresses or URLs.
Store values and secrets and refer to them by name to remove sensitive information from your business logic.