SlideShare a Scribd company logo
A DATABASE DESIGNER’S
FAVOURITE SECURITY AND
PRIVACY FEATURES IN SQL
SERVER
WITH SOME AZURE STUFF, TOO
KAREN LOPEZ
@DATACHICK
KAREN LOPEZ
Karen has 20+ years of
data and information
architecture
experience on large,
multi-project
programs.
She is a frequent
speaker on data
modeling, data-driven
methodologies and
pattern data models.
She wants you to love
your data.
“Every design decision comes
down to cost, benefit and risk.”
- Karen Lopez
WHY THIS
TOPIC?
Because
We
Love
Our
Data
DATABASE
DESIGNER
Data architect
Data Modeller
Development DBA
Accidental DBAs
Data Steward/Curator
….
10 TOP WEB SECURITY RISKS
https://owasp.org/www-project-top-ten/
Azure Data Catalog - https://azure.microsoft.com/en-
ca/products/data-catalog
Azure Purview - https://azure.microsoft.com/en-
in/products/purview/
WHAT’S HAPPENING WITH DATA GOVERNANCE
CATALOGS AND COCKTAILS?
Require Data Governance Programs
Require
Require Chief Data Officer like roles
Require
Require Data Inventories
Require
Require Data Lineage from data source to data use
Require
PRIVACY AND DATA PROTECTION LEGISLATION
NOT JUST ABOUT BACKUPS OR ENCRYPTIN
GOVERNANCE
Security at the data level
Models capture security & privacy requirements
Management reports of reviews
Measurement
In other words, Governance
DATA MODELS
• Karen’s Preference
• Track all kinds of metadata
• Live
• Advanced Compare features
• Support DevOps and Iterative
development
• Support Conceptual, Logical and
Physical design
DATA QUALITY IS ALSO DATA SECURITY
11
12
ROI
13
SECURITY IN DDL 
BECAUSE IT’S 2023
SECURITY – SQL 2016
Cell level
TDE
Always Encrypted
Data Masking*
Row Level Security
2016!
ALWAYS ENCRYPTED
Always!
Security – Always Encrypted
SECURITY – ALWAYS
ENCRYPTED
Wizard
SECURITY – ALWAYS ENCRYPTED
Enabled at column level
Protects data at rest *AND* in memory
Uses Column Master Key (client) and Column
Encryption Key (server)
ALWAYS ENCRYPTED
20
SECURITY –
ALWAYS
ENCRYPTED
Foreign keys must match
encryption types
Client code needs to
support AE (currently this
means .NET 4.x or above)
21
WHY WOULD A DB
DESIGNER LOVE IT?
Always Encrypted,
yeah.
Allows designers to not
only specify which
columns need to be
protected, but how.
Parameters are
encrypted as well
Built in to the engine,
easier for Devs
DYNAMIC DATA MASKING
REALLY MORE OF A PRIVACY FEATURE THAN A SECURITY ONE
SECURITY – DYNAMIC DATA MASKING
DATA MASKING
EXAMPES
XXXX XXXX XXXX 1234
kxxxxxx@ixxxxx.com
$99,9999
June, 99, 9999
KXXXXX Lopez 25
SECURITY – DYNAMIC DATA MASKING
CREATE TABLE Membership(
MemberID int IDENTITY PRIMARY KEY,
FirstName varchar(100) MASKED WITH (FUNCTION =
'partial(1,"XXXXXXX",0)') NULL,
LastName varchar(100) NOT NULL,
Phone# varchar(12) MASKED WITH (FUNCTION = 'default()') NULL,
Email varchar(100) MASKED WITH (FUNCTION = 'email()') NULL);
DYNAMIC
DATA
MASKING
Done at column level
(NOT ENCRYPTION!)
Data in the database, at
rest, has no protection.
Meant to complement
other methods
Performed at the end of
a database query right
before data returned
Performance impact
small
DYNAMIC DATA MASKING
4
functions
available.
today
• Default
• Email
• Custom String
• Random
DDM FUNCTIONS
Function Mask Example
Default Based on Datatype
String – XXX
Numbers – 000000
Date & Times - 01.01.2000 00:00:00.0000000
Binary – Single Byte 0
XXXX
0
01.01.2000 00:00:00.0000000
0
Email First character of email, then Xs, then .com
Always .com
Kxxx@xxxx.com
Custom First and last values, with Xs in the middle kxxxn
Random For numeric types, with a range 12
29
DYNAMIC DATA MASKING
Data in database is not
changed
01
Ad-hoc queries *can*
expose data
02
Does not aim to
prevent users from
exposing pieces of
sensitive data
03
30
DYNAMIC DATA
MASKING
Cannot mask an encrypted column (AE)
Cannot be configured on computed column
But if computed column depends on a mask,
then mask is returned
Using SELECT INTO or INSERT INTO results in
masked data being inserted into target (also
for import/export) 31
NEW: GRANULAR PERMISSIONS
SPECIFIC
COLUMNS
TABLE DATABASE SCHEMA
WHY
WOULD A
DB
DESIGNER
LOVE IT?
Allows central, reusable
design for standard masking
Offers more reliable masking
and more usable masking
Removes whining about “we
can do that later”
SECURITY – ROW LEVEL SECURITY
ROW LEVEL SECURITY
Filtering result sets (predicate based access)
Predicates applied when reading data
Can be used to block write access
User defined policies tied to inline table functions
ROW LEVEL SECURITY
36
No indication that results have been filtered
If all rows are filtered than NULL set returned
For block predicates, an error returned
Works even if you are dbo or db_owner role
WHY WOULD A DB
DESIGNER LOVE IT?
Allows a designer to do
this sort of data
protection IN THE
DATABASE, not just rely
on code.
Many, many pieces of
code.
SSMS DATA CLASSIFICATION
DATA CLASSIFICATION RESULTS AND
A Designer's Favourite Security and Privacy Features in SQL Server and Azure SQL DB
LEDGER DATABASES AND TABLES
YOU HAD TO KNOW THAT BLOCKCHAIN WOULD SHOW UP AT SOME POINT.
APPEND ONLY LEDGER
TABLES
https://learn.microsoft.com/sql/relational-databases/security/ledger/ledger-overview
AZURE SQL DB LEDGER TABLE – APPEND ONLY
CREATE SCHEMA [AccessControl]
CREATE TABLE [AccessControl].[KeyCardEvents]
(
[EmployeeID] INT NOT NULL,
[AccessOperationDescription] NVARCHAR (MAX) NOT NULL,
[Timestamp] Datetime2 NOT NULL
)
WITH (LEDGER = ON (APPEND_ONLY = ON) );
LEDGER TABLES IN
AZURE SQL DB AND
SQL SERVER
https://learn.microsoft.com/sql/relational-databases/security/ledger/ledger-overview
AZURE SQL DB LEDGER TABLE – UPDATABLE
CREATE TABLE [Account].[Balance]
(
[CustomerID] INT NOT NULL PRIMARY KEY CLUSTERED,
[LastName] VARCHAR (50) NOT NULL,
[FirstName] VARCHAR (50) NOT NULL,
[Balance] DECIMAL (10,2) NOT NULL
)
WITH
(SYSTEM_VERSIONING = ON, LEDGER = ON);
KEY FEATURES
AZURE LEDGER
TABLES
Ledger Databases
Database Digests
Ledger Tables
Updatable
Append only
Immutable storage for transaction recording
Ledger Verification
SAMPLE UPDATABLE LEDGER TABLE
https://docs.microsoft.com/en-us/azure/azure-sql/database/ledger-how-to-updatable-ledger-tables
DEPLOYING A LEDGER TABLE
Property of a Table at
creation time
Set update (versioning) or
append only
DEPLOYING A LEDGER DATABASE
Property of a Database at
creation time
All tables are Ledger
Tables
CHANGING EXISTING TABLE TO A LEDGER TABLE
Alter? No.
Migrate
Create new Ledger
Table
Copy Data to New
Table
Clean up previous
Table
SYS.TABLES
DATABASE
VERIFICATION
WHY WOULD ONE USE A LEDGER TABLE?
More trustworthy
More protection from DBA/SysAdmin tampering
Don’t need or want full blockchain functionality
ARC ENABLED SQL SERVER
 Single point of control for
SQL Servers (On-prem, in
Azure, or in other clouds)
• Dashboards
• Best Practices
Assessments
• AAD authentication
• Microsoft Defender
• Microsoft Purview
• PAYG for SQL Server
https://learn.microsoft.com/en-us/sql/sql-server/azure-arc/overview
A Designer's Favourite Security and Privacy Features in SQL Server and Azure SQL DB
INVENTORY AND
STATUS
SUPPORTED VERSIONS
Windows Server 2012 and later versions
Ubuntu 20.04 (x64)
Red Hat Enterprise Linux (RHEL) 8 (x64)
SUSE Linux Enterprise Server (SLES) 15
(x64)
SQL Server running in containers.
SQL Server Failover Cluster Instances (FCI).
SQL Server roles other than the Database
Engine, such as SSAS, SSRS, or SSIS)
SQL Server editions: Business Intelligence.
SQL Server 2008 (10.0.x), SQL Server 2008 R2
(10.50.x), and older versions.
SQL Server in Azure Virtual Machines.
SQL Server Azure VMware Solution
VMs in other Clouds
https://github.com/microsoft/sqlworkshops-
sql2022workshop/blob/main/sql2022workshop/slides/The%20SQL%20Server%202022%20Workshop.pptx
VULNERABILITY ASSESSMENTS
LET THE ROBOTS DO WHAT THEY ARE GOOD AT DOING
A Designer's Favourite Security and Privacy Features in SQL Server and Azure SQL DB
VULNERABILITY ASSESSMENT
MICROSOFT
DEFENDER
FOR SQL
DATA IN AZURE
MICROSOFT
DEFENDER FOR
SQL
Azure SQL Database
Azure SQL Managed
Instance
Dedicated SQL pool in
Azure Synapse
MICROSOFT
DEFENDER FOR
SQL SERVER
MACHINES
SQL Server on Virtual
Machines
On-Prem SQL Server
(Arc-enabled SQL Server)
On-Prem SQL Server
(running on Windows)
MICROSOFT
DEFENDER FOR
OPEN-SOURCE
RELATIONAL
Azure DB for
PostgreSQL
Azure DB for MySQL
Azure DB for MariaDB
HOW?
Secure scores
Recommendations
Alerting
SECURE
SCORE
HOW DOES MICROSOFT THINK YOU
ARE DOING…MAYBE
SECURE
SCORE
• Based on:
• your progress against
Recommendations
• Microsoft best
practices
• Industry best
practices
SECURE
SCORE
Improve
◦ Remediate
◦ Apply policies
◦ Use
blueprints/templates
◦ Ensure new
deployments comply
REMEDIATING
RECOMMENDATI
ONS
AZURE MONITOR
• Most resources include
Monitor-collected data in
the Overview page of
Azure Portal
• Portal option to see
Monitor for all services
• Can monitor Azure and
on-premises resources
SUMMARY Data quality?
Data
availability?
Data
recovery?
Query
performance?
Legal
requirements?
Which one is right
for you?
Microsoft Defender for Cloud—Databases Protection
Protect SQL workloads through security posture management and allow timely responses to threats
• SQL security misconfigurations
• SQL injection attacks
• Brute-force attacks
• Unusual data exfiltration
• Suspicious access or queries
Cloud native
security
1-click enablement of protect
different type of SQL workloads
(IaaS or PaaS)
Security
posture management
Discover, track, and remediate SQL
workloads security misconfigurations
Advanced
threat protection
Detect and response unusual
and harmful attempts to breach
SQL workloads
Centralized
and integrated
Centralize security across all data assets
managed by Azure and built-in integration
with Sentinel and Purview
1 2 3
https://github.com/microsoft/sqlworkshops-sql2022workshop/blob/main/sql2022workshop/slides/The%20SQL%20Server%202022%20Workshop.pptx
WHAT ARE
YOUR
FAVORITES?
FINALLY…
Performance is
important. But it
doesn’t override
security and
privacy.
ONE MORE TIME…
Every Design
Decision must be
based on Cost,
Benefit and Risk
https://cloudblogs.microsoft.com/sqlserver/2022/11/16/sql-server-2022-is-now-generally-
available/
ONE MORE TIME…
Every Design
Decision must be
based on Cost,
Benefit and Risk
THANK YOU!
GO OUT AND BE
GREAT…AND DESIGN
SECURE DATABASES
@DATACHICK
DATACHICK@MSTDN.CA

More Related Content

PPTX
Designer's Favorite New Features in SQLServer
PPTX
Karen's Favourite Features of SQL Server 2016
PDF
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
PDF
KoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloud
PPTX
ODP
Creating Flexible Data Services For Enterprise Soa With Wso2 Data Services
PDF
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
PPTX
Kåre Rude Andersen - Be a hero – optimize scom and present your services
Designer's Favorite New Features in SQLServer
Karen's Favourite Features of SQL Server 2016
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
KoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloud
Creating Flexible Data Services For Enterprise Soa With Wso2 Data Services
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
Kåre Rude Andersen - Be a hero – optimize scom and present your services

Similar to A Designer's Favourite Security and Privacy Features in SQL Server and Azure SQL DB (20)

PDF
SQL-Server Database.pdf
PPT
Data Mining 2008
PPT
BI 2008 Simple
PPT
SQL Server 2008 Data Mining
PPT
SQL Server 2008 Data Mining
PPT
PPT
SQL Server 2008 Data Mining
PPT
SQL Server 2000 Research Series - Essential Knowledge
PPT
Dr. Jekyll and Mr. Hyde
PPT
SQLCLR For DBAs and Developers
PPTX
Microsoft SQL Azure - Building Applications Using SQL Azure Presentation
PPTX
Migrating on premises workload to azure sql database
PPT
SQL Pass Through and the ODBC Interface
PPTX
Introduction databases and MYSQL
PPTX
PHP mysql Introduction database
PPTX
SQL Azure the database in the cloud
PPT
Sql Pass Through
PPTX
Roles y Responsabilidades en SQL Azure
PPTX
Azure Databricks - An Introduction 2019 Roadshow.pptx
PPT
It ready dw_day3_rev00
SQL-Server Database.pdf
Data Mining 2008
BI 2008 Simple
SQL Server 2008 Data Mining
SQL Server 2008 Data Mining
SQL Server 2008 Data Mining
SQL Server 2000 Research Series - Essential Knowledge
Dr. Jekyll and Mr. Hyde
SQLCLR For DBAs and Developers
Microsoft SQL Azure - Building Applications Using SQL Azure Presentation
Migrating on premises workload to azure sql database
SQL Pass Through and the ODBC Interface
Introduction databases and MYSQL
PHP mysql Introduction database
SQL Azure the database in the cloud
Sql Pass Through
Roles y Responsabilidades en SQL Azure
Azure Databricks - An Introduction 2019 Roadshow.pptx
It ready dw_day3_rev00
Ad

More from Karen Lopez (18)

PPTX
Data Modelling for security and privacy PRAGUE.pptx
PPTX
DGIQ East 2023 AI Ethics SIG
PPTX
Data in the Stars
PDF
WhoseTinklingInYourDataLake - DAMA Chicago.pdf
PPTX
Expert Cloud Data Backup and Recovery Best Practice.pptx
PPTX
Manage Your Time So It Doesn't Manage You
PPTX
Migrating Data and Databases to Azure
PPTX
Blockchain for the DBA and Data Professional
PPTX
Blockchain for the DBA and Data Professional
PDF
Data Security and Protection in DevOps
PPTX
Data Modeling for Security, Privacy and Data Protection
PPTX
Fast Focus: SQL Server Graph Database & Processing
PPTX
Designing for Data Security by Karen Lopez
PPTX
The Key to Keys - Database Design
PPTX
How to Survive as a Data Architect in a Polyglot Database World
PPTX
7 Databases in 70 minutes
PPTX
Karen Lopez 10 Physical Data Modeling Blunders
PPTX
NoSQL and Data Modeling for Data Modelers
Data Modelling for security and privacy PRAGUE.pptx
DGIQ East 2023 AI Ethics SIG
Data in the Stars
WhoseTinklingInYourDataLake - DAMA Chicago.pdf
Expert Cloud Data Backup and Recovery Best Practice.pptx
Manage Your Time So It Doesn't Manage You
Migrating Data and Databases to Azure
Blockchain for the DBA and Data Professional
Blockchain for the DBA and Data Professional
Data Security and Protection in DevOps
Data Modeling for Security, Privacy and Data Protection
Fast Focus: SQL Server Graph Database & Processing
Designing for Data Security by Karen Lopez
The Key to Keys - Database Design
How to Survive as a Data Architect in a Polyglot Database World
7 Databases in 70 minutes
Karen Lopez 10 Physical Data Modeling Blunders
NoSQL and Data Modeling for Data Modelers
Ad

Recently uploaded (20)

PDF
Modernizing your data center with Dell and AMD
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPT
Teaching material agriculture food technology
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Cloud computing and distributed systems.
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Advanced IT Governance
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
KodekX | Application Modernization Development
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
Modernizing your data center with Dell and AMD
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
NewMind AI Monthly Chronicles - July 2025
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Advanced Soft Computing BINUS July 2025.pdf
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Teaching material agriculture food technology
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
MYSQL Presentation for SQL database connectivity
Spectral efficient network and resource selection model in 5G networks
Cloud computing and distributed systems.
Dropbox Q2 2025 Financial Results & Investor Presentation
Advanced IT Governance
Mobile App Security Testing_ A Comprehensive Guide.pdf
KodekX | Application Modernization Development
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Chapter 3 Spatial Domain Image Processing.pdf
20250228 LYD VKU AI Blended-Learning.pptx

A Designer's Favourite Security and Privacy Features in SQL Server and Azure SQL DB