SlideShare une entreprise Scribd logo
1  sur  41
Securing Your
Enterprise Web Apps with
MongoDB Enterprise
About: Tom Spitzer,
VP, Engineering, EC Wise
EC Wise builds/enables Complex Secure Solutions
Software Products / Service Delivery Platforms / Cyber Security
Key Practices: Security, Secure Software Development, Intelligent Systems, Data
Mature, International
Offices and customers: North and South America, Asia
~ 100 employees, senior experienced teams
Founded 1998
Prior to EC Wise I developed eCommerce and ERP systems
Challenges We Are Trying to Address
 We need ways to identify when attacks may be occurring
 When compromised, precise and efficient data restoration is essential
 MongoDB stores data in a form that could be compromised
 Within the Enterprise space, single sign on has been shown to be a better
solution for identity management than doling out user accounts on multiple
systems; it also enables centralized permission management
 We need tools for forensics and regulatory compliance
 We want to develop solutions for U.S. government agencies
Learning Objectives; you will learn how to
1. How to use MongoDB Enterprise Ops Manager to make your MongoDB
databases more secure
2. How to use the Encrypted Storage engine
3. The differences between Kerberos and LDAP authentication and how to set
them up
4. How to enable and manage auditing to support your security efforts
5. How to create a secure cluster configuration
6. What’s involved in setting up MongoDB in compliance with FIPS
OpsManager: Management and monitoring features
Interactively set deployment-wide authentication model
Monitor/set thresholds for resource usage
Unusual resource usage may indicate unusual activities
Continuous Backup and Backup encryption (v 3.4)
Automate version upgrades (and downgrades, if necessary)
Important since upgrades often include security enhancements
Log consolidation and management
Set Authentication Policy
Ops Manager Monitoring & Alerts
Ops Manager Backup Features
 Continuous back-up vs. interval based backup provided by MongoDump and
file system copies; Minimizes downtime, conserves resources
 Enables fast recovery in event of compromise
 Works with replica sets and sharded clusters
can convert standalone mongod to single member replica set
 Enables restore to specified point between snapshots
 Supports encrypted backup storage
Performs initial sync
to back up current
data.
•Includes each
shard and the
config servers.
Takes snapshots of
the data directory
based on specified
snapshot schedule
•then transfers the
snapshots to a
storage system
Monitors the oplog
constantly and adds
new database
operations to the
latest backup
•Ops Manager
maintains up to
date copy of
database.
The backup process:
Sharded Clusters also can
enable “checkpoints” to
permit restores at moments
between snapshots.
Maintains one
“head database”
per replica set
Set KMIP Server Configuration (req for encryption)
Navigate to the Backup
configuration tab.
1.Click Admin.
2.Click General.
3.Click Ops Manager Config.
4.Click Backup tab.
Configure Group to use KMIP and Storage Engine
Select Point-in-time;
Daemon applies
oplog entries to
closest PiT snapshot
Can restore to new
or different server
from source
MongoDB Storage Engine Encryption
Native encryption in Wired Tiger storage engine; single digit % overhead
Uses AES256 with choice of “mode of operation”
CBC: Cipher Block Chaining – tried and true (and MongoDB default)
G/CM: Galois Counter Mode – widely used for data packets
Key management – only master key is external to the server
two strategies for key rotation
Master Key per replica
Internal Key per database
Master key management
Only master key is external to the server
Two strategies for key rotation
Master Key per replica
Internal Key per database
Use third party key management appliance via the Key Management Interoperability
Protocol (KMIP). Recommended & typically required to meet regulatory reqs
e.g. Alliance Key Manager for MongoDB, Vormetric, Gemalto,
Open Source Python KMIP server
Local key management via a keyfile (generate with SSL)
openssl rand -base64 32 > mongodb-keyfile
Data at Rest Encryption with KMIP
3rd Party Key
Management
Appliance
Replica1 Host OS
DB 1 DB 2 DB 3
Replica1’s Master Key
Replica2’s Master Key
Replica3’s Master Key
CA Certificates File
DB 4
Internal Key Manager Keystore
(encrypted by Master Key)
DB 1 Key
DB 2 Key
DB 3 Key
DB 4 Key
Encrypts & Decrypts
Replica1 mongodReplica1 Key &
Certificate PEM
File
Enable encryption with new KMIP key
mongod --enableEncryption --kmipServerName <KMIP Server HostName> 
--kmipPort <KMIP server port> --kmipServerCAFile <path to ca.pem> 
--kmipClientCertificateFile <path to client.pem>
Enable encryption with keyfile
mongod --enableEncryption --kmipServerName <KMIP Server HostName> 
--kmipPort <KMIP server port> --kmipServerCAFile <path to ca.pem> 
--kmipClientCertificateFile <path to client.pem> --kmipKeyIdentifier <UID>
Enable encryption with existing key
// create key file, e.g. using OpenSSL
mongod –enableEncryption --encryptionKeyFile mongodb-keyfile
Key rotation (annual recommended)
KMIP – rotate master key
With the new master key, the internal keystore will be re-encrypted but the database keys will be
otherwise left unchanged. This obviates the need to re-encrypt the entire data set.
Rotate the master key for the secondary members of the replica set one at a time.
mongod --enableEncryption --kmipRotateMasterKey 
--kmipServerName <KMIP Server HostName> 
--kmipServerCAFile ca.pem --kmipClientCertificateFile client.pem
Step down master to replica and rotate master key on it last
If using key file, recommendation is to replace and retire encypted replicas
Log Redaction (3.4 Enterprise)
Redacts Client Data Shown in System Log Files
• All potentially sensitive user data omitted from logs
Trade-off:
• Harder to diagnose system & performance issues
• If you don’t use, manage logs “carefully”
Vs
Enterprise Authentication models
Remote
Directory
Server
Username /
Password
(1)
(2)
(3)
Pre-
Established
Trust with
KDC
Key
Distribution
Center (KDC)
1. LDAP (inc. Active Directory)
2. Kerberos
Client Authentication Comparisons
Authentication Method Clear Text Password Identity Location
LDAP Yes * External
Kerberos
No (KDC generated session
key encrypted with
password)
External
* Can be protected via a transport-level security
mechanism
Using Kerberos with MongoDB
“Kerberos” a “tried and true” industry standard authentication protocol for large
client/server systems.
For organizations with in-place Kerberos infrastructure - Enterprise MongoDB and
applications use existing Kerberos authentication infrastructure and processes
Mutual authentication model mediated by Key Distribution Center
Must add Kerberos user and service principals to MongoDB $external database
User principals can represent actual users or applications
Service principals represent your MongoDB servers (use FQDNs)
Setting up LDAP between MongoDB and AD
• Set up Users and Groups in Active Directory
• Map AD Users to Mongo DB Groups
• Ensure AD Server has TLS/SSL enabled
• Work with your IT Dept
• Generate Certs and install on MongoDB Server
• Create LDAP configuration file on MongoDB Server
• See next slide
• Use LDAP query during login to determine user’s AD group
• Map to local role based on group membership
Usually
Domain
ControllerCommon
Scenario, and its
Fairly Complex,
so we posted
documentation
LDAP Authentication – Config file entries
security:
authorization: "enabled"
ldap:
servers: "cdcorpwindc01.ecwise.local"
userToDNMapping:
'[
{
match: "(.+)",
ldapQuery: "CN=Users,dc=ecwise,dc=local??sub?(sAMAccountName={0})"
}
]'
authz:
queryTemplate: "OU=Groups,OU=EC Wise
Users,DC=ecwise,DC=local??sub?(&(objectClass=group)(member={USER}))"
bind:
queryUser: "duke"
queryPassword: "ecwise@123"
setParameter:
authenticationMechanisms: 'PLAIN'
Client Authentication Examples
LDAP
Kerberos
FQDN
Enabling and using Auditing
 Track schema operations
 Track replica set reconfiguration events
 Track authentication and authorization activities
 How to filter
 How to specify destinations
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
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"]}}‘
Auditing - Filters Are Key
FIPS and MongoDB Overview
Requirements and standards for cryptographic modules used by departments and
agencies of the U.S. government
Addresses both hardware and software components
Four Levels, addressing security in eleven areas
MongoDB’s FIPS support covers the way that MongoDB uses OpenSSL for
network encryption, SCRAM-SHA-1 authentication, and x.509 authentication
If you use Kerberos or LDAP authentication, its on you to ensure that you are
using FIPS-compliant libraries
MongoDB FIPS Support
OpenSSL “FIPS Object Module”
Certified component optionally used via OpenSSL (must have certified version)
Ensures source code not tampered with
(checks signature against original certified version)
MongoDB configurable option
FIPSMode: true
Also applies to Encryption-at-Rest
Securing a Cluster
Router
Single Public Access
Shard + Replication set
Shard + Replication set
Shard + Replication set
Configure Server
Replication Set
Application
Mongo DB Cluster
Internal Network behind firewall
Authentication with account & password
Internal Authentication between nodes of cluster
With Key File (or X.509 certification)
VPN Access
Maintenance
Admin user
VPN Authentication
Cluster: Access via router; databases behind firewall
 Cluster should be invisible to public users, router the only access point.
 For System Admin user, setup a specific maintenance entrance or VPN access
for entry into the cluster network.
 Each mongo instance in cluster should use the key file as the Internal
Authentication (or X.509 certification)
 key file configuration easier than x.509, sufficient for many scenarios, but x.509 worth
exploring when managing sensitive data in production
Security configuration for Shard
Similar to simple configuration, start with mongod running without AUTH
bin/mongo --port 10000 (10001,10002,10003) – shard ports
db.createUser(
{
user: "<super user name>",
pwd: "<super user password>",
roles:[
"clusterAdmin",
"userAdminAnyDatabase",
"dbAdminAnyDatabase",
"readWriteAnyDatabase" ]
With the super user account,
 Configure server root account
We can use this account to manage the accounts of users who would visit
this Mongo DB cluster to read | write data.
With the Server Root Account,
 Create users and roles assign users to roles
 Shard Server root account
This is the Shard Local Administrative User, who would do database
maintenance or other admin tasks.
We can’t use this account for the regular visit from router
#file: mongod_db1.conf DB shard
systemLog:
destination: file
path: "/usr/local/mongodb-3.4.3/log/mongod_db2.log"
logAppend: true
storage:
dbPath: "/usr/local/mongodb-3.4.3/db/db2"
engine: wiredTiger
journal:
enabled: true
processManagement:
fork: true
net:
port: 10002
setParameter:
enableLocalhostAuthBypass: false
replication:
replSetName: rs_db2
sharding:
clusterRole: shardsvr
security:
authorization: enabled
clusterAuthMode: keyFile
keyFile: "/usr/local/mongodb-3.4.3/mongodb.key"
#file: mongod_cs.conf CSRS Config server
systemLog:
destination: file
path: "/usr/local/mongodb-3.4.3/log/mongod_cs.log"
logAppend: true
storage:
dbPath: "/usr/local/mongodb-3.4.3/db/db_conf"
engine: wiredTiger
journal:
enabled: true
processManagement:
fork: true
net:
port: 10000
setParameter:
enableLocalhostAuthBypass: false
sharding:
clusterRole: configsvr
replication:
replSetName: rs_cs
security:
authorization: enabled
clusterAuthMode: keyFile
keyFile: "/usr/local/mongodb-3.4.3/mongodb.key"
#file: mongod_db1.conf DB shard
systemLog:
destination: file
path: "/usr/local/mongodb-3.4.3/log/mongod_db2.log"
logAppend: true
storage:
dbPath: "/usr/local/mongodb-3.4.3/db/db2"
engine: wiredTiger
journal:
enabled: true
processManagement:
fork: true
net:
port: 10002
setParameter:
enableLocalhostAuthBypass: false
replication:
replSetName: rs_db2
sharding:
clusterRole: shardsvr
security:
authorization: enabled
clusterAuthMode: keyFile
keyFile: "/usr/local/mongodb-3.4.3/mongodb.key"
#file: mongod_cs.conf CSRS Config server
systemLog:
destination: file
path: "/usr/local/mongodb-3.4.3/log/mongod_cs.log"
logAppend: true
storage:
dbPath: "/usr/local/mongodb-3.4.3/db/db_conf"
engine: wiredTiger
journal:
enabled: true
processManagement:
fork: true
net:
port: 10000
setParameter:
enableLocalhostAuthBypass: false
sharding:
clusterRole: configsvr
replication:
replSetName: rs_cs
security:
authorization: enabled
clusterAuthMode: keyFile
keyFile: "/usr/local/mongodb-3.4.3/mongodb.key"
Generate
key file
• openssl rand -base64 500 > mongodb.key
• copy this into all servers of cluster
• chmod 600 mongodb.key
Add the security
settings into
each property file
• Configure server
• Shard replications
• Router
Update property
files in all servers
and restart each
instance
Internal Authentication among instances of cluster
Securing Your Enterprise
Stay current with MongoDB, and get the Enterprise version!
Encrypt data at rest as well as in transit
Integrate with Enterprise identity/authentication/authorization systems
Consider how to secure log files
Use auditing wisely, and in conjunction with OS and device auditing
You should be able to secure clusters

Contenu connexe

Tendances

Getting Started with MongoDB Using the Microsoft Stack
Getting Started with MongoDB Using the Microsoft Stack Getting Started with MongoDB Using the Microsoft Stack
Getting Started with MongoDB Using the Microsoft Stack
MongoDB
 
Using Compass to Diagnose Performance Problems in Your Cluster
Using Compass to Diagnose Performance Problems in Your ClusterUsing Compass to Diagnose Performance Problems in Your Cluster
Using Compass to Diagnose Performance Problems in Your Cluster
MongoDB
 

Tendances (20)

Cloud Backup Overview
Cloud Backup Overview Cloud Backup Overview
Cloud Backup Overview
 
Webinar: Enabling Microservices with Containers, Orchestration, and MongoDB
Webinar: Enabling Microservices with Containers, Orchestration, and MongoDBWebinar: Enabling Microservices with Containers, Orchestration, and MongoDB
Webinar: Enabling Microservices with Containers, Orchestration, and MongoDB
 
How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...
How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...
How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...
 
Engineering an Encrypted Storage Engine
Engineering an Encrypted Storage EngineEngineering an Encrypted Storage Engine
Engineering an Encrypted Storage Engine
 
Managing Multi-Tenant SaaS Applications at Scale
Managing Multi-Tenant SaaS Applications at ScaleManaging Multi-Tenant SaaS Applications at Scale
Managing Multi-Tenant SaaS Applications at Scale
 
An Elastic Metadata Store for eBay’s Media Platform
An Elastic Metadata Store for eBay’s Media PlatformAn Elastic Metadata Store for eBay’s Media Platform
An Elastic Metadata Store for eBay’s Media Platform
 
Managing Cloud Security Design and Implementation in a Ransomware World
Managing Cloud Security Design and Implementation in a Ransomware World Managing Cloud Security Design and Implementation in a Ransomware World
Managing Cloud Security Design and Implementation in a Ransomware World
 
Getting Started with MongoDB Using the Microsoft Stack
Getting Started with MongoDB Using the Microsoft Stack Getting Started with MongoDB Using the Microsoft Stack
Getting Started with MongoDB Using the Microsoft Stack
 
An Introduction to MongoDB Ops Manager
An Introduction to MongoDB Ops ManagerAn Introduction to MongoDB Ops Manager
An Introduction to MongoDB Ops Manager
 
Key Performance Indicators for Managing MongoDB and Recommended Production Co...
Key Performance Indicators for Managing MongoDB and Recommended Production Co...Key Performance Indicators for Managing MongoDB and Recommended Production Co...
Key Performance Indicators for Managing MongoDB and Recommended Production Co...
 
https://docs.google.com/presentation/d/1DcL4zK6i3HZRDD4xTGX1VpSOwyu2xBeWLT6a_...
https://docs.google.com/presentation/d/1DcL4zK6i3HZRDD4xTGX1VpSOwyu2xBeWLT6a_...https://docs.google.com/presentation/d/1DcL4zK6i3HZRDD4xTGX1VpSOwyu2xBeWLT6a_...
https://docs.google.com/presentation/d/1DcL4zK6i3HZRDD4xTGX1VpSOwyu2xBeWLT6a_...
 
Containerizing MongoDB with kubernetes
Containerizing MongoDB with kubernetesContainerizing MongoDB with kubernetes
Containerizing MongoDB with kubernetes
 
Webinar: Choosing the Right Shard Key for High Performance and Scale
Webinar: Choosing the Right Shard Key for High Performance and ScaleWebinar: Choosing the Right Shard Key for High Performance and Scale
Webinar: Choosing the Right Shard Key for High Performance and Scale
 
Using Compass to Diagnose Performance Problems in Your Cluster
Using Compass to Diagnose Performance Problems in Your ClusterUsing Compass to Diagnose Performance Problems in Your Cluster
Using Compass to Diagnose Performance Problems in Your Cluster
 
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
 
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDBPowering Microservices with Docker, Kubernetes, Kafka, & MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDB
 
What's new in MongoDB 2.6
What's new in MongoDB 2.6What's new in MongoDB 2.6
What's new in MongoDB 2.6
 
Beyond the Basics 1: Storage Engines
Beyond the Basics 1: Storage EnginesBeyond the Basics 1: Storage Engines
Beyond the Basics 1: Storage Engines
 
MongoDB Europe 2016 - Building WiredTiger
MongoDB Europe 2016 - Building WiredTigerMongoDB Europe 2016 - Building WiredTiger
MongoDB Europe 2016 - Building WiredTiger
 
Common Cluster Configuration Pitfalls
Common Cluster Configuration PitfallsCommon Cluster Configuration Pitfalls
Common Cluster Configuration Pitfalls
 

Similaire à Securing Your Enterprise Web Apps with MongoDB Enterprise

How to accelerate docker adoption with a simple and powerful user experience
How to accelerate docker adoption with a simple and powerful user experienceHow to accelerate docker adoption with a simple and powerful user experience
How to accelerate docker adoption with a simple and powerful user experience
Docker, Inc.
 

Similaire à Securing Your Enterprise Web Apps with MongoDB Enterprise (20)

Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Low Hanging Fruit, Making Your Basic MongoDB Installation More SecureLow Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
 
Securing Your MongoDB Deployment
Securing Your MongoDB DeploymentSecuring Your MongoDB Deployment
Securing Your MongoDB Deployment
 
Under the Hood 11g Identity Management
Under the Hood  11g Identity ManagementUnder the Hood  11g Identity Management
Under the Hood 11g Identity Management
 
Enterprise Cloud Security
Enterprise Cloud SecurityEnterprise Cloud Security
Enterprise Cloud Security
 
Percona Live 2021 - MongoDB Security Features
Percona Live 2021 - MongoDB Security FeaturesPercona Live 2021 - MongoDB Security Features
Percona Live 2021 - MongoDB Security Features
 
11g Identity Management - InSync10
11g Identity Management - InSync1011g Identity Management - InSync10
11g Identity Management - InSync10
 
MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...
MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...
MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...
 
Tips to Remediate your Vulnerability Management Program
Tips to Remediate your Vulnerability Management ProgramTips to Remediate your Vulnerability Management Program
Tips to Remediate your Vulnerability Management Program
 
Beyond the Basics 4: How to secure your MongoDB database
Beyond the Basics 4: How to secure your MongoDB databaseBeyond the Basics 4: How to secure your MongoDB database
Beyond the Basics 4: How to secure your MongoDB database
 
Beyond the Basics 4 MongoDB Security and Authentication
Beyond the Basics 4 MongoDB Security and AuthenticationBeyond the Basics 4 MongoDB Security and Authentication
Beyond the Basics 4 MongoDB Security and Authentication
 
Gartner Security & Risk Management Summit 2018
Gartner Security & Risk Management Summit 2018Gartner Security & Risk Management Summit 2018
Gartner Security & Risk Management Summit 2018
 
SQL Server - High availability
SQL Server - High availabilitySQL Server - High availability
SQL Server - High availability
 
Webinar: Securing your data - Mitigating the risks with MongoDB
Webinar: Securing your data - Mitigating the risks with MongoDBWebinar: Securing your data - Mitigating the risks with MongoDB
Webinar: Securing your data - Mitigating the risks with MongoDB
 
cloud computing preservity
cloud computing preservitycloud computing preservity
cloud computing preservity
 
MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...
MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...
MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...
 
Active Directory Security Assessment ADSA
Active Directory Security Assessment ADSAActive Directory Security Assessment ADSA
Active Directory Security Assessment ADSA
 
How to accelerate docker adoption with a simple and powerful user experience
How to accelerate docker adoption with a simple and powerful user experienceHow to accelerate docker adoption with a simple and powerful user experience
How to accelerate docker adoption with a simple and powerful user experience
 
SCOM Tips and Tricks
SCOM Tips and TricksSCOM Tips and Tricks
SCOM Tips and Tricks
 
Enterprise-class security with PostgreSQL - 1
Enterprise-class security with PostgreSQL - 1Enterprise-class security with PostgreSQL - 1
Enterprise-class security with PostgreSQL - 1
 
MongoDB Days UK: Securing Your Deployment with MongoDB Enterprise
MongoDB Days UK: Securing Your Deployment with MongoDB EnterpriseMongoDB Days UK: Securing Your Deployment with MongoDB Enterprise
MongoDB Days UK: Securing Your Deployment with MongoDB Enterprise
 

Plus de MongoDB

Plus de MongoDB (20)

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

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Dernier (20)

Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Securing Your Enterprise Web Apps with MongoDB Enterprise

  • 1. Securing Your Enterprise Web Apps with MongoDB Enterprise
  • 2. About: Tom Spitzer, VP, Engineering, EC Wise EC Wise builds/enables Complex Secure Solutions Software Products / Service Delivery Platforms / Cyber Security Key Practices: Security, Secure Software Development, Intelligent Systems, Data Mature, International Offices and customers: North and South America, Asia ~ 100 employees, senior experienced teams Founded 1998 Prior to EC Wise I developed eCommerce and ERP systems
  • 3. Challenges We Are Trying to Address  We need ways to identify when attacks may be occurring  When compromised, precise and efficient data restoration is essential  MongoDB stores data in a form that could be compromised  Within the Enterprise space, single sign on has been shown to be a better solution for identity management than doling out user accounts on multiple systems; it also enables centralized permission management  We need tools for forensics and regulatory compliance  We want to develop solutions for U.S. government agencies
  • 4. Learning Objectives; you will learn how to 1. How to use MongoDB Enterprise Ops Manager to make your MongoDB databases more secure 2. How to use the Encrypted Storage engine 3. The differences between Kerberos and LDAP authentication and how to set them up 4. How to enable and manage auditing to support your security efforts 5. How to create a secure cluster configuration 6. What’s involved in setting up MongoDB in compliance with FIPS
  • 5. OpsManager: Management and monitoring features Interactively set deployment-wide authentication model Monitor/set thresholds for resource usage Unusual resource usage may indicate unusual activities Continuous Backup and Backup encryption (v 3.4) Automate version upgrades (and downgrades, if necessary) Important since upgrades often include security enhancements Log consolidation and management
  • 8.
  • 9.
  • 10.
  • 11. Ops Manager Backup Features  Continuous back-up vs. interval based backup provided by MongoDump and file system copies; Minimizes downtime, conserves resources  Enables fast recovery in event of compromise  Works with replica sets and sharded clusters can convert standalone mongod to single member replica set  Enables restore to specified point between snapshots  Supports encrypted backup storage
  • 12. Performs initial sync to back up current data. •Includes each shard and the config servers. Takes snapshots of the data directory based on specified snapshot schedule •then transfers the snapshots to a storage system Monitors the oplog constantly and adds new database operations to the latest backup •Ops Manager maintains up to date copy of database. The backup process: Sharded Clusters also can enable “checkpoints” to permit restores at moments between snapshots. Maintains one “head database” per replica set
  • 13.
  • 14. Set KMIP Server Configuration (req for encryption) Navigate to the Backup configuration tab. 1.Click Admin. 2.Click General. 3.Click Ops Manager Config. 4.Click Backup tab.
  • 15. Configure Group to use KMIP and Storage Engine
  • 16. Select Point-in-time; Daemon applies oplog entries to closest PiT snapshot Can restore to new or different server from source
  • 17. MongoDB Storage Engine Encryption Native encryption in Wired Tiger storage engine; single digit % overhead Uses AES256 with choice of “mode of operation” CBC: Cipher Block Chaining – tried and true (and MongoDB default) G/CM: Galois Counter Mode – widely used for data packets Key management – only master key is external to the server two strategies for key rotation Master Key per replica Internal Key per database
  • 18. Master key management Only master key is external to the server Two strategies for key rotation Master Key per replica Internal Key per database Use third party key management appliance via the Key Management Interoperability Protocol (KMIP). Recommended & typically required to meet regulatory reqs e.g. Alliance Key Manager for MongoDB, Vormetric, Gemalto, Open Source Python KMIP server Local key management via a keyfile (generate with SSL) openssl rand -base64 32 > mongodb-keyfile
  • 19. Data at Rest Encryption with KMIP 3rd Party Key Management Appliance Replica1 Host OS DB 1 DB 2 DB 3 Replica1’s Master Key Replica2’s Master Key Replica3’s Master Key CA Certificates File DB 4 Internal Key Manager Keystore (encrypted by Master Key) DB 1 Key DB 2 Key DB 3 Key DB 4 Key Encrypts & Decrypts Replica1 mongodReplica1 Key & Certificate PEM File
  • 20. Enable encryption with new KMIP key mongod --enableEncryption --kmipServerName <KMIP Server HostName> --kmipPort <KMIP server port> --kmipServerCAFile <path to ca.pem> --kmipClientCertificateFile <path to client.pem> Enable encryption with keyfile mongod --enableEncryption --kmipServerName <KMIP Server HostName> --kmipPort <KMIP server port> --kmipServerCAFile <path to ca.pem> --kmipClientCertificateFile <path to client.pem> --kmipKeyIdentifier <UID> Enable encryption with existing key // create key file, e.g. using OpenSSL mongod –enableEncryption --encryptionKeyFile mongodb-keyfile
  • 21. Key rotation (annual recommended) KMIP – rotate master key With the new master key, the internal keystore will be re-encrypted but the database keys will be otherwise left unchanged. This obviates the need to re-encrypt the entire data set. Rotate the master key for the secondary members of the replica set one at a time. mongod --enableEncryption --kmipRotateMasterKey --kmipServerName <KMIP Server HostName> --kmipServerCAFile ca.pem --kmipClientCertificateFile client.pem Step down master to replica and rotate master key on it last If using key file, recommendation is to replace and retire encypted replicas
  • 22. Log Redaction (3.4 Enterprise) Redacts Client Data Shown in System Log Files • All potentially sensitive user data omitted from logs Trade-off: • Harder to diagnose system & performance issues • If you don’t use, manage logs “carefully” Vs
  • 23. Enterprise Authentication models Remote Directory Server Username / Password (1) (2) (3) Pre- Established Trust with KDC Key Distribution Center (KDC) 1. LDAP (inc. Active Directory) 2. Kerberos
  • 24. Client Authentication Comparisons Authentication Method Clear Text Password Identity Location LDAP Yes * External Kerberos No (KDC generated session key encrypted with password) External * Can be protected via a transport-level security mechanism
  • 25. Using Kerberos with MongoDB “Kerberos” a “tried and true” industry standard authentication protocol for large client/server systems. For organizations with in-place Kerberos infrastructure - Enterprise MongoDB and applications use existing Kerberos authentication infrastructure and processes Mutual authentication model mediated by Key Distribution Center Must add Kerberos user and service principals to MongoDB $external database User principals can represent actual users or applications Service principals represent your MongoDB servers (use FQDNs)
  • 26. Setting up LDAP between MongoDB and AD • Set up Users and Groups in Active Directory • Map AD Users to Mongo DB Groups • Ensure AD Server has TLS/SSL enabled • Work with your IT Dept • Generate Certs and install on MongoDB Server • Create LDAP configuration file on MongoDB Server • See next slide • Use LDAP query during login to determine user’s AD group • Map to local role based on group membership Usually Domain ControllerCommon Scenario, and its Fairly Complex, so we posted documentation
  • 27. LDAP Authentication – Config file entries security: authorization: "enabled" ldap: servers: "cdcorpwindc01.ecwise.local" userToDNMapping: '[ { match: "(.+)", ldapQuery: "CN=Users,dc=ecwise,dc=local??sub?(sAMAccountName={0})" } ]' authz: queryTemplate: "OU=Groups,OU=EC Wise Users,DC=ecwise,DC=local??sub?(&(objectClass=group)(member={USER}))" bind: queryUser: "duke" queryPassword: "ecwise@123" setParameter: authenticationMechanisms: 'PLAIN'
  • 29. Enabling and using Auditing  Track schema operations  Track replica set reconfiguration events  Track authentication and authorization activities  How to filter  How to specify destinations
  • 30. 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
  • 31. 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"]}}‘ Auditing - Filters Are Key
  • 32. FIPS and MongoDB Overview Requirements and standards for cryptographic modules used by departments and agencies of the U.S. government Addresses both hardware and software components Four Levels, addressing security in eleven areas MongoDB’s FIPS support covers the way that MongoDB uses OpenSSL for network encryption, SCRAM-SHA-1 authentication, and x.509 authentication If you use Kerberos or LDAP authentication, its on you to ensure that you are using FIPS-compliant libraries
  • 33. MongoDB FIPS Support OpenSSL “FIPS Object Module” Certified component optionally used via OpenSSL (must have certified version) Ensures source code not tampered with (checks signature against original certified version) MongoDB configurable option FIPSMode: true Also applies to Encryption-at-Rest
  • 34. Securing a Cluster Router Single Public Access Shard + Replication set Shard + Replication set Shard + Replication set Configure Server Replication Set Application Mongo DB Cluster Internal Network behind firewall Authentication with account & password Internal Authentication between nodes of cluster With Key File (or X.509 certification) VPN Access Maintenance Admin user VPN Authentication
  • 35. Cluster: Access via router; databases behind firewall  Cluster should be invisible to public users, router the only access point.  For System Admin user, setup a specific maintenance entrance or VPN access for entry into the cluster network.  Each mongo instance in cluster should use the key file as the Internal Authentication (or X.509 certification)  key file configuration easier than x.509, sufficient for many scenarios, but x.509 worth exploring when managing sensitive data in production
  • 36. Security configuration for Shard Similar to simple configuration, start with mongod running without AUTH bin/mongo --port 10000 (10001,10002,10003) – shard ports db.createUser( { user: "<super user name>", pwd: "<super user password>", roles:[ "clusterAdmin", "userAdminAnyDatabase", "dbAdminAnyDatabase", "readWriteAnyDatabase" ]
  • 37. With the super user account,  Configure server root account We can use this account to manage the accounts of users who would visit this Mongo DB cluster to read | write data. With the Server Root Account,  Create users and roles assign users to roles  Shard Server root account This is the Shard Local Administrative User, who would do database maintenance or other admin tasks. We can’t use this account for the regular visit from router
  • 38. #file: mongod_db1.conf DB shard systemLog: destination: file path: "/usr/local/mongodb-3.4.3/log/mongod_db2.log" logAppend: true storage: dbPath: "/usr/local/mongodb-3.4.3/db/db2" engine: wiredTiger journal: enabled: true processManagement: fork: true net: port: 10002 setParameter: enableLocalhostAuthBypass: false replication: replSetName: rs_db2 sharding: clusterRole: shardsvr security: authorization: enabled clusterAuthMode: keyFile keyFile: "/usr/local/mongodb-3.4.3/mongodb.key" #file: mongod_cs.conf CSRS Config server systemLog: destination: file path: "/usr/local/mongodb-3.4.3/log/mongod_cs.log" logAppend: true storage: dbPath: "/usr/local/mongodb-3.4.3/db/db_conf" engine: wiredTiger journal: enabled: true processManagement: fork: true net: port: 10000 setParameter: enableLocalhostAuthBypass: false sharding: clusterRole: configsvr replication: replSetName: rs_cs security: authorization: enabled clusterAuthMode: keyFile keyFile: "/usr/local/mongodb-3.4.3/mongodb.key"
  • 39. #file: mongod_db1.conf DB shard systemLog: destination: file path: "/usr/local/mongodb-3.4.3/log/mongod_db2.log" logAppend: true storage: dbPath: "/usr/local/mongodb-3.4.3/db/db2" engine: wiredTiger journal: enabled: true processManagement: fork: true net: port: 10002 setParameter: enableLocalhostAuthBypass: false replication: replSetName: rs_db2 sharding: clusterRole: shardsvr security: authorization: enabled clusterAuthMode: keyFile keyFile: "/usr/local/mongodb-3.4.3/mongodb.key" #file: mongod_cs.conf CSRS Config server systemLog: destination: file path: "/usr/local/mongodb-3.4.3/log/mongod_cs.log" logAppend: true storage: dbPath: "/usr/local/mongodb-3.4.3/db/db_conf" engine: wiredTiger journal: enabled: true processManagement: fork: true net: port: 10000 setParameter: enableLocalhostAuthBypass: false sharding: clusterRole: configsvr replication: replSetName: rs_cs security: authorization: enabled clusterAuthMode: keyFile keyFile: "/usr/local/mongodb-3.4.3/mongodb.key"
  • 40. Generate key file • openssl rand -base64 500 > mongodb.key • copy this into all servers of cluster • chmod 600 mongodb.key Add the security settings into each property file • Configure server • Shard replications • Router Update property files in all servers and restart each instance Internal Authentication among instances of cluster
  • 41. Securing Your Enterprise Stay current with MongoDB, and get the Enterprise version! Encrypt data at rest as well as in transit Integrate with Enterprise identity/authentication/authorization systems Consider how to secure log files Use auditing wisely, and in conjunction with OS and device auditing You should be able to secure clusters

Notes de l'éditeur

  1. The learning objectives are the guiding points to everything you include in your session, so it makes sense to use them as your starting point. LOs should be focused, discrete and oriented toward the attendee. They should also be active, stating what attendees should be able to do with the information in the talk. (Learning objectives that state an attendee should "understand" something are NOT active. :-) ). As an example of a good learning objective, for a session on MongoDB, Kubernetes and Docker containers a learning objective could be “Following this talk attendees should be able to define a highly available MongoDB deployment using Kubernetes services, replica sets and config maps”. The learning objectives should be presented to the audience as the first slide following the title and should be one of the few slides with text. We recommend three to five LOs.
  2. One of the best way to describe solving a problem is describe how you solved it, and you have probably tried 2-3 ways of solving it before you figured out the right answer. Describe that process here. It often helps to illustrate with code and/or architectural diagrams
  3. It often helps to illustrate with code and/or architectural diagrams
  4. For Kerberos, when running kinit to get the initial ticket from the KDCs Ticket Granting Service, the password is never sent over the wire - instead, the TGS uses it's knowledge of the client's password to encrypt the TGS's new sesion key. On the client side, it's prompted password it used to decrypt the TGS session key. As a result, the password is not sent over the wire.
  5. In 3.4, for x.509 Certificate authentication passing the ‘user’ field to auth() is not necessary as it is implied by the subject name in the client certificate file.