SQL Server Encryption Overview. September 2, 2015



Similar documents
SafeNet MSSQL EKM Provider User Guide

Exam Number/Code : Exam Name: Name: PRO:MS SQL Serv. 08,Design,Optimize, and Maintain DB Admin Solu. Version : Demo.

Microsoft SQL Server Integration Guide

PrivateServer HSM EKM Provider for Microsoft SQL Server

MOC 20462C: Administering Microsoft SQL Server Databases

Using etoken for SSL Web Authentication. SSL V3.0 Overview

MySQL Security: Best Practices

DRAFT Standard Statement Encryption

Alliance Key Manager Solution Brief

Database Security SQL Server 2012

Microsoft SQL Server Guide. Best Practices and Backup Procedures

Backup and Restore with 3 rd Party Applications

Administering Microsoft SQL Server 2014 Databases

Course 20462C: Administering Microsoft SQL Server Databases

Administering Microsoft SQL Server Databases

Administering Microsoft SQL Server Databases

Administering Microsoft SQL Server Databases

SQL Server 2008 Designing, Optimizing, and Maintaining a Database Session 1

Microsoft SQL Database Administrator Certification

Transparent Data Encryption: New Technologies and Best Practices for Database Encryption

Microsoft SQL Server Security and Auditing Clay Risenhoover ISACA North Texas April 14,

SQL Backup and Restore using CDP

ADMINISTERING MICROSOFT SQL SERVER DATABASES

Administering Microsoft SQL Server Databases

6231B: Maintaining a Microsoft SQL Server 2008 R2 Database

SQL SERVER DATABASE ADMINISTRATION. Yoseph K.

Thales Database Security Option Pack. for Microsoft SQL Server Integration Guide.

Administering Microsoft SQL Server Databases 20462C; 5 days

Secure Database Backups with SecureZIP

1 of 10 1/31/2014 4:08 PM

<Insert Picture Here> RMAN Configuration and Performance Tuning Best Practices

Securing Your Sensitive Data with EKM & TDE. on SQL Server 2008/2012

6231A - Maintaining a Microsoft SQL Server 2008 Database

What s New in MySQL 5.7 Security Georgi Joro Kodinov Team Lead MySQL Server General Team

OBM / FREQUENTLY ASKED QUESTIONS (FAQs) Can you explain the concept briefly on how the software actually works? What is the recommended bandwidth?

Online Transaction Processing in SQL Server 2008

Zmanda Cloud Backup Frequently Asked Questions

Course: Administering Microsoft SQL Server Databases Overview

Secure Network Communications FIPS Non Proprietary Security Policy

MOC Administering Microsoft SQL Server 2014 Databases

Securing Data on Microsoft SQL Server 2012

Administering Microsoft SQL Server Databases

Competitive Analysis Retrospect And Our Competition

Overview. SSL Cryptography Overview CHAPTER 1

20462C: Administering Microsoft SQL Server Databases

SQL Server 2014

Microsoft SQL Server 2005 for the Oracle Professional

Auditing Encryption in Oracle Databases

20462 Administering Microsoft SQL Server Databases

IDERA WHITEPAPER. The paper will cover the following ten areas: Monitoring Management. WRITTEN BY Greg Robidoux

Course 55144: SQL Server 2014 Performance Tuning and Optimization

MS-55096: Securing Data on Microsoft SQL Server 2012

Administering Microsoft SQL Server 2012 Databases

CrashPlan Security SECURITY CONTEXT TECHNOLOGY

Herve Roggero 3/3/2015

Lesson Plans Microsoft s Managing and Maintaining a Microsoft Windows Server 2003 Environment

HOW ENCRYPTION WORKS. Introduction to BackupEDGE Data Encryption. Technology Overview. Strong Encryption BackupEDGE

"Charting the Course... MOC AC SQL Server 2014 Performance Tuning and Optimization. Course Summary

Administering Microsoft SQL Server Databases MOC 20462

Designing Database Solutions for Microsoft SQL Server 2012 MOC 20465

Administering Microsoft SQL Server Databases

MS Administering Microsoft SQL Server Databases

MS-10775: Administering Microsoft SQL Server 2012 Databases. Course Objectives. Required Exam(s) Price. Duration. Methods of Delivery.

Microsoft Administering Microsoft SQL Server Databases

How To Use A Microsoft Microsoft Database Server 2012

Kaseya 2. User Guide. Version 7.0. English

Best Practices for Storing the Product Library Workspace in an Enterprise Geodatabase for SQL Server. An Esri White Paper October 2012

10775 Administering Microsoft SQL Server Databases

Administering Microsoft SQL Server 2012 Databases

Optimizing SQL Server 2012 for SharePoint SharePoint Saturday/Friday, Honolulu March 27, 2015

Administering Microsoft SQL Server Databases

SQL Server 2014 In-Memory Tables (Extreme Transaction Processing)

Chapter 11 Security+ Guide to Network Security Fundamentals, Third Edition Basic Cryptography

Protecting Microsoft SQL Server with Asigra Cloud Backup

Course 20462: Administering Microsoft SQL Server Databases

W I S E. SQL Server 2008/2008 R2 Advanced DBA Performance & WISE LTD.

ExecuTrain Course Outline MOC 6231B: Maintaining a Microsoft SQL Server 2008 R2 Database

BDR for ShadowProtect Solution Guide and Best Practices

OFFICE OF THE CONTROLLER OF CERTIFICATION AUTHORITIES TECHNICAL REQUIREMENTS FOR AUDIT OF CERTIFICATION AUTHORITIES

Sharing Secrets Using Encryption Facility

McAfee Firewall Enterprise 8.3.1

FileCloud Security FAQ

Administering Microsoft SQL Server Databases

Microsoft SQL Server 2008 R2 Enterprise Edition and Microsoft SharePoint Server 2010

Administering Microsoft SQL Server Databases

DigiVault Online Backup Manager. Microsoft SQL Server Backup/Restore Guide

SQL 2016 and SQL Azure

1 Copyright 2012, Oracle and/or its affiliates. All rights reserved. Public Information

How encryption works to provide confidentiality. How hashing works to provide integrity. How digital signatures work to provide authenticity and

One Solution for Real-Time Data protection, Disaster Recovery & Migration

Preview of Oracle Database 12c In-Memory Option. Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Below are the some of the new features of SQL Server that has been discussed in this course

2007 Microsoft Office System Document Encryption

SQL Server Solutions GETTING STARTED WITH. SQL Safe Backup

Administering Microsoft SQL Server Databases

Backup and Restore Back to Basics with SQL LiteSpeed

ClockWork Enterprise 5

Mind Q Systems Private Limited

Transcription:

SQL Server Encryption Overview September 2, 2015

ABOUT ME Edmund Poillion Data Platform Systems Engineer Skyline Associate since 1999 Started in App Dev, changed focus to SQL Server in 2012 Email: epoillion@skylinetechnologies.com Twitter: @epoillion

TOPICS SQL Server Data Encryption concepts supported by SQL Server SQL Server encryption hierarchy Transparent Data Encryption (TDE) Column-Level Encryption

DATA AT REST Data files Transaction Log files Backup files DATA IN USE Buffer pool In transit SQL SERVER DATA

DATA FILES SQL SERVER DATA Table and index data stored in data files (*.mdf, *.ndf) Can have multiple data files, grouped into Filegroups Data in files organized into 8 kb data pages Data pages organized into 8 page extents Uniform extent all pages belong to same object Mixed extent pages from different objects

LOG FILES SQL SERVER DATA Divided into multiple Virtual Log Files (VLF) Records all transactions and the database modifications made by each transaction Must be truncated on a regular basis so it doesn t fill up BACKUP FILES Types: Full, Differential, Log

SQL SERVER DATA BUFFER POOL Holds cached data pages in memory Pages stored exactly as on disk Pages required for query are loaded into buffer pool, then query is executed against buffer pool Pages updated in buffer pool, written to disk later Transaction log allows recovery of changes in case of outage

IN TRANSIT DATA SQL SERVER DATA Data after it leaves the database engine on the way to data consumer Query results in SSMS Across network to corporate applications Across world via web application

ENCRYPTION CONCEPTS HASHES ASYMMETRIC KEYS SYMMETRIC KEYS CERTIFICATES ENCRYPTION ALGORITHMS

ENCRYPTION CONCEPTS HASHES Very fast. One-way encryption. Common for passwords and comparisons. Commands HASHBYTES - MD2, MD4, MD5, SHA, SHA1, SHA2_256, SHA2_512 PWDCOMPARE

ENCRYPTION CONCEPTS SYMMETRIC KEYS Good performance Same key used for encryption and decryption Should be secured by another key Can be secured by Certificate Password Symmetric Key Asymmetric Key EKM Module

ENCRYPTION CONCEPTS ASYMMETRIC KEYS Uses combination of a public and a private key Public key is shared openly, private key guarded Public key is used to encrypt, private key used to decrypt Not best choice for securing data because of performance Best used to encrypt other keys

ENCRYPTION CONCEPTS CERTIFICATES A certificate is a digitally signed security object that contains a public (and optionally a private) key for SQL Server You can use externally generated certificates or SQL Server can generate certificates. SQL Server certificates comply with the IETF X.509v3 certificate standard

ENCRYPTION CONCEPTS CERTIFICATES Useful because of the option of both exporting and importing keys to X.509 certificate files Can offer expiration management (SQL Server does not enforce when used for encryption)

ENCRYPTION CONCEPTS ENCRYPTION ALGORITHMS SQL Server asymmetric keys support RSA_512, RSA_1024, RSA_2048 SQL Server symmetric keys support DES, TRIPLE_DES, TRIPLE_DES_3KEY, RC2, RC4, RC4_128, DESX, AES_128, AES_192, AES_256 RC4 and RC4_128 have been deprecated and should not be used

ENCRYPTION DMVs DEMO

SQL SERVER ENCRYPTION HIERARCHY Service Master Key (SMK) Database Master Key (DMK) Database Encryption Key (DEK) Key Backups

https://msdn.microsoft.com/en-us/library/ms189586(v=sql.110).aspx

SQL SERVER ENCRYPTION HIERARCHY SERVICE MASTER KEY Root of SQL Server Encryption Hierarchy Instance level symmetric key SQL Server 2012+ uses AES encryption. Older versions use 3DES Generated automatically first time it is needed, normally during installation Best Practice: Back up the Service Master Key and store the backed up copy in a secure, off-site location

SQL SERVER ENCRYPTION HIERARCHY SERVICE MASTER KEY Encrypted using Windows Data Protection API (DPAPI) and the local machine key using a key derived from the Windows credentials of the SQL Server service account Can only be opened by the Windows service account under which it was created or by a principal with access to both the service account name and its password

SQL SERVER ENCRYPTION HIERARCHY SERVICE MASTER KEY To change the SQL Server service account, use SQL Server Configuration Manager Regenerating or restoring the Service Master Key involves decrypting and re-encrypting the complete encryption hierarchy

SQL SERVER ENCRYPTION HIERARCHY DATABASE MASTER KEY Database level symmetric key Used to protect the private keys of certificates and asymmetric keys that are present in the database Encrypted by using the Triple DES algorithm and a usersupplied password

SQL SERVER ENCRYPTION HIERARCHY DATABASE MASTER KEY To enable the automatic decryption of the master key, a copy of the key is also encrypted by using the SMK. It is stored in both the database where it is used and in the master database. The copy of the DMK stored in the master database is silently updated whenever the DMK is changed. However, this default can be changed by using the DROP ENCRYPTION BY SERVICE MASTER KEY option of the ALTER MASTER KEY statement. A DMK that is not encrypted by the service master key must be opened by using the OPEN MASTER KEY statement and a password.

DATABASE MASTER KEY DEMO

SQL SERVER ENCRYPTION HIERARCHY DATABASE ENCRYPTION KEY Database level symmetric key Used for transparently encrypting a database Protected by either a certificate protected by the database master key of the master database, or by an asymmetric key stored in an EKM Stored in the database boot record for availability during recovery Supports AES_128, AES_192, AES_256, TRIPLE_DES_3KEY

SQL SERVER ENCRYPTION HIERARCHY KEY BACKUPS Always backup your keys and certificates Service Master Key Database Master Key Certificates used to protect database encryption key No Back Door if you lose these

TRANSPARENT DATA ENCRYPTION Overview Availability What is encrypted What is not encrypted Other considerations Implementation steps Key storage Disaster recovery SQL Server 2014 In-Memory OLTP objects

TRANSPARENT DATA ENCRYPTION OVERVIEW Performs real-time I/O encryption and decryption of the data and log files TDE protects data "at rest", meaning while on disk Enables software developers to encrypt data without changing existing applications.

TRANSPARENT DATA ENCRYPTION OVERVIEW Data is encrypted using the database encryption key (DEK) Encryption of the database file is performed at the page level The pages in an encrypted database are encrypted before they are written to disk and decrypted when read into memory

TRANSPARENT DATA ENCRYPTION OVERVIEW TDE does not increase the size of the encrypted database All files and filegroups will be encrypted. If there are any read-only filegroups, encryption will fail Cannot encrypt master, msdb, or model

TRANSPARENT DATA ENCRYPTION AVAILABILITY SQL Server 2008 and up Enterprise Edition only Cannot restore TDE database to Standard Edition

TRANSPARENT DATA ENCRYPTION WHAT IS ENCRYPTED Data files Transaction log files Database backups tempdb database Encrypted if any database on instance is encrypted Encrypted using AES 256, outside of normal TDE encryption hierarchy

TRANSPARENT DATA ENCRYPTION WHAT IS NOT ENCRYPTED Buffer pool Data on the wire FILESTREAM data

TRANSPARENT DATA ENCRYPTION OTHER CONSIDERATIONS Performance Will use extra CPU (5% - 10% more is common) Must test in your environment Database Compression Works with TDE, page data is compressed before it is encrypted More CPU, must decrypt and decompress each page

TRANSPARENT DATA ENCRYPTION OTHER CONSIDERATIONS Backup Compression Not recommended with TDE Encrypted data does not compress well

TRANSPARENT DATA ENCRYPTION OTHER CONSIDERATIONS Backup Compression AdventureWorks2014 Data File - 205 MB (189 Used) AdventureWorks2014Enlarged Data File - 1,741 MB (1,516 Used) Log File - 18 MB Log File - 130 MB Backup Type Backup Size (KB) Backup Type Backup Size (KB) Control 194,676 Control 1,551,480 Compression 45,672 Compression 535,940 Encryption 194,672 Encryption 1,551,480 Both 194,368 Both 1,550,212

TRANSPARENT DATA ENCRYPTION IMPLEMENTATION STEPS Create database master key for master database, which is protected by password and service master key Create certificate in master database, which is protected by database master key Create database encryption key in database to be encrypted, protected by certificate in master database

TRANSPARENT DATA ENCRYPTION IMPLEMENTATION STEPS Set encryption on for database to be encrypted Monitor encryption progress with sys.dm_database_encryption_keys DMV Will show your database and tempdb are now encrypted Verify your keys and certificates are backed up

TRANSPARENT DATA ENCRYPTION IMPLEMENTATION STEPS Verify your database master key is in the master database with sys.symmetric_keys DMV Verify your certificate is in the master database with sys.certificates DMV

DEMO IMPLEMENT TDE BACKUP KEYS RESTORE FROM DIFFERENT SERVER

TRANSPARENT DATA ENCRYPTION KEY STORAGE Backups Off-Site Storage Cloud Service Extensible Key Management

TRANSPARENT DATA ENCRYPTION DISASTER RECOVERY When moving a TDE protected database, you must also move the certificate or asymmetric key that is used to open the DEK The certificate or asymmetric key must be installed in the master database of the destination server, so that SQL Server can access the database files

TRANSPARENT DATA ENCRYPTION DISASTER RECOVERY You must retain copies of both the certificate file and the private key file in order to recover the certificate

TRANSPARENT DATA ENCRYPTION SQL SERVER 2014 IN-MEMORY OLTP OBJECTS TDE can be enabled on a database that has In-Memory OLTP objects In-Memory OLTP log records are encrypted if TDE is enabled Data in a MEMORY_OPTIMIZED_DATA filegroup is not encrypted if TDE is enabled

COLUMN-LEVEL ENCRYPTION Can be more selective on what you encrypt Requires application changes Can t index on encrypted columns Use SQL Server Cryptographic Functions

DEMO COLUMN-LEVEL ENCRYPTION

Cryptographic Functions Symmetric Encryption and Decryption EncryptByKey EncryptByPassPhrase Key_ID Asymmetric Encryption and Decryption EncryptByAsmKey EncryptByCert Cert_ID CertProperty Signing and Signature Verification SignByAsymKey SignByCert DecryptByKey DecryptByPassPhrase Key_GUID DecryptByAsmKey DecryptByCert AsymKey_ID VerifySignedByAsmKey VerifySignedByCert Symmetric Decryption with Automatic Key Handling DecryptByKeyAutoCert Encryption Hashing HASHBYTES

QUESTIONS?