SlideShare a Scribd company logo
Who’s Helping Themselves To
Your Data?
Demystifying MongoDB’s Security Features
@TheDonester
#MDBE16
Complexity is the Enemy of Security
Security holes resulting from
misconfiguration?
Under ‘time-to-market’ pressures,
neglecting to apply a security layer
due to complexity?
@TheDonester
#MDBE16
Need Clearer Path To [Secure] Success
•  Technologies need to keep things
simple
•  Especially around Security
•  MongoDB’s security features are
orthogonal yet complimentary
•  Using one feature doesn’t require
learning and configuring all other
features
@TheDonester
#MDBE16
MongoDB DB-level Security
Standards-based
Minimal inter-dependencies
•  Authorization mandates Authentication, to
identify roles
•  Certificate-based Authentication mandates
In-Flight Encryption (TLS)
•  Client Authentication mandates Internal
Authentication
Authentication
At-Rest
Encryption
In-Flight
Encryption
AuthorizationAuditing
@TheDonester
#MDBE16
Quick reminder....
http://docs.mongodb.org/manual/administration/security-checklist/	
Ensure you consult MongoDB’s Security Checklist
Remember:
•  Apply security in layers, for defence in depth
•  Many of these layers are not MongoDB specific
@TheDonester
#MDBE16
MongoSecurityPlaypen
Github Project
NOT PRODUCTION SECURE
For learning/demoing purposes only
https://github.com/pkdone/MongoSecurityPlaypen	
@TheDonester
Authentication
@TheDonester
#MDBE16
Client Authentication Options
1. Challenge/Response (SCRAM-SHA-1)
2. LDAP (inc. Active Directory)
3. x.509 Certificate
4. Kerberos
Remote
Directory
Server
Username / Password
Username / Password
Authentication Service Request
(1)
(2)
(3)
Pre-
Established
Trust with
KDC
Local CA
Certificates
File
Key Distribution
Center (KDC)
Certificate
#MDBW16
Client Authentication Examples
SCRAM-SHA-1
LDAP
x.509 Certificate
Kerberos
FQDNs
@TheDonester
#MDBW16
LDAP Authentication Options
@TheDonester
LDAP Integration MongoDB Versions Operating Systems External Dependencies
Proxy 2. 6 + Linux Simple Authentication & Security Layer (SASL)
Direct 3. 4 + Linux & Windows n/a
DB Host Directory Host
Directory
Servermongod
saslauthd
proxy
direct
#MDBE16
Internal Authentication Options
MongoD
Replica
Host OS
Keyfile
MongoD
Replica
Keyfile
MongoD
Replica
Keyfile
Key Challenge
/ Response
Key Challenge
/ Response
Key Challenge
/ Response
MongoD
Replica
Key
+Cer
t
MongoD
Replica
MongoD
Replica
Host OS Host OS
x.509 Certificates
Host OS
Host OS Host OS
CA
Certs
CA
Certs
CA
Certs
Key
+Cer
t
Key
+Cer
t
@TheDonester
Key Files (SCRAM-SHA-1)
Authorization
(Role Based Access Control)
@TheDonester
#MDBE16
Role Based Access Control
Built-in roles
•  read, readWrite, dbAdmin,
clusterAdmin, root, etc..
User-defined roles
•  Based on actions that can be
defined for a resource
@TheDonester
#MDBE16
Defining & Using a Custom Role
Example: “Append-only” role
Define The Role & User Try Inserting & Querying Data
@TheDonester
#MDBW16
LDAP Authorization*
MongoDB Roles Mapped to LDAP Groups
@TheDonester
* New in 3.4
Role membership is fluid & managed
dynamically in the LDAP Directory
(rather than granting roles to users
in MongoDB)
LDAP Authorization is an optional feature,
if LDAP Direct Authentication is enabled
#MDBW16
Read-Only Views* + Roles
For Record-level Access Control
@TheDonester
Define a View (uses Agg Fwk) Lock Down User to Only the View
* New in 3.4
In-Flight Encryption
@TheDonester
#MDBE16
TLS (supersedes SSL)
CRUD API calls over TLS
Internal Traffic over TLS
CA Certificates File
Server Key &
Certificate PEM File
Server Machine 1
DriverClient Machine
CA Certificates File
CA Certificates File
Server Key &
Certificate PEM File
Server Machine 3
CA Certificates File
Server Key &
Certificate PEM File
Server Machine 2
@TheDonester
#MDBE16
TLS
•  Can apply to client traffic or internal traffic or both
•  Supported on all Drivers and MongoDB Tools
•  Client Certificate authentication not mandated
•  Any client and internal authentication methods can be used
•  Can even have authentication / authorization completely disabled
@TheDonester
At-Rest Encryption
@TheDonester
#MDBE16
Encrypted Storage Engine
•  Native encryption inside the database
•  Single-digit % overhead
•  Based on WiredTiger
•  Two Key Types for easy key rotation
•  Master Key per replica
•  Internal Key per database
•  Options for sourcing Master Key:
•  Via 3rd Party Key Management Appliance using KMIP
(Key Management Interoperability Protocol)
•  Keyfile on local file-system (not recommended for
Production)
@TheDonester
#MDBE16
Encryption-at-Rest with KMIP
3rd Party Key
Management
Appliance
Replica1 Host OS
DBa DBb DBc
Replica1’s Master Key
Replica2’s Master Key
Replica3’s Master Key
CA Certificates File
DBd
Internal Key Manager Keystore
(encrypted by Master Key)
DBa Key
DBb Key
DBc Key
DBd Key
Encrypts & Decrypts
Replica1 mongod
Replica1 Key &
Certificate PEM File
@TheDonester
#MDBE16
MongoDB Encryption-at-Rest
Symmetric Keys
•  Same key to encrypt & decrypt
•  AES256-CBC (256-bit AES Cipher Block Chaining mode)
•  AES256-GCM (256-bit AES Galois/Counter Mode)
•  FIPS 140-2 encryption option
Encryption Alternatives
•  Partner solution for file & OS level encryption (eg. Vormetric)
•  Application code performs field-level encryption
DEFAULT
BUT HOW TO INDEX?
@TheDonester
Auditing
@TheDonester
#MDBE16
Auditing
Audit log of actions taken
against the database
Configurable
Destination
@TheDonester
#MDBE16
Auditing Event Types
System Events CRUD Events
Default
(when enabled)
Enabling Config
Parameter
auditLog -
destination
setParameter –
auditAuthorizationSuccess
Event Types
DDL
Auth failures
Users & Roles config
Replication &Sharding config
Server Lifecycle actions
Inserts
Updates
Removes
Finds
Aggregations
@TheDonester
#MDBE16
Auditing Filters Are Key
•  Filter on attributes of captured audit documents
•  In config, set ‘auditFilter’ to a query expression
•  Filter on: Action, User, Role, Command, Database, Collection, etc
•  Examples:
filter:	'{atype:	{$in:	["createCollection",	"dropCollection"]}}‘	
filter:	‘{roles:	{role:	"readWrite",	db:	"test“}}‘	
filter:	'{atype:	"authCheck",	"param.command":	{$in:	["find",	"insert"]}}‘	
@TheDonester
Atlas Security
@TheDonester
#MDBE16
Atlas & Security
• SCRAM-SHA-1 authentication enforced
• TLS/SSL enforced
• Pre-defined roles against each database
• IP white-listing enforced
• VPC Peering option with application tier
• 2FA authentication for admin console
• Option for encrypted data volumes
@TheDonester
Summary
@TheDonester
#MDBE16
Summary
• MongoDB keeps things simple
•  Clearly separates out different security
concerns
• Reduce complexity
•  Decreases risk of security holes
• Remember to Consult the MongoDB
Security Checklist!
@TheDonester
paul.done@mongodb.com
@TheDonester
Appendices
@TheDonester
Extended Extras
@TheDonester
#MDBW16
Client Authentication Comparisons
Authentication Method Clear Text Password Identity Location
Challenge/Response
(SCRAM-SHA-1)
No (Digest) Internal
x.509 Certificate No (Digital Signature) External
LDAP Yes * External
Kerberos
No (KDC generated session key
encrypted with password)
External
* Can be protected via a transport-level security mechanism
@TheDonester
#MDBE16
Internal Authentication Comparisons
•  x.509 Cert Auth mandates use of TLS/SSL
•  Keyfile Auth can be used with TLS/SSL
•  x.509 Cert Auth has smaller attack surface area
•  No need for a ‘shared secret’
•  x.509 Cert Auth allows for centralized key management
@TheDonester
#MDBE16
TLS & FIPS 140-2
US government security standard to accredit cryptographic modules
•  OpenSSL “FIPS Object Module”
•  Certified component optionally used via
OpenSSL
•  Ensures source code not tampered with
(checks signature against original certified
version)
•  MongoDB configurable option
FIPSMode:	true	
•  Also applies to Encryption-at-Rest
FIPS 140-2 : Federal Information Processing Standard (FIPS) Publication 140-2
@TheDonester
Log Redaction
@TheDonester
#MDBE16
Log Redaction*
Redact Client Data Shown in System Log Files
@TheDonester
• All potentially sensitive user data omitted from logs
Vs
• Harder to diagnose system & performance issues
* New in 3.4
Trade-off:
Diagram Source Graphics
@TheDonester
Python Client
Application
client VM
centralit VM
OpenLDAP Server
Py KMIP Server
MIT Kerberos KDC
dbnode1 VM
dbnode2 VM
dbnode3 VM
MongoDBReplicaSet mongod
mongod
mongod

More Related Content

What's hot (20)

PPTX
Tutorial: Building Your First App with MongoDB Stitch
MongoDB
 
PPTX
Webinar: Elevate Your Enterprise Architecture with In-Memory Computing
MongoDB
 
PDF
MongoDB Atlas Workshop - Singapore
Ashnikbiz
 
PPTX
MongoDB Evenings Minneapolis: MongoDB is Cool But When Should I Use It?
MongoDB
 
PDF
MongoDB .local Chicago 2019: Practical Data Modeling for MongoDB: Tutorial
MongoDB
 
PPTX
Introduction to MongoDB
MongoDB
 
PPTX
Webinar: Best Practices for Getting Started with MongoDB
MongoDB
 
PDF
MongoDB Europe 2016 - MongoDB 3.4 preview and introduction to MongoDB Atlas
MongoDB
 
PPTX
MongoDB Days Silicon Valley: Introducing MongoDB 3.2
MongoDB
 
PDF
MongoDB .local Paris 2020: Tout savoir sur le moteur de recherche Full Text S...
MongoDB
 
PPTX
eHarmony - Messaging Platform with MongoDB Atlas
MongoDB
 
PPTX
Database Trends for Modern Applications: Why the Database You Choose Matters
MongoDB
 
PPTX
MongoDB + Spring
Norberto Leite
 
PPTX
Jumpstart: Introduction to Schema Design
MongoDB
 
PDF
Advanced Schema Design Patterns
MongoDB
 
PDF
MongoDB .local Munich 2019: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB
 
PDF
MongoDB .local Toronto 2019: MongoDB Atlas Search Deep Dive
MongoDB
 
PDF
MongoDB .local Toronto 2019: MongoDB – Powering the new age data demands
MongoDB
 
PDF
How To Connect Spark To Your Own Datasource
MongoDB
 
PDF
MongoDB .local Chicago 2019: Using MongoDB Transactions to Implement Cryptogr...
MongoDB
 
Tutorial: Building Your First App with MongoDB Stitch
MongoDB
 
Webinar: Elevate Your Enterprise Architecture with In-Memory Computing
MongoDB
 
MongoDB Atlas Workshop - Singapore
Ashnikbiz
 
MongoDB Evenings Minneapolis: MongoDB is Cool But When Should I Use It?
MongoDB
 
MongoDB .local Chicago 2019: Practical Data Modeling for MongoDB: Tutorial
MongoDB
 
Introduction to MongoDB
MongoDB
 
Webinar: Best Practices for Getting Started with MongoDB
MongoDB
 
MongoDB Europe 2016 - MongoDB 3.4 preview and introduction to MongoDB Atlas
MongoDB
 
MongoDB Days Silicon Valley: Introducing MongoDB 3.2
MongoDB
 
MongoDB .local Paris 2020: Tout savoir sur le moteur de recherche Full Text S...
MongoDB
 
eHarmony - Messaging Platform with MongoDB Atlas
MongoDB
 
Database Trends for Modern Applications: Why the Database You Choose Matters
MongoDB
 
MongoDB + Spring
Norberto Leite
 
Jumpstart: Introduction to Schema Design
MongoDB
 
Advanced Schema Design Patterns
MongoDB
 
MongoDB .local Munich 2019: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB
 
MongoDB .local Toronto 2019: MongoDB Atlas Search Deep Dive
MongoDB
 
MongoDB .local Toronto 2019: MongoDB – Powering the new age data demands
MongoDB
 
How To Connect Spark To Your Own Datasource
MongoDB
 
MongoDB .local Chicago 2019: Using MongoDB Transactions to Implement Cryptogr...
MongoDB
 

Viewers also liked (20)

PDF
MongoDB Europe 2016 - ETL for Pros – Getting Data Into MongoDB The Right Way
MongoDB
 
PDF
MongoDB Europe 2016 - Distributed Ledgers, Blockchain + MongoDB
MongoDB
 
PDF
MongoDB Europe 2016 - Star in a Reasonably Priced Car - Which Driver is Best?
MongoDB
 
PDF
MongoDB Europe 2016 - MongoDB Atlas
MongoDB
 
PPTX
L’architettura di Classe Enterprise di Nuova Generazione
MongoDB
 
PDF
MongoDB Europe 2016 - Building WiredTiger
MongoDB
 
PDF
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...
MongoDB
 
PDF
MongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and Kafka
MongoDB
 
PDF
Mongo db data-models guide
Deysi Gmarra
 
PPTX
Past, Present and Future of Data Processing in Apache Hadoop
Codemotion
 
PPTX
Lambda Architecture in Practice
Navneet kumar
 
PDF
MongoDB Europe 2016 - The Rise of the Data Lake
MongoDB
 
PPT
My other computer is a datacentre - 2012 edition
Steve Loughran
 
PDF
MongoDB Europe 2016 - Warehousing MongoDB Data using Apache Beam and BigQuery
MongoDB
 
PPTX
Unlocking Operational Intelligence from the Data Lake
MongoDB
 
PPTX
Lambda Architecture: The Best Way to Build Scalable and Reliable Applications!
Tugdual Grall
 
PDF
MongoDB Europe 2016 - MongoDB, Ops Manager & Docker at SNCF
MongoDB
 
PDF
MongoDB Launchpad 2016: Moving Cybersecurity to the Cloud
MongoDB
 
PDF
MongoDB Europe 2016 - Using MongoDB to Build a Fast and Scalable Content Repo...
MongoDB
 
PDF
MongoDB Europe 2016 - Advanced MongoDB Aggregation Pipelines
MongoDB
 
MongoDB Europe 2016 - ETL for Pros – Getting Data Into MongoDB The Right Way
MongoDB
 
MongoDB Europe 2016 - Distributed Ledgers, Blockchain + MongoDB
MongoDB
 
MongoDB Europe 2016 - Star in a Reasonably Priced Car - Which Driver is Best?
MongoDB
 
MongoDB Europe 2016 - MongoDB Atlas
MongoDB
 
L’architettura di Classe Enterprise di Nuova Generazione
MongoDB
 
MongoDB Europe 2016 - Building WiredTiger
MongoDB
 
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...
MongoDB
 
MongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and Kafka
MongoDB
 
Mongo db data-models guide
Deysi Gmarra
 
Past, Present and Future of Data Processing in Apache Hadoop
Codemotion
 
Lambda Architecture in Practice
Navneet kumar
 
MongoDB Europe 2016 - The Rise of the Data Lake
MongoDB
 
My other computer is a datacentre - 2012 edition
Steve Loughran
 
MongoDB Europe 2016 - Warehousing MongoDB Data using Apache Beam and BigQuery
MongoDB
 
Unlocking Operational Intelligence from the Data Lake
MongoDB
 
Lambda Architecture: The Best Way to Build Scalable and Reliable Applications!
Tugdual Grall
 
MongoDB Europe 2016 - MongoDB, Ops Manager & Docker at SNCF
MongoDB
 
MongoDB Launchpad 2016: Moving Cybersecurity to the Cloud
MongoDB
 
MongoDB Europe 2016 - Using MongoDB to Build a Fast and Scalable Content Repo...
MongoDB
 
MongoDB Europe 2016 - Advanced MongoDB Aggregation Pipelines
MongoDB
 
Ad

Similar to MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying MongoDB’s Security Capabilities (20)

PPTX
Percona Live 2021 - MongoDB Security Features
Jean Da Silva
 
PPTX
Beyond the Basics 4: How to secure your MongoDB database
MongoDB
 
PPTX
Securing Your MongoDB Deployment
MongoDB
 
PPTX
Beyond the Basics 4 MongoDB Security and Authentication
MongoDB
 
PPTX
Securing Your Enterprise Web Apps with MongoDB Enterprise
MongoDB
 
PDF
Achieving compliance With MongoDB Security
Mydbops
 
PPTX
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
MongoDB
 
PDF
MongoDB .local Bengaluru 2019: New Encryption Capabilities in MongoDB 4.2: A ...
MongoDB
 
PPTX
Securing Your MongoDB Deployment
MongoDB
 
PDF
MongoDB World 2019: New Encryption Capabilities in MongoDB 4.2: A Deep Dive i...
MongoDB
 
PDF
MongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDB
MongoDB
 
PPTX
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
MongoDB
 
PDF
DEF CON 24 - workshop - Craig Young - brainwashing embedded systems
Felipe Prado
 
PDF
MongoDB .local London 2019: New Encryption Capabilities in MongoDB 4.2: A Dee...
MongoDB
 
PDF
MongoDB World 2019: MongoDB Atlas Security 101 for Developers
MongoDB
 
PDF
Gartner Security & Risk Management Summit 2018
Paula Januszkiewicz
 
PPTX
Webinar: Securing your data - Mitigating the risks with MongoDB
MongoDB
 
PDF
Thick Application Penetration Testing - A Crash Course
NetSPI
 
PPT
SQL Server 2008 Security Overview
ukdpe
 
PPTX
SSecuring Your MongoDB Deployment
MongoDB
 
Percona Live 2021 - MongoDB Security Features
Jean Da Silva
 
Beyond the Basics 4: How to secure your MongoDB database
MongoDB
 
Securing Your MongoDB Deployment
MongoDB
 
Beyond the Basics 4 MongoDB Security and Authentication
MongoDB
 
Securing Your Enterprise Web Apps with MongoDB Enterprise
MongoDB
 
Achieving compliance With MongoDB Security
Mydbops
 
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
MongoDB
 
MongoDB .local Bengaluru 2019: New Encryption Capabilities in MongoDB 4.2: A ...
MongoDB
 
Securing Your MongoDB Deployment
MongoDB
 
MongoDB World 2019: New Encryption Capabilities in MongoDB 4.2: A Deep Dive i...
MongoDB
 
MongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDB
MongoDB
 
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
MongoDB
 
DEF CON 24 - workshop - Craig Young - brainwashing embedded systems
Felipe Prado
 
MongoDB .local London 2019: New Encryption Capabilities in MongoDB 4.2: A Dee...
MongoDB
 
MongoDB World 2019: MongoDB Atlas Security 101 for Developers
MongoDB
 
Gartner Security & Risk Management Summit 2018
Paula Januszkiewicz
 
Webinar: Securing your data - Mitigating the risks with MongoDB
MongoDB
 
Thick Application Penetration Testing - A Crash Course
NetSPI
 
SQL Server 2008 Security Overview
ukdpe
 
SSecuring Your MongoDB Deployment
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: Using MongoDB Services in Kubernetes: Any Platform, Devel...
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: Using MongoDB Services in Kubernetes: any ...
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
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
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: Using MongoDB Services in Kubernetes: any ...
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
 

Recently uploaded (20)

PPTX
Aict presentation on dpplppp sjdhfh.pptx
vabaso5932
 
PDF
apidays Helsinki & North 2025 - APIs in the healthcare sector: hospitals inte...
apidays
 
PDF
AUDITABILITY & COMPLIANCE OF AI SYSTEMS IN HEALTHCARE
GAHI Youssef
 
PDF
Copia de Strategic Roadmap Infographics by Slidesgo.pptx (1).pdf
ssuserd4c6911
 
PDF
What does good look like - CRAP Brighton 8 July 2025
Jan Kierzyk
 
PPTX
apidays Singapore 2025 - Designing for Change, Julie Schiller (Google)
apidays
 
PPTX
apidays Helsinki & North 2025 - API access control strategies beyond JWT bear...
apidays
 
PDF
Avatar for apidays apidays PRO June 07, 2025 0 5 apidays Helsinki & North 2...
apidays
 
PPTX
apidays Munich 2025 - Building Telco-Aware Apps with Open Gateway APIs, Subhr...
apidays
 
PPTX
apidays Munich 2025 - Building an AWS Serverless Application with Terraform, ...
apidays
 
PPTX
recruitment Presentation.pptxhdhshhshshhehh
devraj40467
 
PPTX
Advanced_NLP_with_Transformers_PPT_final 50.pptx
Shiwani Gupta
 
PDF
Product Management in HealthTech (Case Studies from SnappDoctor)
Hamed Shams
 
PDF
Merits and Demerits of DBMS over File System & 3-Tier Architecture in DBMS
MD RIZWAN MOLLA
 
PPTX
The _Operations_on_Functions_Addition subtruction Multiplication and Division...
mdregaspi24
 
PPTX
AI Presentation Tool Pitch Deck Presentation.pptx
ShyamPanthavoor1
 
PPTX
apidays Helsinki & North 2025 - Vero APIs - Experiences of API development in...
apidays
 
PPTX
b6057ea5-8e8c-4415-90c0-ed8e9666ffcd.pptx
Anees487379
 
PPTX
GenAI-Introduction-to-Copilot-for-Bing-March-2025-FOR-HUB.pptx
cleydsonborges1
 
PPTX
ER_Model_Relationship_in_DBMS_Presentation.pptx
dharaadhvaryu1992
 
Aict presentation on dpplppp sjdhfh.pptx
vabaso5932
 
apidays Helsinki & North 2025 - APIs in the healthcare sector: hospitals inte...
apidays
 
AUDITABILITY & COMPLIANCE OF AI SYSTEMS IN HEALTHCARE
GAHI Youssef
 
Copia de Strategic Roadmap Infographics by Slidesgo.pptx (1).pdf
ssuserd4c6911
 
What does good look like - CRAP Brighton 8 July 2025
Jan Kierzyk
 
apidays Singapore 2025 - Designing for Change, Julie Schiller (Google)
apidays
 
apidays Helsinki & North 2025 - API access control strategies beyond JWT bear...
apidays
 
Avatar for apidays apidays PRO June 07, 2025 0 5 apidays Helsinki & North 2...
apidays
 
apidays Munich 2025 - Building Telco-Aware Apps with Open Gateway APIs, Subhr...
apidays
 
apidays Munich 2025 - Building an AWS Serverless Application with Terraform, ...
apidays
 
recruitment Presentation.pptxhdhshhshshhehh
devraj40467
 
Advanced_NLP_with_Transformers_PPT_final 50.pptx
Shiwani Gupta
 
Product Management in HealthTech (Case Studies from SnappDoctor)
Hamed Shams
 
Merits and Demerits of DBMS over File System & 3-Tier Architecture in DBMS
MD RIZWAN MOLLA
 
The _Operations_on_Functions_Addition subtruction Multiplication and Division...
mdregaspi24
 
AI Presentation Tool Pitch Deck Presentation.pptx
ShyamPanthavoor1
 
apidays Helsinki & North 2025 - Vero APIs - Experiences of API development in...
apidays
 
b6057ea5-8e8c-4415-90c0-ed8e9666ffcd.pptx
Anees487379
 
GenAI-Introduction-to-Copilot-for-Bing-March-2025-FOR-HUB.pptx
cleydsonborges1
 
ER_Model_Relationship_in_DBMS_Presentation.pptx
dharaadhvaryu1992
 

MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying MongoDB’s Security Capabilities

  • 1. Who’s Helping Themselves To Your Data? Demystifying MongoDB’s Security Features @TheDonester
  • 2. #MDBE16 Complexity is the Enemy of Security Security holes resulting from misconfiguration? Under ‘time-to-market’ pressures, neglecting to apply a security layer due to complexity? @TheDonester
  • 3. #MDBE16 Need Clearer Path To [Secure] Success •  Technologies need to keep things simple •  Especially around Security •  MongoDB’s security features are orthogonal yet complimentary •  Using one feature doesn’t require learning and configuring all other features @TheDonester
  • 4. #MDBE16 MongoDB DB-level Security Standards-based Minimal inter-dependencies •  Authorization mandates Authentication, to identify roles •  Certificate-based Authentication mandates In-Flight Encryption (TLS) •  Client Authentication mandates Internal Authentication Authentication At-Rest Encryption In-Flight Encryption AuthorizationAuditing @TheDonester
  • 5. #MDBE16 Quick reminder.... http://docs.mongodb.org/manual/administration/security-checklist/ Ensure you consult MongoDB’s Security Checklist Remember: •  Apply security in layers, for defence in depth •  Many of these layers are not MongoDB specific @TheDonester
  • 6. #MDBE16 MongoSecurityPlaypen Github Project NOT PRODUCTION SECURE For learning/demoing purposes only https://github.com/pkdone/MongoSecurityPlaypen @TheDonester
  • 8. #MDBE16 Client Authentication Options 1. Challenge/Response (SCRAM-SHA-1) 2. LDAP (inc. Active Directory) 3. x.509 Certificate 4. Kerberos Remote Directory Server Username / Password Username / Password Authentication Service Request (1) (2) (3) Pre- Established Trust with KDC Local CA Certificates File Key Distribution Center (KDC) Certificate
  • 9. #MDBW16 Client Authentication Examples SCRAM-SHA-1 LDAP x.509 Certificate Kerberos FQDNs @TheDonester
  • 10. #MDBW16 LDAP Authentication Options @TheDonester LDAP Integration MongoDB Versions Operating Systems External Dependencies Proxy 2. 6 + Linux Simple Authentication & Security Layer (SASL) Direct 3. 4 + Linux & Windows n/a DB Host Directory Host Directory Servermongod saslauthd proxy direct
  • 11. #MDBE16 Internal Authentication Options MongoD Replica Host OS Keyfile MongoD Replica Keyfile MongoD Replica Keyfile Key Challenge / Response Key Challenge / Response Key Challenge / Response MongoD Replica Key +Cer t MongoD Replica MongoD Replica Host OS Host OS x.509 Certificates Host OS Host OS Host OS CA Certs CA Certs CA Certs Key +Cer t Key +Cer t @TheDonester Key Files (SCRAM-SHA-1)
  • 12. Authorization (Role Based Access Control) @TheDonester
  • 13. #MDBE16 Role Based Access Control Built-in roles •  read, readWrite, dbAdmin, clusterAdmin, root, etc.. User-defined roles •  Based on actions that can be defined for a resource @TheDonester
  • 14. #MDBE16 Defining & Using a Custom Role Example: “Append-only” role Define The Role & User Try Inserting & Querying Data @TheDonester
  • 15. #MDBW16 LDAP Authorization* MongoDB Roles Mapped to LDAP Groups @TheDonester * New in 3.4 Role membership is fluid & managed dynamically in the LDAP Directory (rather than granting roles to users in MongoDB) LDAP Authorization is an optional feature, if LDAP Direct Authentication is enabled
  • 16. #MDBW16 Read-Only Views* + Roles For Record-level Access Control @TheDonester Define a View (uses Agg Fwk) Lock Down User to Only the View * New in 3.4
  • 18. #MDBE16 TLS (supersedes SSL) CRUD API calls over TLS Internal Traffic over TLS CA Certificates File Server Key & Certificate PEM File Server Machine 1 DriverClient Machine CA Certificates File CA Certificates File Server Key & Certificate PEM File Server Machine 3 CA Certificates File Server Key & Certificate PEM File Server Machine 2 @TheDonester
  • 19. #MDBE16 TLS •  Can apply to client traffic or internal traffic or both •  Supported on all Drivers and MongoDB Tools •  Client Certificate authentication not mandated •  Any client and internal authentication methods can be used •  Can even have authentication / authorization completely disabled @TheDonester
  • 21. #MDBE16 Encrypted Storage Engine •  Native encryption inside the database •  Single-digit % overhead •  Based on WiredTiger •  Two Key Types for easy key rotation •  Master Key per replica •  Internal Key per database •  Options for sourcing Master Key: •  Via 3rd Party Key Management Appliance using KMIP (Key Management Interoperability Protocol) •  Keyfile on local file-system (not recommended for Production) @TheDonester
  • 22. #MDBE16 Encryption-at-Rest with KMIP 3rd Party Key Management Appliance Replica1 Host OS DBa DBb DBc Replica1’s Master Key Replica2’s Master Key Replica3’s Master Key CA Certificates File DBd Internal Key Manager Keystore (encrypted by Master Key) DBa Key DBb Key DBc Key DBd Key Encrypts & Decrypts Replica1 mongod Replica1 Key & Certificate PEM File @TheDonester
  • 23. #MDBE16 MongoDB Encryption-at-Rest Symmetric Keys •  Same key to encrypt & decrypt •  AES256-CBC (256-bit AES Cipher Block Chaining mode) •  AES256-GCM (256-bit AES Galois/Counter Mode) •  FIPS 140-2 encryption option Encryption Alternatives •  Partner solution for file & OS level encryption (eg. Vormetric) •  Application code performs field-level encryption DEFAULT BUT HOW TO INDEX? @TheDonester
  • 25. #MDBE16 Auditing Audit log of actions taken against the database Configurable Destination @TheDonester
  • 26. #MDBE16 Auditing Event Types System Events CRUD Events Default (when enabled) Enabling Config Parameter auditLog - destination setParameter – auditAuthorizationSuccess Event Types DDL Auth failures Users & Roles config Replication &Sharding config Server Lifecycle actions Inserts Updates Removes Finds Aggregations @TheDonester
  • 27. #MDBE16 Auditing Filters Are Key •  Filter on attributes of captured audit documents •  In config, set ‘auditFilter’ to a query expression •  Filter on: Action, User, Role, Command, Database, Collection, etc •  Examples: filter: '{atype: {$in: ["createCollection", "dropCollection"]}}‘ filter: ‘{roles: {role: "readWrite", db: "test“}}‘ filter: '{atype: "authCheck", "param.command": {$in: ["find", "insert"]}}‘ @TheDonester
  • 29. #MDBE16 Atlas & Security • SCRAM-SHA-1 authentication enforced • TLS/SSL enforced • Pre-defined roles against each database • IP white-listing enforced • VPC Peering option with application tier • 2FA authentication for admin console • Option for encrypted data volumes @TheDonester
  • 31. #MDBE16 Summary • MongoDB keeps things simple •  Clearly separates out different security concerns • Reduce complexity •  Decreases risk of security holes • Remember to Consult the MongoDB Security Checklist! @TheDonester
  • 35. #MDBW16 Client Authentication Comparisons Authentication Method Clear Text Password Identity Location Challenge/Response (SCRAM-SHA-1) No (Digest) Internal x.509 Certificate No (Digital Signature) External LDAP Yes * External Kerberos No (KDC generated session key encrypted with password) External * Can be protected via a transport-level security mechanism @TheDonester
  • 36. #MDBE16 Internal Authentication Comparisons •  x.509 Cert Auth mandates use of TLS/SSL •  Keyfile Auth can be used with TLS/SSL •  x.509 Cert Auth has smaller attack surface area •  No need for a ‘shared secret’ •  x.509 Cert Auth allows for centralized key management @TheDonester
  • 37. #MDBE16 TLS & FIPS 140-2 US government security standard to accredit cryptographic modules •  OpenSSL “FIPS Object Module” •  Certified component optionally used via OpenSSL •  Ensures source code not tampered with (checks signature against original certified version) •  MongoDB configurable option FIPSMode: true •  Also applies to Encryption-at-Rest FIPS 140-2 : Federal Information Processing Standard (FIPS) Publication 140-2 @TheDonester
  • 39. #MDBE16 Log Redaction* Redact Client Data Shown in System Log Files @TheDonester • All potentially sensitive user data omitted from logs Vs • Harder to diagnose system & performance issues * New in 3.4 Trade-off:
  • 41. Python Client Application client VM centralit VM OpenLDAP Server Py KMIP Server MIT Kerberos KDC dbnode1 VM dbnode2 VM dbnode3 VM MongoDBReplicaSet mongod mongod mongod