SlideShare a Scribd company logo
Securing your data with
Azure SQL DB
Eng Soon Cheah
‘ ’ OR ‘1’ =‘1’;
SELECT id FROM customer data WHERE
username=‘ ‘ AND password=‘ ‘ OR
‘1’=‘1’;
SQLSaturday#893 – Singapore
SQLSaturday#893 – Singapore
SELECT id From customer_data WHERE
username=‘ ‘ AND password=‘ ‘ OR
username=‘jsmith’;
SQLSaturday#893 – Singapore
SQLSaturday#893 – Singapore
Agenda
Misconfigured Azure SQL?
Best Practices for Secure Databases
• Firewall Rule for Virtual Networks
• Transparent Data Encryption
• Auditing & Threat Detection
• Dynamic Data Masking
Misconfigured Azure
SQL?
Risks to misconfigured Azure
SQL?
• Restricted Server Access
• Data Encryption
• Resource Locks
• Auto Failover Groups
• Database Auditing
• Audit Retention
SQLSaturday#893 – Singapore
Best Practices for
Secure Databases
1 - Firewall Rule for
Virtual Networks
(a)Set Server Firewall for Azure
SQL Databases
SQLSaturday#893 – Singapore
SQLSaturday#893 – Singapore
(b) Service Endpoints on Virtual
Network
SQLSaturday#893 – Singapore
SQLSaturday#893 – Singapore
SQLSaturday#893 – Singapore
2 - Transparent Data
Encryption
3 ways to encrypt
• Cell-level encryption
• Always Encrypted
• Row-Level Security
SQLSaturday#893 – Singapore
Configuring TDE at the Database
level
SQLSaturday#893 – Singapore
Configuring to use your own Key
with TDE
SQLSaturday#893 – Singapore
3 - Auditing & Threat
Detection
Best Practices for database
threat protection
• Discover, classify, and label the
sensitive data in your databases.
• Track database vulnerabilities so you
can proactively improve your
database security.
• Enable threat detection.
SQLSaturday#893 – Singapore
Configurations
SQLSaturday#893 – Singapore
SQLSaturday#893 – Singapore
SQLSaturday#893 – Singapore
Enabling at Database level vs
Server level
SQLSaturday#893 – Singapore
4 - Dynamic Data
Masking
Feature Basics
SQLSaturday#893 – Singapore
Adding Masking Rules
SQLSaturday#893 – Singapore
DEMOSQLSaturday#893 – Singapore
References
Twitter : @CheahEngSoon
YouTube :
youtube.com/c/engsooncheah
Blog:
Dev.to/cheahengsoon
SQLSaturday#893 – Singapore
Securing your data with Azure SQL DB

More Related Content

PDF
Cassandra Community Webinar | Getting Started with Apache Cassandra with Patr...
PPTX
SQL azure database for DBA
PDF
Journey to cloud openstack nexus ipma 2013
PPTX
Azure key vault - Brisbane User Group
PPTX
Cassandra Adoption on Cisco UCS & Open stack
PPTX
Scylla Cloud on Display: Functionality, Performance and Demos
PPTX
Azure Low Lands 2019 - Building secure cloud applications with Azure Key Vault
PDF
AWS Cost Control: Cloud Custodian
Cassandra Community Webinar | Getting Started with Apache Cassandra with Patr...
SQL azure database for DBA
Journey to cloud openstack nexus ipma 2013
Azure key vault - Brisbane User Group
Cassandra Adoption on Cisco UCS & Open stack
Scylla Cloud on Display: Functionality, Performance and Demos
Azure Low Lands 2019 - Building secure cloud applications with Azure Key Vault
AWS Cost Control: Cloud Custodian

What's hot (9)

PDF
FAUG Jyväskylä 28.5.2019 - Azure Monitoring
PPTX
Using Vault for your Nodejs Secrets
PDF
IT Camp 19: Top Azure security fails and how to avoid them
PPTX
Nagios Conference 2014 - Scott Wilkerson - Log Monitoring and Log Management ...
PDF
TechDays Finland 2020: Best practices of securing web applications running on...
PDF
Philipp Krenn - Host your database in the cloud, they said... - NoSQL matters...
PPTX
Geo Searches for Health Care Pricing Data with MongoDB
PDF
BSides Portland - Attacking Azure Environments with PowerShell
PDF
Overview of secret management solutions and architecture
FAUG Jyväskylä 28.5.2019 - Azure Monitoring
Using Vault for your Nodejs Secrets
IT Camp 19: Top Azure security fails and how to avoid them
Nagios Conference 2014 - Scott Wilkerson - Log Monitoring and Log Management ...
TechDays Finland 2020: Best practices of securing web applications running on...
Philipp Krenn - Host your database in the cloud, they said... - NoSQL matters...
Geo Searches for Health Care Pricing Data with MongoDB
BSides Portland - Attacking Azure Environments with PowerShell
Overview of secret management solutions and architecture
Ad

Similar to Securing your data with Azure SQL DB (20)

PPTX
A Designer's Favourite Security and Privacy Features in SQL Server and Azure ...
PPTX
Designer's Favorite New Features in SQLServer
PDF
Windows azure sql_database_security_isug012013
PPTX
03_DP_300T00A_Secure_Environment.pptx
PPTX
Securing your data with Azure SQL DB
PPTX
Modern Data Security for the Enterprises – SQL Server & Azure SQL Database
PPTX
The Spy Who Loathed Me - An Intro to SQL Server Security
PDF
KoprowskiT_SQLSatHolland_SQLServerSecurityInTheCloud
DOCX
Database Security – Issues and Best PracticesOutline
PDF
Organizational compliance and security SQL 2012-2019 by George Walters
PDF
Securing Azure Sql Server
PDF
KoprowskiT_SQLRelayCaerdydd_SQLSecurityInTheClouds
PDF
KoprowskiT_SQLRelayBirmingham_SQLSecurityInTheClouds
PDF
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
PPTX
Seguridad en sql server 2016 y 2017
PPTX
Seguridad en sql server 2016 y 2017
PPTX
Database security
PPTX
Tech-Spark: Azure SQL Databases
PPTX
Understanding SQL Server 2016 Always Encrypted
PDF
Organizational compliance and security in Microsoft SQL 2012-2016
A Designer's Favourite Security and Privacy Features in SQL Server and Azure ...
Designer's Favorite New Features in SQLServer
Windows azure sql_database_security_isug012013
03_DP_300T00A_Secure_Environment.pptx
Securing your data with Azure SQL DB
Modern Data Security for the Enterprises – SQL Server & Azure SQL Database
The Spy Who Loathed Me - An Intro to SQL Server Security
KoprowskiT_SQLSatHolland_SQLServerSecurityInTheCloud
Database Security – Issues and Best PracticesOutline
Organizational compliance and security SQL 2012-2019 by George Walters
Securing Azure Sql Server
KoprowskiT_SQLRelayCaerdydd_SQLSecurityInTheClouds
KoprowskiT_SQLRelayBirmingham_SQLSecurityInTheClouds
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
Seguridad en sql server 2016 y 2017
Seguridad en sql server 2016 y 2017
Database security
Tech-Spark: Azure SQL Databases
Understanding SQL Server 2016 Always Encrypted
Organizational compliance and security in Microsoft SQL 2012-2016
Ad

More from Cheah Eng Soon (20)

PPTX
Microsoft Defender for Endpoint
PPTX
Azure Active Directory - Secure and Govern
PPTX
Microsoft Zero Trust
PPTX
MEM for OnPrem Environments
PPTX
Microsoft Threat Protection Automated Incident Response
PDF
Azure Penetration Testing
PDF
Azure Penetration Testing
PPTX
Microsoft Threat Protection Automated Incident Response Demo
PPTX
Microsoft Secure Score Demo
PPTX
Microsoft Cloud App Security Demo
PPTX
M365 Attack Simulation Demo
PPTX
Cloud Security Demo
PPTX
Azure Active Directory - External Identities Demo
PPTX
Azure WAF
PPTX
Azure Weekend 2020 Build Malaysia Bus Uncle Chatbot
PPTX
Microsoft Azure的20大常见安全漏洞与配置错误
PDF
20 common security vulnerabilities and misconfiguration in Azure
PPTX
Integrate Microsoft Graph with Azure Bot Services
PPTX
Azure Sentinel with Office 365
PPTX
3 Steps Integrate Microsoft Graph with Azure Bot Services
Microsoft Defender for Endpoint
Azure Active Directory - Secure and Govern
Microsoft Zero Trust
MEM for OnPrem Environments
Microsoft Threat Protection Automated Incident Response
Azure Penetration Testing
Azure Penetration Testing
Microsoft Threat Protection Automated Incident Response Demo
Microsoft Secure Score Demo
Microsoft Cloud App Security Demo
M365 Attack Simulation Demo
Cloud Security Demo
Azure Active Directory - External Identities Demo
Azure WAF
Azure Weekend 2020 Build Malaysia Bus Uncle Chatbot
Microsoft Azure的20大常见安全漏洞与配置错误
20 common security vulnerabilities and misconfiguration in Azure
Integrate Microsoft Graph with Azure Bot Services
Azure Sentinel with Office 365
3 Steps Integrate Microsoft Graph with Azure Bot Services

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Machine learning based COVID-19 study performance prediction
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
A Presentation on Artificial Intelligence
PPTX
Spectroscopy.pptx food analysis technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Programs and apps: productivity, graphics, security and other tools
Approach and Philosophy of On baking technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Building Integrated photovoltaic BIPV_UPV.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Diabetes mellitus diagnosis method based random forest with bat algorithm
Reach Out and Touch Someone: Haptics and Empathic Computing
sap open course for s4hana steps from ECC to s4
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Machine learning based COVID-19 study performance prediction
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
A comparative analysis of optical character recognition models for extracting...
Dropbox Q2 2025 Financial Results & Investor Presentation
A Presentation on Artificial Intelligence
Spectroscopy.pptx food analysis technology
Network Security Unit 5.pdf for BCA BBA.
Spectral efficient network and resource selection model in 5G networks
Programs and apps: productivity, graphics, security and other tools

Securing your data with Azure SQL DB

Editor's Notes

  • #9: Restricted Server Access: If SQL Servers do not have restricted access from the Internet enabled, you will not be able to block unauthorized connections. Data Encryption: If SQL Server Databases do not have transparent data encryption enabled you will not be protected against the threat of malicious activity through real-time encryption and decryption of the database. Resource Locks: If SQL Server Databases do not use resource locks, your Azure resources will not be locked down and you will  not be able to prevent deletion or changing of a resource. Auto Failover Groups: If SQL Servers do not use failover groups, you will not have the ability to manage replication and failover of a group of databases on a logical server or all databases in a Managed Instance to another region (currently in public preview for Managed Instance). It uses the same underlying technology as active geo-replication. Database Auditing: If SQL Servers do not have auditing enabled you cannot ensure that all existing and newly created databases on the SQL server instance are audited. Audit Retention: If SQL Servers do not  have auditing retention enabled for greater than 90 days, you will not be able to check for anomalies and get insight into suspected breaches or misuse of information and access.
  • #11: Azure SQL Databases have a powerful layer of security at the SQL Server level. This layer is provided by the SQL Server Firewall. Azure provides you granular control to configure this firewall and to manage who gets access to your Azure SQL Database. By default, everything is blocked by the firewall. If you want to get access to Azure SQL Database then you will have to configure the Firewall at the SQL Server level. Only the IP addresses you configure have access to the SQL Databases on the Server. Another key point to understand is that once you configure a rule then because that rule is applied at the server level, it is applied to all the SQL Databases on that Server. So it is important to ensure that you segregate your databases on different SQL Servers if you don't want to share the access to those databases.
  • #12: You can access the firewall settings by navigating to your Azure SQL Database. Then at the top of the blade, you will find the option for "Set server firewall". Click on this button to access the firewall settings.
  • #13: Another way to access the settings is on Azure SQL Servers. Navigate to the related Azure SQL Server for your database. Under the settings, find the option for "Firewalls and virtual networks". Clicking on this will also take you to the same firewall settings as the settings are set at the server level in both ways.
  • #14: Azure Service Endpoints allow access to SQL or Storage services over the network, without going out of the network. To configure this feature, you can navigate to your Virtual Network and then under the settings, select the "Service endpoints". Click on "+Add" to add a Service Endpoint.
  • #15: In the popup, select the provider for which you want to configure the Service Endpoint. Service Endpoints on the Virtual Networks are available for: Microsoft.Sql provider Microsoft.Storage provider Also, select the subnet on which you want to configure the Service Endpoint and then hit "Add".
  • #16: It will take some time (approximately 15 minutes) to configure the Service Endpoints at the backend. Once configured, you will see the configured endpoints in the portal as shown below.
  • #18: Cell-level encryption to encrypt specific columns or even cells of data with different encryption keys. Always Encrypted, which allows clients to encrypt sensitive data inside client applications and never reveal the encryption keys to the Database Engine (SQL Database or SQL Server). As a result, Always Encrypted provides a separation between those who own the data (and can view it) and those who manage the data (but should have no access). Row-Level Security, which enables customers to control access to rows in a database table based on the characteristics of the user who is executing a query. (Example characteristics are group membership and execution context.)
  • #19: Transparent Data Encryption (TDE) is the automated encryption of your data at rest. If configured it encrypts your database, backups of the database and transactional log files at rest. Normally this is configured by default to provide you with an additional layer of security. If this is not configured then you will get a recommendation to configure it in the Azure Security Center. Turing Off Transparent data encryption will result in decryption of the complete database and will leave your data vulnerable. When you turn it back On then the database will be encrypted again. Depending upon the size of your database, it may take some time to turn the TDE on or off due to the underlying encryption/decryption process. This service does not require any changes at the application level. Behind the scene, transparent data encryption performs real-time I/O encryption and decryption of the data at the page level. Each page is decrypted when it's read into memory and then encrypted before being written to disk. Note: Even if the database is encrypted with TDE, when you take an export of the database (e.g. creation of BACPAK file) then the backup file is created without encryption. You need to ensure that you safeguard/encrypt the backup files before sharing these on an open network. Transparent Data Encryption (TDE) can be enabled or disabled at every individual Database level. The configuration is a very simple toggle between on and off. To configure this, navigate to your Azure SQL Database. In the settings, select "Transparent Data Encryption". The set the value for "Data Encryption" On or Off.
  • #20: You can use your own Key for encryption with Transparent Data Encryption. If you do not configure to use your own key, then a service managed certificate is used for encryption and decryption. To do this you will need to upload your key to an Azure Key Vault or generate a new key within the Key Vault, which is very easy to configure. Once you have a key in an Azure Key Vault, you will be able to use the same with Transparent Data Encryption (TDE). This setting can't be configured at a Database level. Instead, this has to be configured at the server level. Navigate to the underlying Azure SQL Server (where the SQL Database is hosted). Then follow the below steps: In the settings, click on the Transparent Data Encryption Select "Yes" to Use your own key. Then click on "Select a Key" and then select the key from your Azure Key Vault. Alternatively, you can select to "Enter Key Identifier". Once the key is configured, select "Save" to save the settings.
  • #21: Auditing & Threat Detection in Azure SQL Database is a very simple to configure yet very powerful security feature.  Auditing feature audits all activity on your database to a Storage Account. You can determine the number of days for which you want to retain the data. It helps you remain compliant. In an event of any failure or compliance breach, you can go to the audit logs and can pinpoint the exact cause of the issue if this feature is enabled. Threat Detection is an advanced feature, where Microsoft runs various algorithms under the hood and determines the pattern and identifies any potential attacks on your data. E.g. SQL Injection or patterns like SQL Injection can be detected when this feature is enabled. Please note that the Threat Detection feature has additional cost linked to it. It costs $15/server/month. It will be free for the first 60 days. Note that you can enable Auditing without enabling Threat Detection. But you can't enable Threat Detection without enabling Auditing on the data first. SQL Threat Detection integrates alerts with Azure Security Center. If any anomalous activity is detected an alert is raised, you can get notification via email and can also review the same within the portal. You get real-time actionable alerts. Each alert also contains the information regarding how to mitigate the alert.
  • #22: Classify the data in your SQL database by enabling Data Discovery and Classification in Azure SQL Database. You can monitor access to your sensitive data in the Azure dashboard or download reports. Use the Azure SQL Database Vulnerability Assessment service, which scans for potential database vulnerabilities. The service employs a knowledge base of rules that flag security vulnerabilities and show deviations from best practices, such as misconfigurations, excessive permissions, and unprotected sensitive data. The rules are based on Microsoft best practices and focus on the security issues that present the biggest risks to your database and its valuable data. They cover both database-level issues and server-level security issues, like server firewall settings and serverlevel permissions. These rules also represent many of the requirements from regulatory bodies to meet their compliance standards. Enable Azure SQL Database Threat Detection to get security alerts and recommendations on how to investigate and mitigate threats. You get alerts about suspicious database activities, potential vulnerabilities, and SQL injection attacks, as well as anomalous database access and query patterns.
  • #23: To configure Auditing and Threat Detection at the database level, navigate to the database. Then follow the below steps: In the database settings, click on "Auditing and Threat Detection" You can optionally configure the settings at the Server level by click on the link "View server settings" Next, toggle the "Auditing" setting on or off. Select the storage account and retention in the number of days. Next, you can configure the "Threat Detection" on or off. If you toggle it on, then you have the option of selecting which type of Threats you want to detect. You also have the option of configuring Email notifications which work with the Threat Detection.
  • #24: When configuring Audit Logs Storage, you can select any subscription under the tenant and a storage account in that subscription. You can then select Retention in number of Days. When this number is set to Zero then that means unlimited retention. You can select a maximum of 3285 number of days for this value. You can also select whether to use a Primary or Secondary key while accessing the Storage Account for writing the logs.
  • #25: Under Threat Detection types, you can select any one or all of the following types: SQL injection SQL injection vulnerability Anomalous client login
  • #26: If Blob Auditing or Threat Detection are enabled on the server, they will always apply to the database, regardless of the database settings. At the server level, the configuration is almost identical. You need to navigate to the related Azure SQL Server first (instead of the SQL Database). Notice at the top of the below screenshot, it says "SQL server" instead of "SQL database". Then navigate to it's "Auditing and Threat Detection" section and perform the configurations similar to above sections.
  • #27: Dynamic Data Masking is a feature of Azure SQL Databases, that allows you to hide the sensitive data. E.g. your database contains information regarding the Credit Cards of your customers. When exposing the database you want to ensure that the credit cards are not exposed. They should automatically be presented in the format "xxxx-xxxx-xxxx-1234" i.e. only exposing the last 4 digits.
  • #28: This feature can be accessed by navigating to your database and then clicking on the "Dynamic Data Masking" option under settings. By default, there are no masks applied. Click on "+ Add mask" to add a new mask. Note that whatever masks you apply are not applied to the administrators. Additionally, you can provide the SQL users who should be excluded from masking. Azure SQL Database will also automatically try to recommend the fields that should be masked.
  • #29: When adding Masking Rules you provide below information: Name for the mask is auto-populated (based on your selections) Schema Table in that schema Column in the table, where mask should be applied Masking Criteria Note that the Masking criteria vary based on the type of the column. E.g. If a column does not have numerical value then the masking criteria for "Number (random number range)" will show as disabled.