SlideShare a Scribd company logo
#SQLSAT454
SQL Server 2016 New Security
Features
Gianluca Sartori
@spaghettidba
#SQLSAT454
Sponsors
#SQLSAT454
Gianluca Sartori
 Independent SQL Server consultant
 SQL Server MVP, MCTS, MCITP, MCT
 Works with SQL Server since version 7
 DBA @ Scuderia Ferrari
 Blog: spaghettidba.com
 Twitter: @spaghettidba
#SQLSAT454
Agenda
 Security Boundaries
 Always Encrypted
 Row Level Security
 Dynamic Data Masking
#SQLSAT454
Why New Security Features?
 SQL Server has plenty security features
 TDE
 Protects database files and backups at rest
 Cell-Level Encryption
 Encrypts single values in database tables
 SSL
 Protects data on the network
#SQLSAT454
Security Boundaries – Open
Apps
SSMS
Database
Developer DBA
Manager User
Software Vendor
Unauthorized
Users
#SQLSAT454
Security Boundaries – Non Sensitive
Apps
SSMS
Database
Developer
DBA
Manager User
Software Vendor
Unauthorized
Users
Copy
Copy
#SQLSAT454
Security Boundaries – Sensitive
Apps
SSMS
Database
Developer
DBA
Manager User
Software Vendor
Unauthorized
Users
Copy
Copy
#SQLSAT454
ALWAYS ENCRYPTED
#SQLSAT454
Always Encrypted – Key Features
Prevents Data
Disclosure
End-to-end
encryption of
individual columns
in a table with keys
that are never given
to the database
system.
Queries on
Encrypted Data
Support for equality
comparison, incl.
join, group by and
distinct operators.
Application
Transparency
Minimal application
changes via server
and client library
enhancements.
#SQLSAT454
Always Encrypted
 Sensitive data is encrypted at column level
 Data is protected from high-privileged users
 DBAs
 System Admins
 Hackers
 Data is stored securely outside security
boundaries
 The database never sees unencrypted data
 Cloud providers
 Third-parties
#SQLSAT454
Always Encrypted – How it works
App
SELECT Name FROM
Patients WHERE SSN=@SSN
@SSN='198-33-0987'
Column
Encryption
Key
Jane Doe
Name
1x7fg655se2
e
SSN
USA
Country
Jim Gray 0x7ff654ae6d USA
John Smith 0y8fj754ea2c USA
dbo.Patients
Result Set
Jim Gray
Name
Query
Application - Trusted SQL Server - Untrusted
SELECT Name FROM
Patients WHERE SSN=@SSN
@SSN=0x7ff654ae6d
Enhanced
ADO.NET
Library
SQL Server
Native Client
.NET 4.6
Column
Master
Key
#SQLSAT454
Encryption Types
 Deterministic Encryption
Same plaintext value  Same encrypted value
Supports indexing, equality comparison, JOINs,
DISTINCT
 Randomized Encryption
Same plaintext value  Different encrypted value
Supports retrieval of encrypted data
No SQL operations supported
#SQLSAT454
DEMO
Working with Always Encrypted
#SQLSAT454
TDE vs Always Encrypted
Always Encrypted TDE
Column level Database level
Client encryption Server encryption
Server doesn’t know
encryption keys
Server knows encryption
keys
Data in memory is encrypted Data in memory is in
plaintext
Data travels the network
encrypted
Data travels the network in
plaintext
#SQLSAT454
Custom encryption vs Always Encrypted
Always Encrypted Custom Encryption
Slight application changes Needs obtrusive changes
Disallows saving plaintext
data
Plaintext data can be saved
by accident
Allows indexing of
cyphertext *
Allows indexing of
cyphertext *
* depending on encryption algorithm
#SQLSAT454
Always Encrypted - Limitations
 Deterministic encryption needs _BIN2 collation
 Not all datatypes supported
 Partial support for triggers
 Unsupported features:
 Full-text search
 Replication
 Change Data Capture
 In-Memory OLTP
 Stretch Database
#SQLSAT454
What changes for Applications?
 ConnectionString must include new key:
Column Encryption Setting=enabled;
 Ad-hoc queries not supported
SELECT SomeColumn
FROM SomeTable
WHERE EncrypedColumn = 'SomeValue';
 Needs correctly parameterized queries
SELECT SomeColumn
FROM SomeTable
WHERE EncrypedColumn = @param;
#SQLSAT454
Always Encrypted for Existing Data
 Existing columns must be encrypted client side
 Easiest way: Import / Export wizard
Ad-hoc wizard
In SSMS 2016?
#SQLSAT454
Performance Impact
#SQLSAT454
Space Usage Impact
#SQLSAT454
Q&A
Questions?
#SQLSAT454
DYNAMIC DATA MASKING
#SQLSAT454
Dynamic Data Masking – Key Features
Limits Sensitive
Data Exposure
Sensitive data is
masked.
Administrators
designate how much
of the sensitive data
to reveal.
Useful for
Compliance
Helps adhering to
privacy standards
imposed by
regulation
authorities.
Application
Transparency
No application
changes. Existing
queries keep
working.
#SQLSAT454
Dynamic Data Masking
Database
Non-Privileged
User
Privileged User
Unmasked Data
DATA
Jane Doe
Name
062-56-4651
SSN
2.500
Salary
Jim Gray 915-12-9845 2.350
John Smith 354-21-9184 1.500
dbo.Employees
062-56-4651
SSN
Masked Data
XXX-XX-XXXX
SSN
#SQLSAT454
Dynamic Data Masking
 Obfuscates data using 3 masking functions
 Default: depends on data type
 Email: aXXX.XXXX.com
 Partial: prefixXXXXXXsuffix
 Data is stored unmasked
 Masking happens on resultset formation
 GRANT UNMASK to disclose data
 Works in Azure SQL Database (preview)
#SQLSAT454
Dynamic Data Masking - Limitations
 Not all datatypes supported
 Not intended as a complete protection feature for
sensitive data
 Ad-Hoc queries disclose data. Ex: WHERE Salary > 2000
 INSERT…SELECT does not preserve masking
 Some quirks
 Not suitable for handing out copies of the database
to software vendors or third-parties
#SQLSAT454
DEMO
Working with Dynamic Data Masking
#SQLSAT454
Q&A
Questions?
#SQLSAT454
ROW-LEVEL SECURITY
#SQLSAT454
Row Level Security – Key Features
Fine-grained
access control
In multi-tenant
databases, limits
access by other
users who share the
same tables.
Centralized
Security Logic
Predicate-based
access control logic
resides inside the
database and is
schema-bound to
the tables it protects.
Application
Transparency
No application
changes. Existing
queries keep
working.
#SQLSAT454
Row-Level Security
LATAM
Salesperson
EMEA
Salesperson
Evil Inc.
Name
EMEA
Area
2.500
Budget
Wealthy Corp. LATAM 2.350
Greedy Corp. APAC 1.500
dbo.Customer
Manager
APAC
Salesperson
#SQLSAT454
Row-Level Security - Concepts
 Predicate function
User-defined inline iTVF implementing access control logic.
Can be arbitrarily complicated
 Security predicate
Applies a predicate function to a particular table (APPLY)
Two types: filter predicates and blocking predicates
 Security policy
Collection of security predicates
Manages security across multiple tables
#SQLSAT454
Row-Level Security – How it works
EMEA
Salesperson
Evil Inc.
Name
EMEA
Area
2.500
Budget
Wealthy Corp. LATAM 2.350
Greedy Corp. APAC 1.500
dbo.Customer
DBA
Security Policy
SELECT *
FROM Customer
SELECT *
FROM Customer
APPLY itvf_securityPredicate()
#SQLSAT454
DEMO
Working with Row-Level Security
#SQLSAT454
Row-Level Security - Limitations
 SCHEMABINDING: all tables in the predicate
function must reside in the database
 Performance impact: queries are rewritten
 When authenticating the application,
CONTEXT_INFO() can be used to filter on real user
 Not really secure if users can run ad-hoc queries
 Don’t lock out the DBA!
#SQLSAT454
Q&A
Questions?
#SQLSAT454
Resources
Always Encrypted on MSDN
Getting Started With Always Encrypted
Performance impact of Always Encrypted
Dynamic Data Masking on MSDN
Using Dynamic Data Masking
Row-Level Security on MSDN
Introduction to Row-Level Security
Row-Level Security Limitations
#SQLSAT454
Evaluations
 Don’t forget to compile evaluations form here
 http://speakerscore.com/sqlsat454
#SQLSAT454
THANKS!
#sqlsat454

More Related Content

What's hot (20)

PPTX
SQL Explore 2012 - Meir Dudai: DAC
sqlserver.co.il
 
PDF
Mastering the move
Trivadis
 
PPTX
Upgrade your SQL Server like a Ninja
Amit Banerjee
 
PDF
Database Modernization
Trivadis
 
PPTX
Migration to Alibaba Cloud
Alibaba Cloud
 
PPT
MySQL Alta Disponibilidade com Replicação
MySQL Brasil
 
PPTX
How to Set Up ApsaraDB for RDS on Alibaba Cloud
Alibaba Cloud
 
PDF
Andy Kennedy - Scottish VMUG April 2016
Andy Kennedy
 
PPTX
Azure Data platform
Mostafa
 
PPTX
Choosing the right Cloud Database
Janakiram MSV
 
PPTX
Jax Cloud 2016 Microsoft Ignite Recap
Ben Stegink
 
PDF
KoprowskiT_SQLSatDenmark_WASDforBeginners
Tobias Koprowski
 
PDF
MySQL overview
Mark Swarbrick
 
PDF
Trivadis - Microsoft Swiss Cloud Services
Trivadis
 
PDF
5 Postgres DBA Tips
EDB
 
PPTX
MySQL enterprise edition
Mark Swarbrick
 
PPTX
Market Trends in Microsoft Azure
GlobalLogic Ukraine
 
PDF
Oracle Data Protection - 2. část
MarketingArrowECS_CZ
 
PDF
Oracle virtualbox basic to rac attack
Bobby Curtis
 
PDF
Database Security Threats - MariaDB Security Best Practices
MariaDB plc
 
SQL Explore 2012 - Meir Dudai: DAC
sqlserver.co.il
 
Mastering the move
Trivadis
 
Upgrade your SQL Server like a Ninja
Amit Banerjee
 
Database Modernization
Trivadis
 
Migration to Alibaba Cloud
Alibaba Cloud
 
MySQL Alta Disponibilidade com Replicação
MySQL Brasil
 
How to Set Up ApsaraDB for RDS on Alibaba Cloud
Alibaba Cloud
 
Andy Kennedy - Scottish VMUG April 2016
Andy Kennedy
 
Azure Data platform
Mostafa
 
Choosing the right Cloud Database
Janakiram MSV
 
Jax Cloud 2016 Microsoft Ignite Recap
Ben Stegink
 
KoprowskiT_SQLSatDenmark_WASDforBeginners
Tobias Koprowski
 
MySQL overview
Mark Swarbrick
 
Trivadis - Microsoft Swiss Cloud Services
Trivadis
 
5 Postgres DBA Tips
EDB
 
MySQL enterprise edition
Mark Swarbrick
 
Market Trends in Microsoft Azure
GlobalLogic Ukraine
 
Oracle Data Protection - 2. část
MarketingArrowECS_CZ
 
Oracle virtualbox basic to rac attack
Bobby Curtis
 
Database Security Threats - MariaDB Security Best Practices
MariaDB plc
 

Viewers also liked (20)

PPTX
Expert summit SQL Server 2016
Łukasz Grala
 
PDF
SQL Server 2016 novelties
MSDEVMTL
 
PDF
What's New in SQL Server 2016 for BI
Teo Lachev
 
PPTX
Accelerating Business Intelligence Solutions with Microsoft Azure pass
Jason Strate
 
PPTX
Georgia Azure Event - Scalable cloud games using Microsoft Azure
Microsoft
 
PDF
OpenPOWER Roadmap Toward CORAL
inside-BigData.com
 
PDF
The State of Linux Containers
inside-BigData.com
 
PDF
OpenPOWER Update
inside-BigData.com
 
PDF
IBM POWER8 as an HPC platform
Alexander Pozdneev
 
PDF
Presentacin webinar move_up_to_power8_with_scale_out_servers_final
Diego Alberto Tamayo
 
PPTX
Blockchain
Benjamin Fuentes
 
PPTX
Bitcoin explained
Benjamin Fuentes
 
PDF
Oracle Solaris Software Integration
OTN Systems Hub
 
PDF
Open Innovation with Power Systems
IBM Power Systems
 
PDF
IBM Power8 announce
Anna Landolfi
 
PPTX
Puppet + Windows Nano Server
Alessandro Pilotti
 
PDF
Oracle Solaris Secure Cloud Infrastructure
OTN Systems Hub
 
PDF
IlOUG Tech Days 2016 - Big Data for Oracle Developers - Towards Spark, Real-T...
Mark Rittman
 
PDF
Oracle Solaris Build and Run Applications Better on 11.3
OTN Systems Hub
 
PDF
The Quantum Effect: HPC without FLOPS
inside-BigData.com
 
Expert summit SQL Server 2016
Łukasz Grala
 
SQL Server 2016 novelties
MSDEVMTL
 
What's New in SQL Server 2016 for BI
Teo Lachev
 
Accelerating Business Intelligence Solutions with Microsoft Azure pass
Jason Strate
 
Georgia Azure Event - Scalable cloud games using Microsoft Azure
Microsoft
 
OpenPOWER Roadmap Toward CORAL
inside-BigData.com
 
The State of Linux Containers
inside-BigData.com
 
OpenPOWER Update
inside-BigData.com
 
IBM POWER8 as an HPC platform
Alexander Pozdneev
 
Presentacin webinar move_up_to_power8_with_scale_out_servers_final
Diego Alberto Tamayo
 
Blockchain
Benjamin Fuentes
 
Bitcoin explained
Benjamin Fuentes
 
Oracle Solaris Software Integration
OTN Systems Hub
 
Open Innovation with Power Systems
IBM Power Systems
 
IBM Power8 announce
Anna Landolfi
 
Puppet + Windows Nano Server
Alessandro Pilotti
 
Oracle Solaris Secure Cloud Infrastructure
OTN Systems Hub
 
IlOUG Tech Days 2016 - Big Data for Oracle Developers - Towards Spark, Real-T...
Mark Rittman
 
Oracle Solaris Build and Run Applications Better on 11.3
OTN Systems Hub
 
The Quantum Effect: HPC without FLOPS
inside-BigData.com
 
Ad

Similar to SQL Server 2016 New Security Features (20)

PDF
Sql Server 2016 Always Encrypted
Duncan Greaves PhD
 
PPTX
Sql server security in an insecure world
Gianluca Sartori
 
PPTX
Securing your data with Azure SQL DB
Microsoft Tech Community
 
PPTX
Always encrypted overview
SolidQ
 
PDF
Organizational compliance and security in Microsoft SQL 2012-2016
George Walters
 
PDF
Oracle Key Vault Data Subsetting and Masking
DLT Solutions
 
PPTX
Seguridad en sql server 2016 y 2017
Maximiliano Accotto
 
PPTX
Seguridad en sql server 2016 y 2017
Maximiliano Accotto
 
PPT
SQL Server Encryption - Adi Cohn
sqlserver.co.il
 
PPTX
Isaca sql server 2008 r2 security & auditing
Antonios Chatzipavlis
 
PPT
SQL Server 2008 Security Overview
ukdpe
 
PPTX
SQL Server 2016: Just a Few of Our DBA's Favorite Things
Hostway|HOSTING
 
PPTX
Understanding SQL Server 2016 Always Encrypted
Ed Leighton-Dick
 
PPTX
SQLCAT - Data and Admin Security
Denny Lee
 
PPTX
SQL INJECTION ATTACKS.pptx
REMEGIUSPRAVEENSAHAY
 
PDF
Modern Data Security with MySQL
Vittorio Cioe
 
PPTX
Pillars of great Azure Architecture
Karthikeyan VK
 
PPTX
Database security2 adebiaye
DR RICHMOND ADEBIAYE
 
PPTX
Database security
Arpana shree
 
PDF
Enhancing the Security of Data at Rest with SAP ASE 16
SAP Technology
 
Sql Server 2016 Always Encrypted
Duncan Greaves PhD
 
Sql server security in an insecure world
Gianluca Sartori
 
Securing your data with Azure SQL DB
Microsoft Tech Community
 
Always encrypted overview
SolidQ
 
Organizational compliance and security in Microsoft SQL 2012-2016
George Walters
 
Oracle Key Vault Data Subsetting and Masking
DLT Solutions
 
Seguridad en sql server 2016 y 2017
Maximiliano Accotto
 
Seguridad en sql server 2016 y 2017
Maximiliano Accotto
 
SQL Server Encryption - Adi Cohn
sqlserver.co.il
 
Isaca sql server 2008 r2 security & auditing
Antonios Chatzipavlis
 
SQL Server 2008 Security Overview
ukdpe
 
SQL Server 2016: Just a Few of Our DBA's Favorite Things
Hostway|HOSTING
 
Understanding SQL Server 2016 Always Encrypted
Ed Leighton-Dick
 
SQLCAT - Data and Admin Security
Denny Lee
 
SQL INJECTION ATTACKS.pptx
REMEGIUSPRAVEENSAHAY
 
Modern Data Security with MySQL
Vittorio Cioe
 
Pillars of great Azure Architecture
Karthikeyan VK
 
Database security2 adebiaye
DR RICHMOND ADEBIAYE
 
Database security
Arpana shree
 
Enhancing the Security of Data at Rest with SAP ASE 16
SAP Technology
 
Ad

More from Gianluca Sartori (9)

PPTX
Benchmarking like a pro
Gianluca Sartori
 
PPTX
Sql server infernals
Gianluca Sartori
 
PPTX
Responding to extended events in near real time
Gianluca Sartori
 
PPTX
SQL Server Worst Practices - EN
Gianluca Sartori
 
PPTX
TSQL Advanced Query Techniques
Gianluca Sartori
 
PPTX
My Query is slow, now what?
Gianluca Sartori
 
PPTX
SQL Server Benchmarking, Baselining and Workload Analysis
Gianluca Sartori
 
PPTX
A performance tuning methodology
Gianluca Sartori
 
PPTX
SQL Server Worst Practices
Gianluca Sartori
 
Benchmarking like a pro
Gianluca Sartori
 
Sql server infernals
Gianluca Sartori
 
Responding to extended events in near real time
Gianluca Sartori
 
SQL Server Worst Practices - EN
Gianluca Sartori
 
TSQL Advanced Query Techniques
Gianluca Sartori
 
My Query is slow, now what?
Gianluca Sartori
 
SQL Server Benchmarking, Baselining and Workload Analysis
Gianluca Sartori
 
A performance tuning methodology
Gianluca Sartori
 
SQL Server Worst Practices
Gianluca Sartori
 

Recently uploaded (20)

PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
July Patch Tuesday
Ivanti
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Biography of Daniel Podor.pdf
Daniel Podor
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
July Patch Tuesday
Ivanti
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 

SQL Server 2016 New Security Features

  • 1. #SQLSAT454 SQL Server 2016 New Security Features Gianluca Sartori @spaghettidba
  • 3. #SQLSAT454 Gianluca Sartori  Independent SQL Server consultant  SQL Server MVP, MCTS, MCITP, MCT  Works with SQL Server since version 7  DBA @ Scuderia Ferrari  Blog: spaghettidba.com  Twitter: @spaghettidba
  • 4. #SQLSAT454 Agenda  Security Boundaries  Always Encrypted  Row Level Security  Dynamic Data Masking
  • 5. #SQLSAT454 Why New Security Features?  SQL Server has plenty security features  TDE  Protects database files and backups at rest  Cell-Level Encryption  Encrypts single values in database tables  SSL  Protects data on the network
  • 6. #SQLSAT454 Security Boundaries – Open Apps SSMS Database Developer DBA Manager User Software Vendor Unauthorized Users
  • 7. #SQLSAT454 Security Boundaries – Non Sensitive Apps SSMS Database Developer DBA Manager User Software Vendor Unauthorized Users Copy Copy
  • 8. #SQLSAT454 Security Boundaries – Sensitive Apps SSMS Database Developer DBA Manager User Software Vendor Unauthorized Users Copy Copy
  • 10. #SQLSAT454 Always Encrypted – Key Features Prevents Data Disclosure End-to-end encryption of individual columns in a table with keys that are never given to the database system. Queries on Encrypted Data Support for equality comparison, incl. join, group by and distinct operators. Application Transparency Minimal application changes via server and client library enhancements.
  • 11. #SQLSAT454 Always Encrypted  Sensitive data is encrypted at column level  Data is protected from high-privileged users  DBAs  System Admins  Hackers  Data is stored securely outside security boundaries  The database never sees unencrypted data  Cloud providers  Third-parties
  • 12. #SQLSAT454 Always Encrypted – How it works App SELECT Name FROM Patients WHERE SSN=@SSN @SSN='198-33-0987' Column Encryption Key Jane Doe Name 1x7fg655se2 e SSN USA Country Jim Gray 0x7ff654ae6d USA John Smith 0y8fj754ea2c USA dbo.Patients Result Set Jim Gray Name Query Application - Trusted SQL Server - Untrusted SELECT Name FROM Patients WHERE SSN=@SSN @SSN=0x7ff654ae6d Enhanced ADO.NET Library SQL Server Native Client .NET 4.6 Column Master Key
  • 13. #SQLSAT454 Encryption Types  Deterministic Encryption Same plaintext value  Same encrypted value Supports indexing, equality comparison, JOINs, DISTINCT  Randomized Encryption Same plaintext value  Different encrypted value Supports retrieval of encrypted data No SQL operations supported
  • 15. #SQLSAT454 TDE vs Always Encrypted Always Encrypted TDE Column level Database level Client encryption Server encryption Server doesn’t know encryption keys Server knows encryption keys Data in memory is encrypted Data in memory is in plaintext Data travels the network encrypted Data travels the network in plaintext
  • 16. #SQLSAT454 Custom encryption vs Always Encrypted Always Encrypted Custom Encryption Slight application changes Needs obtrusive changes Disallows saving plaintext data Plaintext data can be saved by accident Allows indexing of cyphertext * Allows indexing of cyphertext * * depending on encryption algorithm
  • 17. #SQLSAT454 Always Encrypted - Limitations  Deterministic encryption needs _BIN2 collation  Not all datatypes supported  Partial support for triggers  Unsupported features:  Full-text search  Replication  Change Data Capture  In-Memory OLTP  Stretch Database
  • 18. #SQLSAT454 What changes for Applications?  ConnectionString must include new key: Column Encryption Setting=enabled;  Ad-hoc queries not supported SELECT SomeColumn FROM SomeTable WHERE EncrypedColumn = 'SomeValue';  Needs correctly parameterized queries SELECT SomeColumn FROM SomeTable WHERE EncrypedColumn = @param;
  • 19. #SQLSAT454 Always Encrypted for Existing Data  Existing columns must be encrypted client side  Easiest way: Import / Export wizard Ad-hoc wizard In SSMS 2016?
  • 24. #SQLSAT454 Dynamic Data Masking – Key Features Limits Sensitive Data Exposure Sensitive data is masked. Administrators designate how much of the sensitive data to reveal. Useful for Compliance Helps adhering to privacy standards imposed by regulation authorities. Application Transparency No application changes. Existing queries keep working.
  • 25. #SQLSAT454 Dynamic Data Masking Database Non-Privileged User Privileged User Unmasked Data DATA Jane Doe Name 062-56-4651 SSN 2.500 Salary Jim Gray 915-12-9845 2.350 John Smith 354-21-9184 1.500 dbo.Employees 062-56-4651 SSN Masked Data XXX-XX-XXXX SSN
  • 26. #SQLSAT454 Dynamic Data Masking  Obfuscates data using 3 masking functions  Default: depends on data type  Email: aXXX.XXXX.com  Partial: prefixXXXXXXsuffix  Data is stored unmasked  Masking happens on resultset formation  GRANT UNMASK to disclose data  Works in Azure SQL Database (preview)
  • 27. #SQLSAT454 Dynamic Data Masking - Limitations  Not all datatypes supported  Not intended as a complete protection feature for sensitive data  Ad-Hoc queries disclose data. Ex: WHERE Salary > 2000  INSERT…SELECT does not preserve masking  Some quirks  Not suitable for handing out copies of the database to software vendors or third-parties
  • 31. #SQLSAT454 Row Level Security – Key Features Fine-grained access control In multi-tenant databases, limits access by other users who share the same tables. Centralized Security Logic Predicate-based access control logic resides inside the database and is schema-bound to the tables it protects. Application Transparency No application changes. Existing queries keep working.
  • 32. #SQLSAT454 Row-Level Security LATAM Salesperson EMEA Salesperson Evil Inc. Name EMEA Area 2.500 Budget Wealthy Corp. LATAM 2.350 Greedy Corp. APAC 1.500 dbo.Customer Manager APAC Salesperson
  • 33. #SQLSAT454 Row-Level Security - Concepts  Predicate function User-defined inline iTVF implementing access control logic. Can be arbitrarily complicated  Security predicate Applies a predicate function to a particular table (APPLY) Two types: filter predicates and blocking predicates  Security policy Collection of security predicates Manages security across multiple tables
  • 34. #SQLSAT454 Row-Level Security – How it works EMEA Salesperson Evil Inc. Name EMEA Area 2.500 Budget Wealthy Corp. LATAM 2.350 Greedy Corp. APAC 1.500 dbo.Customer DBA Security Policy SELECT * FROM Customer SELECT * FROM Customer APPLY itvf_securityPredicate()
  • 36. #SQLSAT454 Row-Level Security - Limitations  SCHEMABINDING: all tables in the predicate function must reside in the database  Performance impact: queries are rewritten  When authenticating the application, CONTEXT_INFO() can be used to filter on real user  Not really secure if users can run ad-hoc queries  Don’t lock out the DBA!
  • 38. #SQLSAT454 Resources Always Encrypted on MSDN Getting Started With Always Encrypted Performance impact of Always Encrypted Dynamic Data Masking on MSDN Using Dynamic Data Masking Row-Level Security on MSDN Introduction to Row-Level Security Row-Level Security Limitations
  • 39. #SQLSAT454 Evaluations  Don’t forget to compile evaluations form here  http://speakerscore.com/sqlsat454