|
1 | 1 | ---
|
2 | 2 | title: Auditing using managed identity
|
3 |
| -description: How to use managed identity with storage accounts for Auditing |
| 3 | +description: How to use managed identity with storage accounts for auditing |
4 | 4 | author: sravanisaluru
|
5 | 5 | ms.author: srsaluru
|
6 | 6 | ms.reviewer: randolphwest
|
@@ -28,11 +28,14 @@ By default, the identity used is the primary user identity assigned to the serve
|
28 | 28 |
|
29 | 29 | Select the retention period by opening the **Advanced properties**. Then select **Save**. Logs older than the retention period are deleted.
|
30 | 30 |
|
| 31 | +> [!NOTE] |
| 32 | +> To set up managed identity-based auditing on Azure Synapse Analytics, see the [Configure system-assigned managed identity for Azure Synapse Analytics auditing](#configure-system-assigned-managed-identity-for-azure-synapse-analytics-auditing) section later in this article. |
| 33 | +
|
31 | 34 | ## User-assigned managed identity
|
32 | 35 |
|
33 | 36 | UMI gives users flexibility to create and maintain their own UMI for a given tenant. UMI can be used as server identities for Azure SQL. UMI is managed by the user, compared to a system-assigned managed identity, which identity is uniquely defined per server, and assigned by the system.
|
34 | 37 |
|
35 |
| -For more information about UMI, see [Managed identities in Azure AD for Azure SQL](authentication-azure-ad-user-assigned-managed-identity.md) |
| 38 | +For more information about UMI, see [Managed identities in Azure AD for Azure SQL](authentication-azure-ad-user-assigned-managed-identity.md). |
36 | 39 |
|
37 | 40 | ## Configure user-assigned managed identity for Azure SQL Database auditing
|
38 | 41 |
|
@@ -101,27 +104,35 @@ For more information, see [Server Auditing Settings - Create Or Update](/rest/ap
|
101 | 104 |
|
102 | 105 | ---
|
103 | 106 |
|
104 |
| -## Configure user-assigned managed identity for Azure Synapse Analytics auditing |
| 107 | +## Configure system-assigned managed identity for Azure Synapse Analytics auditing |
105 | 108 |
|
106 |
| -You can't use UMI based authentication to a storage account. Only SMI can be used on Azure Synapse. |
| 109 | +You can't use UMI based authentication to a storage account for auditing. Only system-assigned managed identity (SMI) can be used for Azure Synapse Analytics. For SMI authentication to work, the managed identity must have the **Storage Blob Data Contributor** role assigned to it, in the storage account's **Access Control** settings. This role is automatically added if Azure portal is used to configure auditing. |
107 | 110 |
|
108 |
| -In the Azure portal for an Azure Synapse workspace, there is no option to explicitly choose SAS key or managed identity-based authentication, as is the case for Azure SQL Database. |
| 111 | +In the Azure portal for Azure Synapse Analytics, there is no option to explicitly choose SAS key or SMI authentication, as is the case for Azure SQL Database. |
109 | 112 |
|
110 |
| -- If the storage account is behind a VNet or firewall, auditing is automatically configured using managed identity-based authentication. |
| 113 | +- If the storage account is behind a VNet or firewall, auditing is automatically configured using SMI authentication. |
111 | 114 |
|
112 | 115 | - If the storage account isn't behind a VNet or firewall, then auditing is automatically configured using SAS key based authentication.
|
113 | 116 |
|
114 |
| -To force the use of managed identity-based authentication, regardless of whether the storage account is behind a firewall, use the REST API or PowerShell, as follows: |
| 117 | +To force the use of SMI authentication, regardless of whether the storage account is behind a VNet or firewall, use REST API or PowerShell, as follows: |
| 118 | + |
| 119 | +- If using the REST API, omit the `StorageAccountAccessKey` field explicitly in the request body. |
| 120 | + |
| 121 | + For more information, reference: |
| 122 | + |
| 123 | + - [Server Blob Auditing Policies - Create Or Update - REST API (Azure SQL Database)](/rest/api/sql/2022-08-01-preview/server-blob-auditing-policies/create-or-update?tabs=HTTP) |
| 124 | + - [Database Blob Auditing Policies - Create Or Update - REST API (Azure SQL Database](/rest/api/sql/2021-02-01-preview/database-blob-auditing-policies/create-or-update?tabs=HTTP) |
115 | 125 |
|
116 |
| -- If using the REST API, reference [Database Blob Auditing Policies - Create Or Update - REST API (Azure SQL Database](/rest/api/sql/2021-02-01-preview/database-blob-auditing-policies/create-or-update?tabs=HTTP), or [Server Blob Auditing Policies - Create Or Update - REST API (Azure SQL Database)](/rest/api/sql/2022-08-01-preview/server-blob-auditing-policies/create-or-update?tabs=HTTP). You must omit the `StorageAccountAccessKey` field explicitly in the request body. |
| 126 | +- If using PowerShell, pass the `UseIdentity` parameter as `true`. |
117 | 127 |
|
118 |
| -- If using PowerShell APIs, reference [Set-AzSqlServerAudit (Az.Sql)](/powershell/module/az.sql/set-azsqlserveraudit) or [Set-AzSqlDatabaseAudit (Az.Sql)](/powershell/module/az.sql/set-azsqldatabaseaudit), and pass the `UseIdentity` parameter as `true`. |
| 128 | + For more information, reference: |
119 | 129 |
|
120 |
| -For managed identity-based authentication to work, the managed identity must have the **Storage Blob Data Contributor** role assigned to it, in the storage account's **Access Control Settings**. This role is automatically added if Azure portal is used to configure auditing. |
| 130 | + - [Set-AzSqlServerAudit (Az.Sql)](/powershell/module/az.sql/set-azsqlserveraudit) |
| 131 | + - [Set-AzSqlDatabaseAudit (Az.Sql)](/powershell/module/az.sql/set-azsqldatabaseaudit) |
121 | 132 |
|
122 | 133 | ## Next steps
|
123 | 134 |
|
124 | 135 | - [Auditing overview](auditing-overview.md)
|
125 | 136 | - Data Exposed episode: [What's New in Azure SQL Auditing](/Shows/Data-Exposed/Whats-New-in-Azure-SQL-Auditing)
|
126 | 137 | - [Auditing for SQL Managed Instance](../managed-instance/auditing-configure.md)
|
127 |
| -- [Auditing for SQL Server](/sql/relational-databases/security/auditing/sql-server-audit-database-engine) |
| 138 | +- [Auditing for SQL Server](/sql/relational-databases/security/auditing/sql-server-audit-database-engine) |
0 commit comments