SlideShare a Scribd company logo
Securing Your MongoDB 
Deployment 
Andreas Nilsson 
Lead Security Engineer, MongoDB
The Art of Securing a System 
“If you know the enemy and know yourself, 
you need not fear the result of a hundred battles. 
If you know yourself but not the enemy, 
for every victory gained you will also suffer a defeat. 
If you know neither the enemy nor yourself, 
you will succumb in every battle.” 
Sun Tzu, The Art of War 500 BC
Securing the Application: Agenda 
Securing a Database Access Control 
Data Protection Auditing
How can we make data accessible 
securely?
Timeline 
Plan and design security as early as possible. 
Design Implement Test Deploy 
YES! NO!
Designing the Infrastructure
Access Control 
Configure Authentication and Authorization. 
Design Implement Test Deploy
MongoDB configuration 
Authentication -Who are you in MongoDB? 
• Application user, administrator, backup job, 
monitoring agent. 
Authorization -What can you do in MongoDB? 
• CRUD operations, configure the database, 
manage sharding, user management.
Enable Authentication 
Built-in authentication methods 
• Password challenge response 
• x.509 certificates 
Or integrate with existing authentication infrastructure
Enable Access Control 
Design 
• Determine which types of users exist in the system. 
• Match the users to MongoDB roles. Create any 
customized roles. 
Deployment 
• Start/restart MongoDB with access control enabled. 
• Create the desired users.
Role Based Access Control 
Builtin roles 
• read, readWrite, dbAdmin, clusterAdmin, root, etc.. 
User defined roles 
• Customized roles based on existing roles and privileges.
Internal Authentication 
Server-server authentication use shared keyfile or x.509.
Sharding, upgrading and other fancy 
topics 
Users in a sharded system 
• live on the config servers, not the query routers (mongos) 
• local shard (replica set) users can still exist 
Users in 2.4 
• located in different DBs and in a different format than: 
Users in >= 2.6 
• all reside in the admin DB and hence are always 
replicated.
Field Level Redaction - $redact 
$redact 
• New aggregation framework operator 
• Conditionally filter user documents 
Use cases 
• Implement user-based document level, content filtering. 
• Create egress filter, redacting sensitive information.
Access Control - Field Level Redaction 
Note: Need to understand the application better
Data Protection 
Encrypting data in transit (SSL) and data at rest. 
Design Implement Test Deploy
Data Protection End to End
Transport Encryption with SSL 
• Possible to protect client-server, server-server communications with 
SSL. 
• Support for commercially and internally issued x.509 certificates 
• Possible to run the server in FIPS 140-2 mode. 
• Support for mixed SSL and non-SSL clusters. 
• Self-signed certificates provides no trust! 
• Omitting to provide a CA file to MongoDB disables validation!
Data Protection - Transport Encryption 
Encrypt communications (SSL) 
Authenticate connections (x.509)
Data Protection - Encryption at rest 
Alternatives 
• Encrypt data client side 
• Use partner or independent solution for file and OS level 
encryption
Security Auditing
The Audit Log 
• Security events can be written to either the console, the 
syslog 
or a file (JSON/BSON) 
• By default, all security events are written to audit log 
when enabled. 
• Events include Authentication failures and some 
commands. 
• Access control is not required for auditing. 
• They are separate components.
Audit Log Properties 
• Can filter based off of different criteria 
– Action Type, TimeFrame, IP Address/Port, Users 
• Events Have Total Order Per Connection 
• Audit Guarantees (AKA Writes/config) 
– Audit event written to disk BEFORE writing to the 
journal 
– A write will not complete before it has been audited
Some final tips…
Some tips along the way… 
1. Do not directly expose database servers to the Internet 
2. Design and configure access control 
3. Enable SSL 
4. Provide SSL CA files to the client and server as trust 
base 
5. Disable any unnecessary interfaces 
6. Lock down database files and minimize account 
privileges
What did we talk about? 
Securing a Database Access Control 
Data Protection Auditing
The Art of Securing a System 
“All men can see these tactics whereby I conquer, 
but what none can see is the strategy out of which victory 
is evolved.” 
Sun Tzu, The Art of War 500 BC
Next steps 
• MongoDB Security Manual - 
http://docs.mongodb.org/manual/core/security-introduction/ 
• MongoDB Security Whitepaper - 
http://info.mongodb.com/rs/mongodb/images/MongoDB_Security_Archi 
tecture_WP.pdf
Thank You 
Andreas Nilsson 
Lead Security Engineer, MongoDB

More Related Content

PDF
Microsoft Azure Security Infographic
PDF
Creating a Single View Part 3: Securing Your Deployment
PPTX
Webinar: Creating a Single View: Securing Your Deployment
ODP
Dos and Don'ts of Android Application Security (Security Professional Perspec...
PDF
07182013 Hacking Appliances: Ironic exploits in security products
PPTX
Tdswe 1810 learn how to create a secure and modern windows device
PPTX
Server 2008 Project
PDF
Hacker techniques for bypassing existing antivirus solutions & how to build a...
Microsoft Azure Security Infographic
Creating a Single View Part 3: Securing Your Deployment
Webinar: Creating a Single View: Securing Your Deployment
Dos and Don'ts of Android Application Security (Security Professional Perspec...
07182013 Hacking Appliances: Ironic exploits in security products
Tdswe 1810 learn how to create a secure and modern windows device
Server 2008 Project
Hacker techniques for bypassing existing antivirus solutions & how to build a...

What's hot (18)

PDF
Azure Penetration Testing
PDF
20 common security vulnerabilities and misconfiguration in Azure
PPTX
Understanding Database Encryption & Protecting Against the Insider Threat wit...
PDF
Implementing ossec
PDF
Ch 6: Attacking Authentication
PPTX
Introduction to WSO2 Microservices Framework for Java - MSF4J - WSO2Con Asia ...
PDF
CNIT 128 3. Attacking iOS Applications (Part 2)
PPTX
Oracle plsql code refactoring - from anonymous block to stored procedure
PPTX
WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)
PPT
Network Implementation and Support Lesson 14 Security Features - Eric Vande...
PDF
BlueHat v18 || Return of the kernel rootkit malware (on windows 10)
PDF
CNIT 123 Ch 8: OS Vulnerabilities
PDF
The Dark Side of PowerShell by George Dobrea
PPTX
Kåre Rude Andersen - Create a scombot – automate and monitor azure
PDF
UKC - Feb 2013 - Analyzing the security of Windows 7 and Linux for cloud comp...
PDF
Sami laiho - What's new in windows 8.1
PDF
Fuzzing and You: Automating Whitebox Testing
PDF
Modern Security Operations aka Secure DevOps @ All Day DevOps 2017
Azure Penetration Testing
20 common security vulnerabilities and misconfiguration in Azure
Understanding Database Encryption & Protecting Against the Insider Threat wit...
Implementing ossec
Ch 6: Attacking Authentication
Introduction to WSO2 Microservices Framework for Java - MSF4J - WSO2Con Asia ...
CNIT 128 3. Attacking iOS Applications (Part 2)
Oracle plsql code refactoring - from anonymous block to stored procedure
WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)
Network Implementation and Support Lesson 14 Security Features - Eric Vande...
BlueHat v18 || Return of the kernel rootkit malware (on windows 10)
CNIT 123 Ch 8: OS Vulnerabilities
The Dark Side of PowerShell by George Dobrea
Kåre Rude Andersen - Create a scombot – automate and monitor azure
UKC - Feb 2013 - Analyzing the security of Windows 7 and Linux for cloud comp...
Sami laiho - What's new in windows 8.1
Fuzzing and You: Automating Whitebox Testing
Modern Security Operations aka Secure DevOps @ All Day DevOps 2017
Ad

Viewers also liked (14)

PPTX
Ops Jumpstart: MongoDB Administration 101
PPTX
Indexing In MongoDB
PPTX
Replication and Replica Sets
PDF
Mongo db security guide
PPTX
MongoDB 2.4 Security Features
PPTX
Securing Your MongoDB Deployment
PPTX
MongoDB in a Mainframe World
PPTX
Securing Your MongoDB Implementation
PPT
Mongo Performance Optimization Using Indexing
PDF
Phplx mongodb
PPTX
Webinar: Architecting Secure and Compliant Applications with MongoDB
PPTX
Webinar: MongoDB 2.6 New Security Features
PPTX
Webinar: Performance Tuning + Optimization
PDF
MongoDB Administration 101
Ops Jumpstart: MongoDB Administration 101
Indexing In MongoDB
Replication and Replica Sets
Mongo db security guide
MongoDB 2.4 Security Features
Securing Your MongoDB Deployment
MongoDB in a Mainframe World
Securing Your MongoDB Implementation
Mongo Performance Optimization Using Indexing
Phplx mongodb
Webinar: Architecting Secure and Compliant Applications with MongoDB
Webinar: MongoDB 2.6 New Security Features
Webinar: Performance Tuning + Optimization
MongoDB Administration 101
Ad

Similar to SSecuring Your MongoDB Deployment (20)

PPTX
Securing Your MongoDB Deployment
PPTX
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
PPTX
Securing Your Deployment with MongoDB Enterprise
PPTX
MongoDB Days UK: Securing Your Deployment with MongoDB Enterprise
PDF
Achieving compliance With MongoDB Security
PPTX
Webinar: Securing your data - Mitigating the risks with MongoDB
PPTX
Securing Your MongoDB Deployment
PPTX
Percona Live 2021 - MongoDB Security Features
PPTX
Security Features in MongoDB 2.4
PPTX
MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...
PPTX
It's a Dangerous World
PPTX
Webinar: Compliance and Data Protection in the Big Data Age: MongoDB Security...
PDF
Mongo db 2.6_security_architecture
PDF
MongoDB World 2019: MongoDB Atlas Security 101 for Developers
PPTX
Beyond the Basics 4 MongoDB Security and Authentication
PPTX
Securing Your Enterprise Web Apps with MongoDB Enterprise
PPTX
Beyond the Basics 4: How to secure your MongoDB database
PPTX
Architecting Secure and Compliant Applications with MongoDB
PDF
MongoDB World 2019: New Encryption Capabilities in MongoDB 4.2: A Deep Dive i...
PDF
MongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDB
Securing Your MongoDB Deployment
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Securing Your Deployment with MongoDB Enterprise
MongoDB Days UK: Securing Your Deployment with MongoDB Enterprise
Achieving compliance With MongoDB Security
Webinar: Securing your data - Mitigating the risks with MongoDB
Securing Your MongoDB Deployment
Percona Live 2021 - MongoDB Security Features
Security Features in MongoDB 2.4
MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...
It's a Dangerous World
Webinar: Compliance and Data Protection in the Big Data Age: MongoDB Security...
Mongo db 2.6_security_architecture
MongoDB World 2019: MongoDB Atlas Security 101 for Developers
Beyond the Basics 4 MongoDB Security and Authentication
Securing Your Enterprise Web Apps with MongoDB Enterprise
Beyond the Basics 4: How to secure your MongoDB database
Architecting Secure and Compliant Applications with MongoDB
MongoDB World 2019: New Encryption Capabilities in MongoDB 4.2: A Deep Dive i...
MongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDB

More from MongoDB (20)

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

Recently uploaded (20)

PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Empathic Computing: Creating Shared Understanding
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Machine learning based COVID-19 study performance prediction
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Cloud computing and distributed systems.
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Approach and Philosophy of On baking technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPT
Teaching material agriculture food technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
KodekX | Application Modernization Development
PPTX
MYSQL Presentation for SQL database connectivity
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Encapsulation theory and applications.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
NewMind AI Weekly Chronicles - August'25 Week I
Spectral efficient network and resource selection model in 5G networks
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Empathic Computing: Creating Shared Understanding
Building Integrated photovoltaic BIPV_UPV.pdf
A Presentation on Artificial Intelligence
Machine learning based COVID-19 study performance prediction
Mobile App Security Testing_ A Comprehensive Guide.pdf
Cloud computing and distributed systems.
Reach Out and Touch Someone: Haptics and Empathic Computing
Approach and Philosophy of On baking technology
Advanced methodologies resolving dimensionality complications for autism neur...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Teaching material agriculture food technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
KodekX | Application Modernization Development
MYSQL Presentation for SQL database connectivity
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Encapsulation theory and applications.pdf
Encapsulation_ Review paper, used for researhc scholars
NewMind AI Weekly Chronicles - August'25 Week I

SSecuring Your MongoDB Deployment

  • 1. Securing Your MongoDB Deployment Andreas Nilsson Lead Security Engineer, MongoDB
  • 2. The Art of Securing a System “If you know the enemy and know yourself, you need not fear the result of a hundred battles. If you know yourself but not the enemy, for every victory gained you will also suffer a defeat. If you know neither the enemy nor yourself, you will succumb in every battle.” Sun Tzu, The Art of War 500 BC
  • 3. Securing the Application: Agenda Securing a Database Access Control Data Protection Auditing
  • 4. How can we make data accessible securely?
  • 5. Timeline Plan and design security as early as possible. Design Implement Test Deploy YES! NO!
  • 7. Access Control Configure Authentication and Authorization. Design Implement Test Deploy
  • 8. MongoDB configuration Authentication -Who are you in MongoDB? • Application user, administrator, backup job, monitoring agent. Authorization -What can you do in MongoDB? • CRUD operations, configure the database, manage sharding, user management.
  • 9. Enable Authentication Built-in authentication methods • Password challenge response • x.509 certificates Or integrate with existing authentication infrastructure
  • 10. Enable Access Control Design • Determine which types of users exist in the system. • Match the users to MongoDB roles. Create any customized roles. Deployment • Start/restart MongoDB with access control enabled. • Create the desired users.
  • 11. Role Based Access Control Builtin roles • read, readWrite, dbAdmin, clusterAdmin, root, etc.. User defined roles • Customized roles based on existing roles and privileges.
  • 12. Internal Authentication Server-server authentication use shared keyfile or x.509.
  • 13. Sharding, upgrading and other fancy topics Users in a sharded system • live on the config servers, not the query routers (mongos) • local shard (replica set) users can still exist Users in 2.4 • located in different DBs and in a different format than: Users in >= 2.6 • all reside in the admin DB and hence are always replicated.
  • 14. Field Level Redaction - $redact $redact • New aggregation framework operator • Conditionally filter user documents Use cases • Implement user-based document level, content filtering. • Create egress filter, redacting sensitive information.
  • 15. Access Control - Field Level Redaction Note: Need to understand the application better
  • 16. Data Protection Encrypting data in transit (SSL) and data at rest. Design Implement Test Deploy
  • 18. Transport Encryption with SSL • Possible to protect client-server, server-server communications with SSL. • Support for commercially and internally issued x.509 certificates • Possible to run the server in FIPS 140-2 mode. • Support for mixed SSL and non-SSL clusters. • Self-signed certificates provides no trust! • Omitting to provide a CA file to MongoDB disables validation!
  • 19. Data Protection - Transport Encryption Encrypt communications (SSL) Authenticate connections (x.509)
  • 20. Data Protection - Encryption at rest Alternatives • Encrypt data client side • Use partner or independent solution for file and OS level encryption
  • 22. The Audit Log • Security events can be written to either the console, the syslog or a file (JSON/BSON) • By default, all security events are written to audit log when enabled. • Events include Authentication failures and some commands. • Access control is not required for auditing. • They are separate components.
  • 23. Audit Log Properties • Can filter based off of different criteria – Action Type, TimeFrame, IP Address/Port, Users • Events Have Total Order Per Connection • Audit Guarantees (AKA Writes/config) – Audit event written to disk BEFORE writing to the journal – A write will not complete before it has been audited
  • 25. Some tips along the way… 1. Do not directly expose database servers to the Internet 2. Design and configure access control 3. Enable SSL 4. Provide SSL CA files to the client and server as trust base 5. Disable any unnecessary interfaces 6. Lock down database files and minimize account privileges
  • 26. What did we talk about? Securing a Database Access Control Data Protection Auditing
  • 27. The Art of Securing a System “All men can see these tactics whereby I conquer, but what none can see is the strategy out of which victory is evolved.” Sun Tzu, The Art of War 500 BC
  • 28. Next steps • MongoDB Security Manual - http://docs.mongodb.org/manual/core/security-introduction/ • MongoDB Security Whitepaper - http://info.mongodb.com/rs/mongodb/images/MongoDB_Security_Archi tecture_WP.pdf
  • 29. Thank You Andreas Nilsson Lead Security Engineer, MongoDB

Editor's Notes

  • #3: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?
  • #4: Common process, tooling and management across the data lifecycle from ingestion to presentation Ensuring data provenance Supporting repeatable transformation processes Enabling reliable access for real-time query and reporting
  • #5: Common process, tooling and management across the data lifecycle from ingestion to presentation Ensuring data provenance Supporting repeatable transformation processes Enabling reliable access for real-time query and reporting
  • #6: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?
  • #8: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?
  • #9: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?
  • #10: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?
  • #11: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?
  • #12: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?
  • #13: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?
  • #14: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?
  • #15: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?
  • #16: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?
  • #17: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?
  • #19: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?
  • #20: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?
  • #21: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?
  • #22: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?
  • #26: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?
  • #27: Common process, tooling and management across the data lifecycle from ingestion to presentation Ensuring data provenance Supporting repeatable transformation processes Enabling reliable access for real-time query and reporting
  • #28: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?
  • #29: Call to action is about thinking where there is opportunity and what are you anchoring your data hub around?