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

PPTX
Jumpstart: Introduction to MongoDB
PPTX
IOOF IT System Modernisation
PDF
MongoDB Europe 2016 - Big Data meets Big Compute
PPTX
Globally Distributed RESTful Object Storage
PDF
MongoDB .local Toronto 2019: MongoDB Atlas Jumpstart
PPTX
Replacing Traditional Technologies with MongoDB: A Single Platform for All Fi...
PPTX
MongoDB Schema Design: Practical Applications and Implications
PDF
MongodB Internals
Jumpstart: Introduction to MongoDB
IOOF IT System Modernisation
MongoDB Europe 2016 - Big Data meets Big Compute
Globally Distributed RESTful Object Storage
MongoDB .local Toronto 2019: MongoDB Atlas Jumpstart
Replacing Traditional Technologies with MongoDB: A Single Platform for All Fi...
MongoDB Schema Design: Practical Applications and Implications
MongodB Internals

What's hot (20)

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

Viewers also liked (20)

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

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

PPTX
Beyond the Basics 4: How to secure your MongoDB database
PPTX
Beyond the Basics 4 MongoDB Security and Authentication
PPTX
Securing Your Enterprise Web Apps with MongoDB Enterprise
PDF
Achieving compliance With MongoDB Security
PDF
MongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDB
PPTX
Webinar: Securing your data - Mitigating the risks with MongoDB
PPTX
Securing Your MongoDB Deployment
PPTX
Securing Your Deployment with MongoDB Enterprise
PPTX
MongoDB Days UK: Securing Your Deployment with MongoDB Enterprise
PPTX
Jumpstart: Introduction to Atlas, Highlighting Enterprise Features
PDF
MongoDB World 2018: Enterprise Security in the Cloud
PDF
MongoDB World 2018: Enterprise Cloud Security
PPTX
Percona Live 2021 - MongoDB Security Features
PPTX
Webinar: Compliance and Data Protection in the Big Data Age: MongoDB Security...
PDF
Creating a Single View Part 3: Securing Your Deployment
PPTX
MongoDB.local Sydney: MongoDB Atlas for Your Enterprise
PPTX
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
PPTX
It's a Dangerous World: From OS Through Application, Securing Your MongoDB In...
PDF
MongoDB .local Bengaluru 2019: New Encryption Capabilities in MongoDB 4.2: A ...
PPTX
Securing Your MongoDB Deployment
Beyond the Basics 4: How to secure your MongoDB database
Beyond the Basics 4 MongoDB Security and Authentication
Securing Your Enterprise Web Apps with MongoDB Enterprise
Achieving compliance With MongoDB Security
MongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDB
Webinar: Securing your data - Mitigating the risks with MongoDB
Securing Your MongoDB Deployment
Securing Your Deployment with MongoDB Enterprise
MongoDB Days UK: Securing Your Deployment with MongoDB Enterprise
Jumpstart: Introduction to Atlas, Highlighting Enterprise Features
MongoDB World 2018: Enterprise Security in the Cloud
MongoDB World 2018: Enterprise Cloud Security
Percona Live 2021 - MongoDB Security Features
Webinar: Compliance and Data Protection in the Big Data Age: MongoDB Security...
Creating a Single View Part 3: Securing Your Deployment
MongoDB.local Sydney: MongoDB Atlas for Your Enterprise
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
It's a Dangerous World: From OS Through Application, Securing Your MongoDB In...
MongoDB .local Bengaluru 2019: New Encryption Capabilities in MongoDB 4.2: A ...
Securing Your MongoDB Deployment

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
Fluorescence-microscope_Botany_detailed content
PPTX
oil_refinery_comprehensive_20250804084928 (1).pptx
PDF
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
PPT
Miokarditis (Inflamasi pada Otot Jantung)
PDF
Lecture1 pattern recognition............
PPTX
Database Infoormation System (DBIS).pptx
PDF
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
PDF
“Getting Started with Data Analytics Using R – Concepts, Tools & Case Studies”
PPTX
Business Ppt On Nestle.pptx huunnnhhgfvu
PPTX
Business Acumen Training GuidePresentation.pptx
PPTX
Supervised vs unsupervised machine learning algorithms
PPTX
Computer network topology notes for revision
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
PPTX
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
PDF
Galatica Smart Energy Infrastructure Startup Pitch Deck
PPT
Reliability_Chapter_ presentation 1221.5784
PPTX
STUDY DESIGN details- Lt Col Maksud (21).pptx
PPTX
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
Fluorescence-microscope_Botany_detailed content
oil_refinery_comprehensive_20250804084928 (1).pptx
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
Miokarditis (Inflamasi pada Otot Jantung)
Lecture1 pattern recognition............
Database Infoormation System (DBIS).pptx
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
“Getting Started with Data Analytics Using R – Concepts, Tools & Case Studies”
Business Ppt On Nestle.pptx huunnnhhgfvu
Business Acumen Training GuidePresentation.pptx
Supervised vs unsupervised machine learning algorithms
Computer network topology notes for revision
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
Acceptance and paychological effects of mandatory extra coach I classes.pptx
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
Galatica Smart Energy Infrastructure Startup Pitch Deck
Reliability_Chapter_ presentation 1221.5784
STUDY DESIGN details- Lt Col Maksud (21).pptx
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx

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