creating a single view part 3: securing your deployment

25
Lead Security Engineer, MongoDB Andreas Nilsson #MongoDBWorld Creating a single view: Securing the Application

Upload: mongodb

Post on 07-Jul-2015

406 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Creating a Single View Part 3: Securing Your Deployment

Lead Security Engineer, MongoDB

Andreas Nilsson

#MongoDBWorld

Creating a single view:Securing the Application

Page 2: Creating a Single View Part 3: Securing Your Deployment

How can we make data accessible securely?

Page 3: Creating a Single View Part 3: Securing Your Deployment

Securing the Application: Agenda

Securing a Database Access Control

Data Protection Auditing

Page 4: Creating a Single View Part 3: Securing Your Deployment

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

Page 5: Creating a Single View Part 3: Securing Your Deployment

Timeline

Plan and design security as early as possible.

ImplementDesign Test Deploy

YES! NO!

Page 6: Creating a Single View Part 3: Securing Your Deployment

Infrastructure matters

Page 7: Creating a Single View Part 3: Securing Your Deployment

Access Control

Configure Authentication and Authorization.

ImplementDesign Test Deploy

Page 8: Creating a Single View Part 3: Securing Your Deployment

Access Control

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.

Page 9: Creating a Single View Part 3: Securing Your Deployment

Enable Authentication

Built-in authentication methods

• Password challenge response

• x.509 certificates

Or integrate with existing authentication infrastructure

Page 10: Creating a Single View Part 3: Securing Your Deployment

Enable Authorization

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.

Page 11: Creating a Single View Part 3: Securing Your Deployment

 Internal Access Control

Server-server authentication use shared keyfile or x.509.

Page 12: Creating a Single View Part 3: Securing Your Deployment

Access Control - Field Level Redaction

Note: Need to understand the application better

Page 13: Creating a Single View Part 3: Securing Your Deployment

Data Protection

Data in transit and data at rest.

ImplementDesign Test Deploy

Page 14: Creating a Single View Part 3: Securing Your Deployment

Data Protection End to End

Page 15: Creating a Single View Part 3: Securing Your Deployment

Data Protection - Transport Encryption

• 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.

Page 16: Creating a Single View Part 3: Securing Your Deployment

Data Protection - Transport Encryption

Encrypt communications (SSL)

Authenticate connections (x.509)

Page 17: Creating a Single View Part 3: Securing Your Deployment

Data Protection - Encryption at rest

Alternatives

• Encrypt data client side

• Use partner solution for file and OS level encryption

!

Page 18: Creating a Single View Part 3: Securing Your Deployment

Security Auditing

Monitor security events in the system.

ImplementDesign Test Deploy

Page 19: Creating a Single View Part 3: Securing Your Deployment

Security Auditing

Page 20: Creating a Single View Part 3: Securing Your Deployment

The Audit Log

• Security events can be written to either the console, the syslog or a file (JSON/BSON)

• By default, all 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.

Page 21: Creating a Single View Part 3: Securing Your Deployment

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

Page 22: Creating a Single View Part 3: Securing Your Deployment

What did we talk about?

Securing a Database Access Control

Data Protection Auditing

Page 23: Creating a Single View Part 3: Securing Your Deployment

Some last tips along the way…

1. Do not directly expose database servers to the Internet

2. Design and configure access control

3. Enable SSL

4. Disable any unnecessary interfaces

5. Lock down database files and minimize account privileges

Page 24: Creating a Single View Part 3: Securing Your Deployment

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_Architecture_WP.pdf

Page 25: Creating a Single View Part 3: Securing Your Deployment

Lead Security Engineer, MongoDB

Andreas Nilsson

#MongoDBWorld

Thank You