Skip to content

Commit 75cea4f

Browse files
Merge pull request #216559 from b-ahibbard/anf-fileaccesslogs-15dec
File Access Logs 2022.03
2 parents c576918 + 4395244 commit 75cea4f

13 files changed

+220
-17
lines changed

articles/azure-netapp-files/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,8 @@
369369
href: manage-default-individual-user-group-quotas.md
370370
- name: Manage storage with cool access
371371
href: manage-cool-access.md
372+
- name: Manage file access logs
373+
href: manage-file-access-logs.md
372374
- name: Update Terraform-managed volume
373375
href: terraform-manage-volume.md
374376
- name: Manage application volume groups

articles/azure-netapp-files/azure-government.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ All [Azure NetApp Files features](whats-new.md) available on Azure public cloud
2525
| Azure NetApp Files features | Azure public cloud availability | Azure Government availability |
2626
|:--- |:--- |:--- |
2727
| Azure NetApp Files large volumes | Generally available (GA) | Generally available [(select regions)](large-volumes-requirements-considerations.md#supported-regions) |
28+
| Azure NetApp Files file access logs | Public preview | Public preview [(select regions)](manage-file-access-logs.md#supported-regions) |
2829

2930
## Portal access
3031

articles/azure-netapp-files/azure-netapp-files-create-volumes-smb.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ Before creating an SMB volume, you need to create an Active Directory connection
7373
The subnet you specify must be delegated to Azure NetApp Files.
7474

7575
If you haven't delegated a subnet, you can select **Create new** on the Create a Volume page. Then in the Create Subnet page, specify the subnet information, and select **Microsoft.NetApp/volumes** to delegate the subnet for Azure NetApp Files. In each VNet, only one subnet can be delegated to Azure NetApp Files.
76+
77+
:::image type="content" source="./media/shared/azure-netapp-files-create-subnet.png" alt-text="Screenshot of create new subnet interface." lightbox="./media/shared/azure-netapp-files-create-subnet.png":::
7678

77-
![Create subnet](./media/shared/azure-netapp-files-create-subnet.png)
78-
7979
* **Network features**
8080
In supported regions, you can specify whether you want to use **Basic** or **Standard** network features for the volume. See [Configure network features for a volume](configure-network-features.md) and [Guidelines for Azure NetApp Files network planning](azure-netapp-files-network-topologies.md) for details.
8181

articles/azure-netapp-files/azure-netapp-files-create-volumes.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ This article shows you how to create an NFS volume. For SMB volumes, see [Create
8383
Specify the subnet that you want to use for the volume.
8484
The subnet you specify must be delegated to Azure NetApp Files.
8585
86-
If you have not delegated a subnet, you can select **Create new** on the Create a Volume page. Then in the Create Subnet page, specify the subnet information, and select **Microsoft.NetApp/volumes** to delegate the subnet for Azure NetApp Files. In each Virtual Network, only one subnet can be delegated to Azure NetApp Files.
86+
If you have not delegated a subnet, you can click **Create new** on the Create a Volume page. Then in the Create Subnet page, specify the subnet information, and select **Microsoft.NetApp/volumes** to delegate the subnet for Azure NetApp Files. In each VNet, only one subnet can be delegated to Azure NetApp Files.
87+
88+
:::image type="content" source="../media/azure-netapp-files/azure-netapp-files-new-volume.png" alt-text="Screenshot of create new volume interface." lightbox="../media/azure-netapp-files/azure-netapp-files-new-volume.png":::
8789

8890
![Create subnet](./media/shared/azure-netapp-files-create-subnet.png)
8991

articles/azure-netapp-files/faq-security.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ For the complete list of Azure NetApp Files permissions, see Azure resource prov
4848

4949
Azure NetApp Files is an Azure native service. All PUT, POST, and DELETE APIs against Azure NetApp Files are logged. For example, the logs show activities such as who created the snapshot, who modified the volume, and so on.
5050

51+
Azure NetApp Files also offers [file access logging](manage-file-access-logs.md).
52+
5153
For the complete list of API operations, see [Azure NetApp Files REST API](/rest/api/netapp/).
5254

5355
## Can I use Azure policies with Azure NetApp Files?

articles/azure-netapp-files/kerberos.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -170,22 +170,22 @@ New machine accounts are created when an Azure NetApp Files SMB volume is provis
170170
| First new SMB volume | New SMB machine account/DNS name |
171171
| Subsequent SMB volumes created in short succession from first SMB volume | Reused SMB machine account/DNS name (in most cases). |
172172
| Subsequent SMB volumes created much later than first SMB volume | The service determines if new machine account is needed. It's possible multiple machine accounts can be created, which creates multiple IP address endpoints. |
173-
| First dual protocol volume | New SMB machine account/DNS name |
174-
| Subsequent dual protocol volumes created in short succession from first dual protocol volume | Reused SMB machine account/DNS name (in most cases) |
175-
| Subsequent dual protocol volumes created much later than first dual protocol volume | The service determines if a new machine account is needed. It's possible multiple machine accounts can be created, which creates multiple IP address endpoints |
176-
| First SMB volume created after dual protocol volume | New SMB machine account/DNS name |
177-
| First dual protocol volume created after SMB volume | New SMB machine account/DNS name |
173+
| First dual-protocol volume | New SMB machine account/DNS name |
174+
| Subsequent dual-protocol volumes created in short succession from first dual-protocol volume | Reused SMB machine account/DNS name (in most cases) |
175+
| Subsequent dual-protocol volumes created much later than first dual-protocol volume | The service determines if a new machine account is needed. It's possible multiple machine accounts can be created, which creates multiple IP address endpoints |
176+
| First SMB volume created after dual-protocol volume | New SMB machine account/DNS name |
177+
| First dual-protocol volume created after SMB volume | New SMB machine account/DNS name |
178178

179-
The SMB machine account created for the Azure NetApp Files SMB (or dual protocol) volume uses a naming convention that adheres to the [15-character maximum that is enforced by Active Directory](/troubleshoot/windows-server/active-directory/naming-conventions-for-computer-domain-site-ou). The name uses the structure of [SMB Server prefix specified in Active Directory connection configuration]-[unique numeric identifier].
179+
The SMB machine account created for the Azure NetApp Files SMB (or dual-protocol) volume uses a naming convention that adheres to the [15-character maximum that is enforced by Active Directory](/troubleshoot/windows-server/active-directory/naming-conventions-for-computer-domain-site-ou). The name uses the structure of [SMB Server prefix specified in Azure AD connection configuration]-[unique numeric identifier].
180180

181181
For instance, if you've [configured your AD connections](create-active-directory-connections.md) to use the SMB server prefix "AZURE," the SMB machine account that Azure NetApp Files creates resembles "AZURE-7806." That same name is used in the UNC path for the SMB share (for example, \\AZURE-7806) and is the name that dynamic DNS services use to create the A/AAAA record.
182182

183183
>[!NOTE]
184-
>Because a name like AZURE-7806 can be hard to remember, it's beneficial to create a CNAME record as a DNS alias for Azure NetApp Files volumes. For more information, see [Creating SMB server aliases](#creating-smb-server-aliases).
184+
>Because a name like "AZURE-7806" can be difficult to remember, it's beneficial to create a CNAME record as a DNS alias for Azure NetApp Files volumes. For more information, see [Creating SMB server aliases](#creating-smb-server-aliases).
185185
186186
:::image type="content" source="media/kerberos/multiple-dns-smb.png" alt-text="Diagram of multiple machine accounts/DNS entries in Azure NetApp Files." lightbox="media/kerberos/multiple-dns-smb.png":::
187187

188-
In some cases, when creating multiple SMB and/or dual protocol volumes, the configuration can end up with multiple disparate SMB machine accounts and DNS names.
188+
In some cases, when creating multiple SMB and/or dual-protocol volumes, the configuration can end up with multiple disparate SMB machine accounts and DNS names.
189189

190190
If a single namespace for user access across the volumes is desired, this can present a challenge in configuration, as a single CNAME alias can only point to a single A/AAAA host record, while using multiple identical A/AAAA record aliases can result in unpredictability of data access in accessing volumes across different SMB machine accounts, as there's no guarantee that the endpoint the client selects in the DNS lookup contains the expected volume due to the round-robin nature of DNS record selection in those configurations.
191191

@@ -196,7 +196,7 @@ To address this limitation, [Azure NetApp Files volumes can participate as targe
196196

197197
### SMB Kerberos SPN creation workflow
198198

199-
The following diagram illustrates how an SMB Kerberos SPN is created when an Azure NetApp Files SMB or dual protocol volume is created. SMB SPNs are associated with SMB machine account objects in the domain. The SPN can be viewed and managed via the machine account properties using the attribute editor in the Advanced view.
199+
The following diagram illustrates how an SMB Kerberos SPN is created when an Azure NetApp Files SMB or dual-protocol volume is created. SMB SPNs are associated with SMB machine account objects in the domain. The SPN can be viewed and managed via the machine account properties using the attribute editor in the Advanced view.
200200

201201
:::image type="content" source="media/kerberos/azure-smb-properties.png" alt-text="Screenshot of Azure-SMB properties." lightbox="media/kerberos/azure-smb-properties.png":::
202202

@@ -337,7 +337,7 @@ When an Azure NetApp Files volume is mounting using Kerberos, a Kerberos ticket
337337
- The SMB service ticket is retrieved from the KDC.
338338
- Azure NetApp Files attempts to map the Windows user requesting access to the share to a valid UNIX user.
339339
- A Kerberos TGS request is made using the SMB server Kerberos credentials stored with the SMB server’s keytab from initial SMB server creation to use for an LDAP server bind.
340-
- LDAP is searched for a UNIX user that is mapped to the SMB user requesting share access. If no UNIX user exists in LDAP, then the default UNIX user `pcuser` is used by Azure NetApp Files for name mapping (files/folders written in dual protocol volumes use the mapped UNIX user as the UNIX owner).
340+
- LDAP is searched for a UNIX user that is mapped to the SMB user requesting share access. If no UNIX user exists in LDAP, then the default UNIX user `pcuser` is used by Azure NetApp Files for name mapping (files/folders written in dual-protocol volumes use the mapped UNIX user as the UNIX owner).
341341
- Another negotiate protocol/session request/tree connect is performed, this time using the SMB server’s Kerberos SPN to the Active Directory DC’s IPC$ share.
342342
- A named pipe is established to the share via the `srvsvc`.
343343
- A NETLOGON session is established to the share and the Windows user is authenticated.
@@ -456,7 +456,7 @@ In most cases, knowing these steps in depth won’t be necessary for day-to-day
456456

457457
### NFS Kerberos SPN creation workflow
458458

459-
The following diagram shows how an NFS SPN is created when an Azure NetApp Files NFS or dual protocol volume is created with Kerberos enabled. In most cases, knowing detailed steps in depth won’t be necessary for day-to-day administration tasks, but are useful in troubleshooting any failures when attempting to create an SMB volume in Azure NetApp Files.
459+
The following diagram shows how an NFS SPN is created when an Azure NetApp Files NFS or dual-protocol volume is created with Kerberos enabled. In most cases, knowing detailed steps in depth won’t be necessary for day-to-day administration tasks, but are useful in troubleshooting any failures when attempting to create an SMB volume in Azure NetApp Files.
460460

461461
:::image type="content" source="media/kerberos/nfs-keberos-spn.png" alt-text="Diagram of NFS Kerberos SPN creation workflow." lightbox="media/kerberos/nfs-keberos-spn.png":::
462462

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
---
2+
title: Manage file access logs in Azure NetApp Files
3+
description: File access logs provide file access logging for individual volumes, capturing file system operations on selected volume
4+
services: azure-netapp-files
5+
author: b-ahibbard
6+
ms.service: azure-netapp-files
7+
ms.topic: how-to
8+
ms.date: 04/01/2025
9+
ms.author: anfdocs
10+
ms.custom: references_regions
11+
---
12+
13+
# Manage file access logs in Azure NetApp Files (preview)
14+
15+
File access logs provide file access logging for individual volumes, capturing file system operations on selected volumes. The logs capture [standard file operation](#recognized-events). File access logs provide insights beyond the platform logging captured in the [Azure Activity Log](/azure/azure-monitor/essentials/activity-log).
16+
17+
## Considerations
18+
19+
>[!IMPORTANT]
20+
>The file access logs feature is only supported with SMB3, NFSv4.1, and dual-protocol volumes. It's not supported on NFSv3 volumes.
21+
22+
* Once file access logs are enabled on a volume, they can take up to 75 minutes to become visible.
23+
* Each log entry consumes approximately 1 KB of space.
24+
* File access logs occasionally create duplicate log entries that must be filtered manually.
25+
* Deleting any diagnostic settings configured for `ANFFileAccess` causes any file access logs for any volume with that setting to become disabled. See the [diagnostic setting configuration](#diagnostic) for more information.
26+
* Before enabling file access logs on a volume, either [access control lists (ACLs)](configure-access-control-lists.md) or Audit access control entries (ACEs) need to be set on a file or directory. You must set ACLs or Audit ACEs after mounting a volume.
27+
* File access logs provide no explicit or implicit expectations or guarantees around logging for auditing and compliance purposes.
28+
29+
### Performance considerations
30+
31+
* All file access log file access events have a performance impact.
32+
* Events such as file/folder creation or deletion are key events to log.
33+
* System access control list (SACL) settings for logging should be used sparingly. Frequent operations (for example, READ or GET) can have significant performance impact, but have limited logging value. It's recommended that SACL setting not log these frequent operations to conserve performance.
34+
* SACL policy additions aren't currently supported with file access logs.
35+
* When clubbing events such as READ/WRITE, only a handful of operation per file read or write are captured to reduce event logging rate. 
36+
* File access logs support a [log generation rate metric](azure-netapp-files-metrics.md). The log generation rate shouldn't exceed 64 MiB/minute.
37+
38+
If the rate of file access event generation exceeds 64 MiB/minute, the [Activity log](monitor-azure-netapp-files.md) sends a message stating that the rate of file access log generation is exceeding the limit. If log generation exceeds the limit, logging events can be delayed or dropped. If you're approaching this limit, disable noncritical auditing ACLs to reduce the event generation rate. As a precaution, you can [create an alert](/azure/azure-monitor/alerts/alerts-create-activity-log-alert-rule) for this event.
39+
40+
* During migration or robocopy operations, disable file access logs to reduce log generation.
41+
* It's recommended you avoid enabling file access logs on files with more than 450 ACEs to avoid performance issues.
42+
43+
## Recognized events
44+
45+
The events capture in file access logs depend on the protocol of your volume.
46+
47+
### Logged NFS events
48+
* Close
49+
* Create
50+
* Get attributes
51+
* Link
52+
* `Nverify`
53+
* Open
54+
* Open attribute
55+
* Remove
56+
* Rename
57+
* Set attribute
58+
* Verify
59+
* Write
60+
61+
### Logged SMB events
62+
* Create
63+
* Delete
64+
* Get attributes
65+
* Hard link
66+
* Open object
67+
* Open object with the intent to delete
68+
* Read
69+
* Rename
70+
* Set attribute
71+
* Unlink
72+
* Write
73+
74+
## Register the feature
75+
76+
The file access logs feature is currently in preview. If you're using this feature for the first time, you need to register the feature first.
77+
78+
1. Register the feature:
79+
80+
```azurepowershell-interactive
81+
Register-AzProviderFeature -ProviderNamespace Microsoft.NetApp -FeatureName ANFFileAccessLogs
82+
```
83+
84+
1. Check the status of the registration:
85+
86+
> [!NOTE]
87+
> The **RegistrationState** can be in the `Registering` state for up to 60 minutes before changing to`Registered`. Wait until the status is **Registered** before continuing.
88+
89+
```azurepowershell-interactive
90+
Get-AzProviderFeature -ProviderNamespace Microsoft.NetApp -FeatureName ANFFileAccessLogs`
91+
```
92+
93+
You can also use [Azure CLI commands](/cli/azure/feature) `az feature register` and `az feature show` to register the feature and display the registration status.
94+
95+
## Supported regions
96+
97+
Availability for file access log is limited to the following regions:
98+
99+
- Australia Central
100+
- Australia East
101+
- Australia Southeast
102+
- Brazil South
103+
- Canada Central
104+
- Canada East
105+
- Central India
106+
- Central US
107+
- East US
108+
- East US 2
109+
- Japan West
110+
- North Europe
111+
- South Central US
112+
- Switzerland North
113+
- Switzerland West
114+
- UK South
115+
- US Gov Virginia
116+
- West Europe
117+
- West US
118+
- West US 2
119+
120+
## Set SACLs or Audit ACEs on files and directories
121+
122+
You must set SACLs for SMB shares or Audit ACEs for NFSv4.1 exports for auditing.
123+
124+
### [Set SACLs for SMB shares](#tab/sacls-smb)
125+
126+
If you're logging access events on all files and directories within a volume, set SACLs by applying Storage-Level Access Guard security.
127+
128+
>[!NOTE]
129+
> Select only the events you need to log. Selecting too many log options can impact system performance.
130+
131+
To enable logging access on individual files and directories, complete the following steps on the Windows administration host.
132+
133+
#### Steps
134+
135+
To enable logging access on individual files and directories, complete the following steps on the Windows administration host.
136+
137+
1. Select the file or directory for which to enable logging access.
138+
1. Right-click the file or directory, then select **Properties**.
139+
1. Select the **Security** tab then **Advanced**.
140+
1. Select the **Auditing** tab. Add, edit, or remove the auditing options you want.
141+
142+
143+
### [Set Audit ACEs for NFSv4.1 shares](#tab/sacls-nfs)
144+
145+
For NFSv4.1, both discretionary and system ACEs are stored in the same ACL, not separate discretionary ACLs and SACLs. Exercise caution when adding audit ACEs to an existing ACL to avoid overwriting and losing an existing ACL. The order in which you add audit ACEs to an existing ACL doesn't matter.
146+
147+
**For steps**, see [Configure access control lists on NFSv4.1 volumes](configure-access-control-lists.md).
148+
149+
---
150+
151+
## Enable file access logs
152+
153+
1. In the **Volumes** menu, select the volume you want to enable file access logs for.
154+
1. Select **Diagnostic settings** from the left-hand pane.
155+
1. Select **+ Add diagnostic setting**.
156+
:::image type="content" source="./media/manage-file-access-logs/logs-diagnostic-settings-add.png" alt-text="Screenshot of Azure Diagnostic settings menu.":::
157+
1. <a name="diagnostic"></a> In the **Diagnostic setting** page, provide a diagnostic setting name.
158+
Under **Logs > Categories**, select **ANFFileAccess** then set the retention period of the logs.
159+
:::image type="content" source="./media/manage-file-access-logs/logs-diagnostic-settings-enable.png" alt-text="Screenshot of Azure Diagnostic settings menu with file access diagnostic setting.":::
160+
1. Select one of the destination options for the logs:
161+
* Archive to a storage account
162+
* Stream to an event hub
163+
* Send to Log Analytics workplace
164+
* Send to a partner solution
165+
1. Save the settings.
166+
167+
## Disable file access logs
168+
169+
1. In the **Volumes** menu, select the volume on which you want to disable file access logs.
170+
2. Select the **Diagnostic setting** menu from the left-hand pane.
171+
3. In the **Diagnostic settings** page, deselect **Audit**. This automatically deselects **ANFFileAccess**.
172+
4. Select **Save**.
173+
174+
>[!NOTE]
175+
>After disabling file access logs, you must wait at least ten minutes before attempting to enable or re-enable file access logs on any volume.
176+
177+
## Next Steps
178+
179+
* [Security FAQs](faq-security.md)
180+
* [Azure resource logs](/azure/azure-monitor/essentials/resource-logs)
181+
* [Understand NFSv4.x access control lists in Azure NetApp Files](nfs-access-control-lists.md)
182+
* [Understand SMB file permissions in Azure NetApp Files](network-attached-file-permissions-smb.md)
120 KB
Loading
95.1 KB
Loading

0 commit comments

Comments
 (0)