1、数据库透明加密
(即使Azure SQL已开启数据库验证和IP地址访问防护,也可对物理硬件进行防护,防止有权限访问物理设备的管理员)
![图片[1]- FBIKIM保护Azure SQL数据库- FBIKIM](https://fbi.kim/wp-content/uploads/2019/11/image-132.png?x-oss-process=image/resize,m_fill,h_676,w_1024)
通过SQL语句查询加密状态
select * from sys.dm_database_encryption_keys
![图片[2]- FBIKIM保护Azure SQL数据库- FBIKIM](https://fbi.kim/wp-content/uploads/2019/11/image-133.png?x-oss-process=image/resize,m_fill,h_508,w_1024)
2、数据库审核
(当用户对数据库实现敏感性操作的时候,数据库审核会对事件记录在日志)
进入威胁检测和审核
![图片[3]- FBIKIM保护Azure SQL数据库- FBIKIM](https://fbi.kim/wp-content/uploads/2019/11/image-134.png)
默认服务器级别审核为关闭,需手动开启,点击“查看服务器设置”
![图片[4]- FBIKIM保护Azure SQL数据库- FBIKIM](https://fbi.kim/wp-content/uploads/2019/11/image-135.png)
![图片[5]- FBIKIM保护Azure SQL数据库- FBIKIM](https://fbi.kim/wp-content/uploads/2019/11/image-136.png)
3、启用威胁监测
打开威胁检测(SQL注入、SQL注入漏洞、异常客户端登录)
![图片[6]- FBIKIM保护Azure SQL数据库- FBIKIM](https://fbi.kim/wp-content/uploads/2019/11/image-138.png)
![图片[7]- FBIKIM保护Azure SQL数据库- FBIKIM](https://fbi.kim/wp-content/uploads/2019/11/image-139.png)
4、启用Azure AD身份验证
查看SQL Database中现有的AD身份验证用户
get-Azurermsqlserveractivedirectoryadministrator -resourcegroup "资源组名字" -Servername "服务器名称"
为SQL Database添加AD身份验证用户
set-Azurermsqlserveractivedirectoryadministrator -resourcegroup "资源组名字" -Servername "服务器名称" -DisplayName "Zhang San" -Objectid "b0be3db8-0964-4db7-b68e-1ef151"
启用AzureAD身份验证的SQL数据库
客户端:
SQL Server 2016 Management Studio
SSDT for VS 2015
程序中: ADALSQL.dll
在数据库中创建AD身份验证用户
create user [abc@xxx.partner.onmicrosoft.cn] from external provider;
连接字符串的定义:“data source=;Authentication=Active Directory Intergrated”