SlideShare a Scribd company logo
MongoDB .local Bengaluru 2019: New Encryption Capabilities in MongoDB 4.2: A Deep Dive into Protecting Sensitive Workloads
New encryption capabilities in MongoDB 4.2:
A deep dive into protecting sensitive workloads
Prasad Pillalamarri
Technical Director, MongoDB Software India Private Limited
New encryption capabilities in MongoDB 4.2:
A deep dive into protecting sensitive workloads
Agenda
▪ A brief history of database security
▪ Trust models: server vs. client
▪ Encrypting data-in-use
▪ Hands on deep dive
▪ Q&A
A brief history of database security
A brief history of database security
Evolution
▪ access controls
▪ passwords
▪ plaintext > hashing > key derivation
▪ bearer tokens
▪ NTLM, Kerberos tickets, LDAP/S, SCRAM, web session
A brief history of database security
Evolution
▪ access controls
▪ passwords
▪ plaintext > hashing > key derivation
▪ bearer tokens
▪ NTLM, Kerberos tickets, LDAP/S, SCRAM, web session
▪ multi-factor auth
▪ LCD fobs / SMS / 2FA apps / FIDO-U2F / WebAuthn / mobile enclaves
▪ federated RBAC
A brief history of database security
Evolution
▪ network
▪ (plaintext) native wire protocols
▪ SSL encryption
▪ TLS
▪ TLS w/ PFS
A brief history of database security
Evolution
▪ storage
▪ volume-level / full disk encryption (FDE)
▪ BitLocker, DMCrypt, FileVault, encrypted EBS
A brief history of database security
Evolution
▪ storage
▪ volume-level / full disk encryption (FDE)
▪ BitLocker, DMCrypt, FileVault, encrypted EBS
▪ file-level encryption
▪ whole database
▪ per-database (WiredTiger ESE)
▪ tablespace
▪ database-level encryption
▪ column / field
A brief history of database security
These are all important defenses, but…
What is the threat?
Against whom/what are we defending?
▪ “hackers”?
▪ criminal blackhats?
▪ competitors?
▪ activists?
▪ unknown actors?
A brief history of database security
These are all important defenses, but…
What is the threat?
Against whom/what are we defending?
▪ “hackers”?
▪ criminal blackhats?
▪ competitors?
▪ activists?
▪ unknown actors?
▪ insiders?
▪ admins?
The security model for many Prod databases
A brief history of database security
Every sector of the global economy has been impacted
▪ enterprise
▪ consumer tech
▪ retail
▪ government
▪ healthcare
▪ finance
…
A brief history of database security
Major shifts in regulatory & privacy climate
▪ GDPR
▪ HIPAA
▪ PCI DSS
▪ NIST/FISMA
▪ Consumer protection
▪ State & provincial
A brief history of database security
System architect & developer security challenges
Meeting legal/regulatory obligations
▪ Controls
▪ Audit/attestation
Defending real-world attacks
▪ First Principles: C/I/A
▪ Separation of duties
▪ Access control
▪ Identifying & protecting sensitive data
A brief history of database security
System architects & develop security challenges
Meeting legal/regulatory obligations
▪ Controls
▪ Audit/attestation
Defending real-world attacks
▪ First Principles: C/I/A
▪ Separation of duties
▪ Access control
▪ Identifying & protecting sensitive data
Trust models: server vs. client
Trust models: server vs. client
What is the source of trust?
▪ Traditionally, DB encryption has relied on server-side trust
▪ This has implications, many not so obvious
▪ With a few caveats, the database operator typically has
unrestricted technical access, including:
▪ DBAs
▪ system admins
▪ hosting/infrastructure providers
Trust models: server vs. client
The fundamental challenge is protecting the confidentiality of
data while it’s in use.
Encrypting Data-in-Use
Encrypting Data-in-Use
Introducing MongoDB Client-Side Field-Level Encryption
▪ encryption as a first-class citizen
▪ modern, authenticated encryption algorithms
Encrypting Data-in-Use
Introducing MongoDB Client-Side Field-Level Encryption
▪ encryption as a first-class citizen
▪ modern, authenticated encryption algorithms
▪ strong security guarantees
▪ customer-managed keys
▪ content is opaque to server & server operator
Encrypting Data-in-Use
Introducing MongoDB Client-Side Field-Level Encryption
▪ major investment
▪ 2 years in the making
▪ 16+ engineers spanning core server, query, security, cloud, drivers
▪ targeting 12+ languages
▪ all major hardware & operating system platforms
▪ Linux, MacOS, Windows
MongoDB Client-Side Field-Level Encryption
Core design
▪ enabled in drivers
▪ drivers have expanded MQL awareness
▪ extends existing JSON Schema with new “encrypt” propert
MongoDB Client-Side Field-Level Encryption
Core design
▪ enabled in drivers
▪ drivers have expanded MQL awareness
▪ extends existing JSON Schema with new “encrypt” propert
▪ adds JSON Schema validation to the client
▪ individual fields within collections can be marked as encrypte
▪ keys can be used on a per-field, per-document basis
MongoDB Client-Side Field-Level Encryption
Cryptography
▪ multiple encryption options, including deterministic search
▪ cloud key services are natively integrated
▪ modern authenticated encryption with AES-256 & SHA-2
▪ AEAD_AES_CBC_HMAC_SHA512 (2015 IETF draft: McGrew, Foley, Paterson)
MongoDB Client-Side Field-Level Encryption
Cryptography
▪ multiple encryption options, including deterministic search
▪ cloud key services are natively integrated
▪ modern authenticated encryption with AES-256 & SHA-2
▪ AEAD_AES_CBC_HMAC_SHA512 (2015 IETF draft: McGrew, Foley, Paterson)
▪ abuse-resistant derived deterministic IVs
▪ native OS libraries used for crypto primitives
MongoDB Client-Side Field-Level Encryption
Developer view
▪ new JSON Schema attribute “encrypt”
▪ schema validation extended to the client/application
▪ key management services integrated into drivers
MongoDB Client-Side Field-Level Encryption
Developer view
▪ new JSON Schema attribute “encrypt”
▪ schema validation extended to the client/application
▪ key management services integrated into drivers
▪ driver generates secure request for field keys
▪ all encryption/decryption is done in the driver (on the client)
▪ server only sees encrypted binary data (BinData subtype-6)
MongoDB Client-Side Field-Level Encryption
How does it work?
MongoDB Client-Side Field-Level Encryption
{
firstName: "Pat",
lastName: "Lee",
ssn: "901-01-0001",
email: "lee@example.com",
mobile: "+1-212-555-1234",
medRecNum: 235498
}
{
firstName: "Pat",
lastName: "Lee",
! ssn: "r6EaUcgZ4lGw…",
! email: "K4b5U3TlcIXh…",
! mobile: "oR72CW4Wf5Ej…",
medRecNum: 235498
}
View from application
View from database (admin, server, DB logs, process memory)
MongoDB .local Bengaluru 2019: New Encryption Capabilities in MongoDB 4.2: A Deep Dive into Protecting Sensitive Workloads
Let’s look at some code
"test.patients" : {
"bsonType" : "object",
"properties" : {
"medRecNum" : { "bsonType" : "int" },
"firstName" : { "bsonType" : "string" },
"lastName" : { "bsonType" : "string" },
"ssn" : {
"encrypt" : {
"bsonType" : "string",
"algorithm" : encryption_mode,
"keyId" : [ key1 ]
}
},
"mobile" : { "bsonType" : "string" },
"email" : { "bsonType" : "string" },
}}
"test.patients" : {
"bsonType" : "object",
"properties" : {
"medRecNum" : { "bsonType" : "int" },
"firstName" : { "bsonType" : "string" },
"lastName" : { "bsonType" : "string" },
"ssn" : {
"encrypt" : {
"bsonType" : "string",
"algorithm" : encryption_mode,
"keyId" : [ key1 ]
}
},
"mobile" : { "bsonType" : "string" },
"email" : { "bsonType" : "string" },
}}
"test.patients" : {
"bsonType" : "object",
"properties" : {
"medRecNum" : { "bsonType" : "int" },
"firstName" : { "bsonType" : "string" },
"lastName" : { "bsonType" : "string" },
"ssn" : {
"encrypt" : {
"bsonType" : "string",
"algorithm" : encryption_mode,
"keyId" : [ key1 ]
}
},
"mobile" : { "bsonType" : "string" },
"email" : { "bsonType" : "string" },
}}
var keystore = db.getCollection("__keystore")
var clientSideFLEOptions = {
"kmsProviders" : {
"aws" : {
"accessKeyId" : env.KMSKID ,
"secretAccessKey" : env.KMSKEY
}
},
"schemas" : { patientSchema } ,
"keyVaultCollection" : keystore
}
encryptedSession = new Mongo("localhost",clientSideFLEOptions)
var keystore = db.getCollection("__keystore")
var clientSideFLEOptions = {
"kmsProviders" : {
"aws" : {
"accessKeyId" : env.KMSKID ,
"secretAccessKey" : env.KMSKEY
}
},
"schemas" : { patientSchema } ,
"keyVaultCollection" : keystore
}
encryptedSession = new Mongo("localhost",clientSideFLEOptions)
var encryptedDb = encryptedSession.getDB("test");
encryptedSession.getKeyStore().createKey(
"aws", env.KMSARN, ["key1"]
)
var keys = encryptedSession.getKeyStore().getKeys()
var key1 = keys.getKeyByAltName("key1")
Query on an unencrypted field
encryptedDb.patients.find({ "medRecNum" : 235498 })
Query on an unencrypted field
{
"firstName" : "Pat",
"lastName" : "Lee",
"medRecNum" : 235498,
"ssn" : "901-01-0001",
"mobile" : "212-555-1234",
"email" : "lee@example.com"
}
View to a client holding a valid key:
{
"firstName" : "Pat",
"lastName" : "Lee",
"medRecNum" : 235498,
"ssn" : BinData(6,"ASV2YBzOhUZZu643i7Y..."),
"mobile" : "212-555-1234",
"email" : "lee@example.com"
}
View to a client lacking a valid key:
{
"firstName" : "Pat",
"lastName" : "Lee",
"medRecNum" : 235498,
"ssn" : BinData(6,"ASV2YBzOhUZZu643i7Y..."),
"mobile" : "212-555-1234",
"email" : "lee@example.com"
}
View to legacy clients:
{
"firstName" : "Pat",
"lastName" : "Lee",
"medRecNum" : 235498,
"ssn" : BinData(6,"ASV2YBzOhUZZu643i7Y..."),
"mobile" : "212-555-1234",
"email" : "lee@example.com"
}
View to database administrator:
{
"firstName" : "Pat",
"lastName" : "Lee",
"medRecNum" : 235498,
"ssn" : BinData(6,"ASV2YBzOhUZZu643i7Y..."),
"mobile" : "212-555-1234",
"email" : "lee@example.com"
}
View to database, server memory, logs, backups:
Query on an encrypted field
encryptedDb.patients.find({ "ssn": "901-01-0001" })
Query on an encrypted field
encryptedDb.patients.find({ "ssn": "901-01-0001" })
Query on an encrypted field
encryptedDb.patients.find({ "ssn": "901-01-0001" })
encryptedDb.patients.find({ "ssn": BinData(6,"ASV2YBzOhUY…" )})
Query on an encrypted field
Quick Demo
MongoDB Client-Side Field-Level Encryption
Roadmap
▪ beta preview 4.2 rc2 available now – Java, Node.js & Shell fi
▪ additional language beta previews in coming weeks
▪ server support in Atlas via rc1+ preview
▪ 3rd party cryptography reviews in progress
▪ Docs & University – In Flight
MongoDB Client-Side Field-Level Encryption
Takeaways
▪ 4.2 introduces client-side field-level encryption
▪ designed for the most sensitive workloads
▪ enabled in all supported drivers on all supported platforms
▪ allows fields to be marked as encrypted, at the document-leve
MongoDB Client-Side Field-Level Encryption
Takeaways
▪ 4.2 introduces client-side field-level encryption
▪ designed for the most sensitive workloads
▪ enabled in all supported drivers on all supported platforms
▪ allows fields to be marked as encrypted, at the document-leve
▪ multiple enforcement options (client-side, server-side, or both)
▪ backwards compatible with existing admin & cluster tools
▪ EA/Atlas – automatic/transparent encryption (no app changes
▪ Community – explicit/manual encryption(requires app changes
Q&A
Thank You!

More Related Content

What's hot (20)

PPTX
What's new in MongoDB 2.6
Matias Cascallares
 
PDF
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB
 
PPTX
How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...
MongoDB
 
PPTX
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
MongoDB
 
PPTX
Introducing MongoDB Atlas
MongoDB
 
PPTX
MMS - Monitoring, backup and management at a single click
Matias Cascallares
 
PDF
MongoDB on Azure
Norberto Leite
 
PDF
Mongo db eveningschemadesign
MongoDB APAC
 
PPTX
Concurrency Control in MongoDB 3.0
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB
 
PDF
MongoDB Ops Manager + Kubernetes
MongoDB
 
PDF
Containerizing MongoDB with kubernetes
Brian McNamara
 
PPTX
Webinar: Enabling Microservices with Containers, Orchestration, and MongoDB
MongoDB
 
PDF
MongoDB WiredTiger Internals: Journey To Transactions
Mydbops
 
PPTX
MongoDB Internals
Siraj Memon
 
POTX
MongoDB Days Silicon Valley: A Technical Introduction to WiredTiger
MongoDB
 
PDF
MongoDB Introduction talk at Dr Dobbs Conference, MongoDB Evenings at Bangalo...
Prasoon Kumar
 
PPTX
Conceptos Avanzados 1: Motores de Almacenamiento
MongoDB
 
PDF
MongoDB World 2018: Transactions and Durability: Putting the “D” in ACID
MongoDB
 
PPTX
Beyond the Basics 1: Storage Engines
MongoDB
 
What's new in MongoDB 2.6
Matias Cascallares
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB
 
How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...
MongoDB
 
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
MongoDB
 
Introducing MongoDB Atlas
MongoDB
 
MMS - Monitoring, backup and management at a single click
Matias Cascallares
 
MongoDB on Azure
Norberto Leite
 
Mongo db eveningschemadesign
MongoDB APAC
 
Concurrency Control in MongoDB 3.0
MongoDB
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB
 
MongoDB Ops Manager + Kubernetes
MongoDB
 
Containerizing MongoDB with kubernetes
Brian McNamara
 
Webinar: Enabling Microservices with Containers, Orchestration, and MongoDB
MongoDB
 
MongoDB WiredTiger Internals: Journey To Transactions
Mydbops
 
MongoDB Internals
Siraj Memon
 
MongoDB Days Silicon Valley: A Technical Introduction to WiredTiger
MongoDB
 
MongoDB Introduction talk at Dr Dobbs Conference, MongoDB Evenings at Bangalo...
Prasoon Kumar
 
Conceptos Avanzados 1: Motores de Almacenamiento
MongoDB
 
MongoDB World 2018: Transactions and Durability: Putting the “D” in ACID
MongoDB
 
Beyond the Basics 1: Storage Engines
MongoDB
 

Similar to MongoDB .local Bengaluru 2019: New Encryption Capabilities in MongoDB 4.2: A Deep Dive into Protecting Sensitive Workloads (20)

PDF
MongoDB World 2019: New Encryption Capabilities in MongoDB 4.2: A Deep Dive i...
MongoDB
 
PDF
MongoDB .local London 2019: New Encryption Capabilities in MongoDB 4.2: A Dee...
MongoDB
 
PPTX
Percona Live 2021 - MongoDB Security Features
Jean Da Silva
 
PDF
MongodB Internals
Norberto Leite
 
PPTX
Eagle6 Enterprise Situational Awareness
MongoDB
 
PPTX
Eagle6 mongo dc revised
MongoDB
 
PPTX
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
MongoDB
 
PDF
MongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDB
MongoDB
 
PDF
Achieving compliance With MongoDB Security
Mydbops
 
PDF
Gartner Security & Risk Management Summit 2018
Paula Januszkiewicz
 
PDF
MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...
MongoDB
 
PPTX
Securing Your MongoDB Deployment
MongoDB
 
PPTX
Securing Your MongoDB Deployment
MongoDB
 
PPTX
It's a Dangerous World
MongoDB
 
PPTX
Securing Your Enterprise Web Apps with MongoDB Enterprise
MongoDB
 
PDF
Derbycon - The Unintended Risks of Trusting Active Directory
Will Schroeder
 
PDF
Enterprise Cloud Security
MongoDB
 
PPTX
Webinar: Securing your data - Mitigating the risks with MongoDB
MongoDB
 
PPTX
MongoDB Days UK: Securing Your Deployment with MongoDB Enterprise
MongoDB
 
PPTX
Securing Your Deployment with MongoDB Enterprise
MongoDB
 
MongoDB World 2019: New Encryption Capabilities in MongoDB 4.2: A Deep Dive i...
MongoDB
 
MongoDB .local London 2019: New Encryption Capabilities in MongoDB 4.2: A Dee...
MongoDB
 
Percona Live 2021 - MongoDB Security Features
Jean Da Silva
 
MongodB Internals
Norberto Leite
 
Eagle6 Enterprise Situational Awareness
MongoDB
 
Eagle6 mongo dc revised
MongoDB
 
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
MongoDB
 
MongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDB
MongoDB
 
Achieving compliance With MongoDB Security
Mydbops
 
Gartner Security & Risk Management Summit 2018
Paula Januszkiewicz
 
MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...
MongoDB
 
Securing Your MongoDB Deployment
MongoDB
 
Securing Your MongoDB Deployment
MongoDB
 
It's a Dangerous World
MongoDB
 
Securing Your Enterprise Web Apps with MongoDB Enterprise
MongoDB
 
Derbycon - The Unintended Risks of Trusting Active Directory
Will Schroeder
 
Enterprise Cloud Security
MongoDB
 
Webinar: Securing your data - Mitigating the risks with MongoDB
MongoDB
 
MongoDB Days UK: Securing Your Deployment with MongoDB Enterprise
MongoDB
 
Securing Your Deployment with MongoDB Enterprise
MongoDB
 
Ad

More from MongoDB (20)

PDF
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
PDF
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
PDF
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB
 
PDF
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB
 
PDF
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB
 
PDF
MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
PDF
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB
 
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB
 
PDF
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB
 
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB
 
PDF
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB
 
PDF
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB
 
PDF
MongoDB .local Paris 2020: Tout savoir sur le moteur de recherche Full Text S...
MongoDB
 
PDF
MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...
MongoDB
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB
 
MongoDB .local Paris 2020: Tout savoir sur le moteur de recherche Full Text S...
MongoDB
 
MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...
MongoDB
 
Ad

Recently uploaded (20)

PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 

MongoDB .local Bengaluru 2019: New Encryption Capabilities in MongoDB 4.2: A Deep Dive into Protecting Sensitive Workloads

  • 2. New encryption capabilities in MongoDB 4.2: A deep dive into protecting sensitive workloads Prasad Pillalamarri Technical Director, MongoDB Software India Private Limited
  • 3. New encryption capabilities in MongoDB 4.2: A deep dive into protecting sensitive workloads Agenda ▪ A brief history of database security ▪ Trust models: server vs. client ▪ Encrypting data-in-use ▪ Hands on deep dive ▪ Q&A
  • 4. A brief history of database security
  • 5. A brief history of database security Evolution ▪ access controls ▪ passwords ▪ plaintext > hashing > key derivation ▪ bearer tokens ▪ NTLM, Kerberos tickets, LDAP/S, SCRAM, web session
  • 6. A brief history of database security Evolution ▪ access controls ▪ passwords ▪ plaintext > hashing > key derivation ▪ bearer tokens ▪ NTLM, Kerberos tickets, LDAP/S, SCRAM, web session ▪ multi-factor auth ▪ LCD fobs / SMS / 2FA apps / FIDO-U2F / WebAuthn / mobile enclaves ▪ federated RBAC
  • 7. A brief history of database security Evolution ▪ network ▪ (plaintext) native wire protocols ▪ SSL encryption ▪ TLS ▪ TLS w/ PFS
  • 8. A brief history of database security Evolution ▪ storage ▪ volume-level / full disk encryption (FDE) ▪ BitLocker, DMCrypt, FileVault, encrypted EBS
  • 9. A brief history of database security Evolution ▪ storage ▪ volume-level / full disk encryption (FDE) ▪ BitLocker, DMCrypt, FileVault, encrypted EBS ▪ file-level encryption ▪ whole database ▪ per-database (WiredTiger ESE) ▪ tablespace ▪ database-level encryption ▪ column / field
  • 10. A brief history of database security These are all important defenses, but… What is the threat? Against whom/what are we defending? ▪ “hackers”? ▪ criminal blackhats? ▪ competitors? ▪ activists? ▪ unknown actors?
  • 11. A brief history of database security These are all important defenses, but… What is the threat? Against whom/what are we defending? ▪ “hackers”? ▪ criminal blackhats? ▪ competitors? ▪ activists? ▪ unknown actors? ▪ insiders? ▪ admins?
  • 12. The security model for many Prod databases
  • 13. A brief history of database security Every sector of the global economy has been impacted ▪ enterprise ▪ consumer tech ▪ retail ▪ government ▪ healthcare ▪ finance …
  • 14. A brief history of database security Major shifts in regulatory & privacy climate ▪ GDPR ▪ HIPAA ▪ PCI DSS ▪ NIST/FISMA ▪ Consumer protection ▪ State & provincial
  • 15. A brief history of database security System architect & developer security challenges Meeting legal/regulatory obligations ▪ Controls ▪ Audit/attestation Defending real-world attacks ▪ First Principles: C/I/A ▪ Separation of duties ▪ Access control ▪ Identifying & protecting sensitive data
  • 16. A brief history of database security System architects & develop security challenges Meeting legal/regulatory obligations ▪ Controls ▪ Audit/attestation Defending real-world attacks ▪ First Principles: C/I/A ▪ Separation of duties ▪ Access control ▪ Identifying & protecting sensitive data
  • 17. Trust models: server vs. client
  • 18. Trust models: server vs. client What is the source of trust? ▪ Traditionally, DB encryption has relied on server-side trust ▪ This has implications, many not so obvious ▪ With a few caveats, the database operator typically has unrestricted technical access, including: ▪ DBAs ▪ system admins ▪ hosting/infrastructure providers
  • 19. Trust models: server vs. client The fundamental challenge is protecting the confidentiality of data while it’s in use.
  • 21. Encrypting Data-in-Use Introducing MongoDB Client-Side Field-Level Encryption ▪ encryption as a first-class citizen ▪ modern, authenticated encryption algorithms
  • 22. Encrypting Data-in-Use Introducing MongoDB Client-Side Field-Level Encryption ▪ encryption as a first-class citizen ▪ modern, authenticated encryption algorithms ▪ strong security guarantees ▪ customer-managed keys ▪ content is opaque to server & server operator
  • 23. Encrypting Data-in-Use Introducing MongoDB Client-Side Field-Level Encryption ▪ major investment ▪ 2 years in the making ▪ 16+ engineers spanning core server, query, security, cloud, drivers ▪ targeting 12+ languages ▪ all major hardware & operating system platforms ▪ Linux, MacOS, Windows
  • 24. MongoDB Client-Side Field-Level Encryption Core design ▪ enabled in drivers ▪ drivers have expanded MQL awareness ▪ extends existing JSON Schema with new “encrypt” propert
  • 25. MongoDB Client-Side Field-Level Encryption Core design ▪ enabled in drivers ▪ drivers have expanded MQL awareness ▪ extends existing JSON Schema with new “encrypt” propert ▪ adds JSON Schema validation to the client ▪ individual fields within collections can be marked as encrypte ▪ keys can be used on a per-field, per-document basis
  • 26. MongoDB Client-Side Field-Level Encryption Cryptography ▪ multiple encryption options, including deterministic search ▪ cloud key services are natively integrated ▪ modern authenticated encryption with AES-256 & SHA-2 ▪ AEAD_AES_CBC_HMAC_SHA512 (2015 IETF draft: McGrew, Foley, Paterson)
  • 27. MongoDB Client-Side Field-Level Encryption Cryptography ▪ multiple encryption options, including deterministic search ▪ cloud key services are natively integrated ▪ modern authenticated encryption with AES-256 & SHA-2 ▪ AEAD_AES_CBC_HMAC_SHA512 (2015 IETF draft: McGrew, Foley, Paterson) ▪ abuse-resistant derived deterministic IVs ▪ native OS libraries used for crypto primitives
  • 28. MongoDB Client-Side Field-Level Encryption Developer view ▪ new JSON Schema attribute “encrypt” ▪ schema validation extended to the client/application ▪ key management services integrated into drivers
  • 29. MongoDB Client-Side Field-Level Encryption Developer view ▪ new JSON Schema attribute “encrypt” ▪ schema validation extended to the client/application ▪ key management services integrated into drivers ▪ driver generates secure request for field keys ▪ all encryption/decryption is done in the driver (on the client) ▪ server only sees encrypted binary data (BinData subtype-6)
  • 30. MongoDB Client-Side Field-Level Encryption How does it work?
  • 31. MongoDB Client-Side Field-Level Encryption { firstName: "Pat", lastName: "Lee", ssn: "901-01-0001", email: "[email protected]", mobile: "+1-212-555-1234", medRecNum: 235498 } { firstName: "Pat", lastName: "Lee", ! ssn: "r6EaUcgZ4lGw…", ! email: "K4b5U3TlcIXh…", ! mobile: "oR72CW4Wf5Ej…", medRecNum: 235498 } View from application View from database (admin, server, DB logs, process memory)
  • 33. Let’s look at some code
  • 34. "test.patients" : { "bsonType" : "object", "properties" : { "medRecNum" : { "bsonType" : "int" }, "firstName" : { "bsonType" : "string" }, "lastName" : { "bsonType" : "string" }, "ssn" : { "encrypt" : { "bsonType" : "string", "algorithm" : encryption_mode, "keyId" : [ key1 ] } }, "mobile" : { "bsonType" : "string" }, "email" : { "bsonType" : "string" }, }}
  • 35. "test.patients" : { "bsonType" : "object", "properties" : { "medRecNum" : { "bsonType" : "int" }, "firstName" : { "bsonType" : "string" }, "lastName" : { "bsonType" : "string" }, "ssn" : { "encrypt" : { "bsonType" : "string", "algorithm" : encryption_mode, "keyId" : [ key1 ] } }, "mobile" : { "bsonType" : "string" }, "email" : { "bsonType" : "string" }, }}
  • 36. "test.patients" : { "bsonType" : "object", "properties" : { "medRecNum" : { "bsonType" : "int" }, "firstName" : { "bsonType" : "string" }, "lastName" : { "bsonType" : "string" }, "ssn" : { "encrypt" : { "bsonType" : "string", "algorithm" : encryption_mode, "keyId" : [ key1 ] } }, "mobile" : { "bsonType" : "string" }, "email" : { "bsonType" : "string" }, }}
  • 37. var keystore = db.getCollection("__keystore") var clientSideFLEOptions = { "kmsProviders" : { "aws" : { "accessKeyId" : env.KMSKID , "secretAccessKey" : env.KMSKEY } }, "schemas" : { patientSchema } , "keyVaultCollection" : keystore } encryptedSession = new Mongo("localhost",clientSideFLEOptions)
  • 38. var keystore = db.getCollection("__keystore") var clientSideFLEOptions = { "kmsProviders" : { "aws" : { "accessKeyId" : env.KMSKID , "secretAccessKey" : env.KMSKEY } }, "schemas" : { patientSchema } , "keyVaultCollection" : keystore } encryptedSession = new Mongo("localhost",clientSideFLEOptions)
  • 39. var encryptedDb = encryptedSession.getDB("test"); encryptedSession.getKeyStore().createKey( "aws", env.KMSARN, ["key1"] ) var keys = encryptedSession.getKeyStore().getKeys() var key1 = keys.getKeyByAltName("key1")
  • 40. Query on an unencrypted field
  • 41. encryptedDb.patients.find({ "medRecNum" : 235498 }) Query on an unencrypted field
  • 42. { "firstName" : "Pat", "lastName" : "Lee", "medRecNum" : 235498, "ssn" : "901-01-0001", "mobile" : "212-555-1234", "email" : "[email protected]" } View to a client holding a valid key:
  • 43. { "firstName" : "Pat", "lastName" : "Lee", "medRecNum" : 235498, "ssn" : BinData(6,"ASV2YBzOhUZZu643i7Y..."), "mobile" : "212-555-1234", "email" : "[email protected]" } View to a client lacking a valid key:
  • 44. { "firstName" : "Pat", "lastName" : "Lee", "medRecNum" : 235498, "ssn" : BinData(6,"ASV2YBzOhUZZu643i7Y..."), "mobile" : "212-555-1234", "email" : "[email protected]" } View to legacy clients:
  • 45. { "firstName" : "Pat", "lastName" : "Lee", "medRecNum" : 235498, "ssn" : BinData(6,"ASV2YBzOhUZZu643i7Y..."), "mobile" : "212-555-1234", "email" : "[email protected]" } View to database administrator:
  • 46. { "firstName" : "Pat", "lastName" : "Lee", "medRecNum" : 235498, "ssn" : BinData(6,"ASV2YBzOhUZZu643i7Y..."), "mobile" : "212-555-1234", "email" : "[email protected]" } View to database, server memory, logs, backups:
  • 47. Query on an encrypted field
  • 48. encryptedDb.patients.find({ "ssn": "901-01-0001" }) Query on an encrypted field
  • 49. encryptedDb.patients.find({ "ssn": "901-01-0001" }) Query on an encrypted field
  • 50. encryptedDb.patients.find({ "ssn": "901-01-0001" }) encryptedDb.patients.find({ "ssn": BinData(6,"ASV2YBzOhUY…" )}) Query on an encrypted field
  • 52. MongoDB Client-Side Field-Level Encryption Roadmap ▪ beta preview 4.2 rc2 available now – Java, Node.js & Shell fi ▪ additional language beta previews in coming weeks ▪ server support in Atlas via rc1+ preview ▪ 3rd party cryptography reviews in progress ▪ Docs & University – In Flight
  • 53. MongoDB Client-Side Field-Level Encryption Takeaways ▪ 4.2 introduces client-side field-level encryption ▪ designed for the most sensitive workloads ▪ enabled in all supported drivers on all supported platforms ▪ allows fields to be marked as encrypted, at the document-leve
  • 54. MongoDB Client-Side Field-Level Encryption Takeaways ▪ 4.2 introduces client-side field-level encryption ▪ designed for the most sensitive workloads ▪ enabled in all supported drivers on all supported platforms ▪ allows fields to be marked as encrypted, at the document-leve ▪ multiple enforcement options (client-side, server-side, or both) ▪ backwards compatible with existing admin & cluster tools ▪ EA/Atlas – automatic/transparent encryption (no app changes ▪ Community – explicit/manual encryption(requires app changes
  • 55. Q&A