Watch keynotes and sessions from MongoDB.live, our virtual developer conference.

Realm Adapter Encryption

The Realm adapter https://realm.io/docs/javascript/latest/api/Realm.Sync.Adapter.html seems to create a local realm file, much like a (react-native) client would, when accessing realm. However,the client side realm api supports encrypting this local realm file e.g. using the configuration object https://realm.io/docs/javascript/latest/api/Realm.html#~Configuration. However, no such configuration seems to exist for the adapter API. I’m wondering what the steps are to ensure the encryption of the adapter and server-side realm?

@Salman_Mohammadi Correct there is no built-in encryption API for the Adapter API, you will need to roll your own, or use disk encryption from another provider.

Hi @Ian_ward, thanks for the response! I noticed the MongoDB-Realm integrated product is rolled out with Sync https://www.mongodb.com/realm/mobile/sync. I’m wondering if this will be encrypted, or have the option to be encrypted with the same security as ROS?

The new product is encrypted as part of Atlas encryption but the Adapter API has been removed from the realm-js SDK as part of the new product. Instead you should leverage Realm triggers -
https://docs.mongodb.com/realm/triggers/database-triggers/