Skip to content

Commit 51f2fed

Browse files
authored
Merge pull request #105250 from yuemlu/master
Minor update before AD Preview
2 parents 1a7d2f4 + 8417f39 commit 51f2fed

File tree

4 files changed

+39
-32
lines changed

4 files changed

+39
-32
lines changed

articles/storage/common/storage-auth-aad.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: tamram
77

88
ms.service: storage
99
ms.topic: conceptual
10-
ms.date: 12/12/2019
10+
ms.date: 2/23/2020
1111
ms.author: tamram
1212
ms.reviewer: cbrooks
1313
ms.subservice: common
@@ -23,7 +23,7 @@ Authorization with Azure AD is available for all general-purpose and Blob storag
2323

2424
Blob storage additionally supports creating shared access signatures (SAS) that are signed with Azure AD credentials. For more information, see [Grant limited access to data with shared access signatures](storage-sas-overview.md).
2525

26-
Azure Files supports authorization with Azure AD over SMB for domain-joined VMs only. To learn about using Azure AD over SMB for Azure Files, see [Overview of Azure Active Directory authorization over SMB for Azure Files](../files/storage-files-active-directory-overview.md).
26+
Azure Files supports authorization with AD (preview) or Azure AD DS (GA) over SMB for domain-joined VMs only. To learn about using AD (preview) or Azure AD DS (GA) over SMB for Azure Files, see [Overview of Azure Files identity-based authentication support for SMB access](../files/storage-files-active-directory-overview.md).
2727

2828
Authorization with Azure AD is not supported for Azure Table storage. Use Shared Key to authorize requests to Table storage.
2929

articles/storage/files/storage-files-active-directory-domain-services-enable.md

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,30 @@ description: Learn how to enable identity-based authentication over SMB for Azur
44
author: roygara
55
ms.service: storage
66
ms.topic: conceptual
7-
ms.date: 02/21/2020
7+
ms.date: 02/23/2020
88
ms.author: rogarana
99
---
1010

1111
# Enable Active Directory authentication over SMB for Azure file shares
1212

13-
[Azure Files](storage-files-introduction.md) supports identity-based authentication over Server Message Block (SMB) through two types of Domain Services: Azure Active Directory Domain Services (Azure AD DS) (GA) and Active Directory (AD) (preview). This article focuses on the newly introduced (preview) support of leveraging Active Directory Domain Service for authentication to Azure file shares. If you are interested in enabling Azure AD DS (GA) authentication for Azure file shares refer to [our article on the subject](storage-files-active-directory-enable.md).
13+
[Azure Files](storage-files-introduction.md) supports identity-based authentication over Server Message Block (SMB) through two types of Domain Services: Azure Active Directory Domain Services (Azure AD DS) (GA) and Active Directory (AD) (preview). This article focuses on the newly introduced (preview) support of leveraging Active Directory Domain Service for authentication to Azure file shares. If you are interested in enabling Azure AD DS (GA) authentication for Azure file shares, refer to [our article on the subject](storage-files-active-directory-enable.md).
1414

1515
> [!NOTE]
1616
> Azure file shares only support authentication against one domain service, either Azure Active Directory Domain Service (Azure AD DS) or Active Directory (AD).
1717
>
1818
> AD identities used for Azure file share authentication must be synced to Azure AD. Password hash synchronization is optional.
1919
>
20-
> AD authentication does not support authentication against Computer accounts created in Azure AD DS.
20+
> AD authentication does not support authentication against Computer accounts created in AD.
2121
>
22-
> AD authentication can only be supported against one AD forest where the storage account is registered to. You can only access Azure file shares with the AD credentials from a single AD forest by default. If you need to access your Azure file share from a different forest, make sure that you have the proper forest trust configured.
22+
> AD authentication can only be supported against one AD forest where the storage account is registered to. You can only access Azure file shares with the AD credentials from a single AD forest by default. If you need to access your Azure file share from a different forest, make sure that you have the proper forest trust configured, see [FAQ](https://docs.microsoft.com/azure/storage/files/storage-files-faq#security-authentication-and-access-control) for details.
2323
>
2424
> AD authentication for SMB access and ACL persistence is supported for Azure file shares managed by Azure File Sync.
25+
>
26+
> Azure Files supports Kerberos authentication with AD with RC4-HMAC encryption. AES Kerberos encryption is not yet supported.
2527
2628
When you enable AD for Azure file shares over SMB, your AD domain joined machines can mount Azure file shares using your existing AD credentials. This capability can be enabled with an AD environment hosted either in on-prem machines or hosted in Azure.
2729

28-
AD identities used to access Azure file shares must be synced to Azure AD to enforce share level file permissions through the standard [role-based access control (RBAC)](../../role-based-access-control/overview.md) model. [Windows-style DACLs](https://docs.microsoft.com/previous-versions/technet-magazine/cc161041(v=msdn.10)?redirectedfrom=MSDN) on files/directories carried over from existing file servers will be preserved and enforced. This offers seamless integration with your enterprise AD domain infrastructure. As you replace on-prem file servers with Azure file shares, existing users can access Azure file shares from their current clients with a single sign-on experience, without any change to the credentials in use.
30+
AD identities used to access Azure file shares must be synced to Azure AD to enforce share level file permissions through the standard [role-based access control (RBAC)](../../role-based-access-control/overview.md) model. [Windows-style DACLs](https://docs.microsoft.com/previous-versions/technet-magazine/cc161041(v=msdn.10)?redirectedfrom=MSDN) on files/directories carried over from existing file servers will be preserved and enforced. This feature offers seamless integration with your enterprise AD domain infrastructure. As you replace on-prem file servers with Azure file shares, existing users can access Azure file shares from their current clients with a single sign-on experience, without any change to the credentials in use.
2931

3032
## Prerequisites
3133

@@ -37,17 +39,17 @@ Before you enable AD authentication for Azure file shares, make sure you have co
3739

3840
To setup an AD domain environment, refer to [Active Directory Domain Services Overview](https://docs.microsoft.com/windows-server/identity/ad-ds/get-started/virtual-dc/active-directory-domain-services-overview). If you have not synced your AD to your Azure AD, follow the guidance in [What is hybrid identity with Azure Active Directory?](../../active-directory/hybrid/whatis-hybrid-identity.md) in order to determine your preferred authentication method and Azure AD Connect setup option.
3941

40-
- Domain-join an on-premises machine or an Azure VM using AD DS or AD.
42+
- Domain-join an on-premises machine or an Azure VM to AD (also referred as AD DS).
4143

42-
To access a file share by using AD credentials from a machine or VM, your device must be domain-joined to AD DS. For information about how to domain-join to AD, refer to [Join a Computer to a Domain](https://docs.microsoft.com/windows-server/identity/ad-fs/deployment/join-a-computer-to-a-domain).
44+
To access a file share by using AD credentials from a machine or VM, your device must be domain-joined to AD. For information about how to domain-join to AD, refer to [Join a Computer to a Domain](https://docs.microsoft.com/windows-server/identity/ad-fs/deployment/join-a-computer-to-a-domain).
4345

4446
- Select or create an Azure storage account in [a supported region](#regional-availability).
4547

4648
Make sure that the storage account containing your file shares is not already configured for Azure AD DS Authentication. If Azure Files Azure AD DS Authentication is enabled on the storage account, it needs to be disabled before changing to use AD. This implies that existing ACLs configured in Azure AD DS environment will need to be reconfigured for proper permission enforcement.
4749

4850
For information about creating a new file share, see [Create a file share in Azure Files](storage-how-to-create-file-share.md).
4951

50-
For optimal performance, we recommend that your storage account be in the same region as the VM from which you plan to access the share.
52+
For optimal performance, we recommend that you deploy the storage account in the same region as the VM from which you plan to access the share.
5153

5254
- Verify connectivity by mounting Azure file shares using your storage account key.
5355

@@ -96,13 +98,15 @@ The `join-AzStorageAccountForAuth` cmdlet will perform the equivalent of an offl
9698

9799
You can use the following script to perform the registration and enable the feature or, alternatively, you can manually perform the operations that the script would. Those operations are described in the section following the script. You do not need to do both.
98100

99-
### Script prerequisites
100-
101+
### 1. Check prerequisites
101102
- [Download and unzip the AzFilesHybrid module](https://github.com/Azure-Samples/azure-files-samples/releases)
102103
- Install and execute the module in a device that is domain joined to AD with AD credentials that have permissions to create a service logon account or a computer account in the target AD.
103104
- Run the script using an AD credential that is synced to your Azure AD. The AD credential must have either the storage account owner or the contributor RBAC role permissions.
104105
- Make sure your storage account is in a [supported region](#regional-availability).
105106

107+
### 2. Execute AD enablement script
108+
Remember to replace the placeholder values with your own in the parameters below before executing it in PowerShell.
109+
106110
```PowerShell
107111
#Change the execution policy to unblock importing AzFilesHybrid.psm1 module
108112
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Currentuser
@@ -117,22 +121,24 @@ Import-Module -name AzFilesHybrid
117121
Connect-AzAccount
118122
119123
#Select the target subscription for the current session
120-
Select-AzureSubscription -SubscriptionId "<yourSubscriptionIdHere>"
124+
Select-AzSubscription -SubscriptionId "<your-subscription-id-here>"
121125
122126
#Register the target storage account with your active directory environment under the target OU
123127
join-AzStorageAccountForAuth -ResourceGroupName "<resource-group-name-here>" -Name "<storage-account-name-here>" -DomainAccountType "<ServiceLogonAccount|ComputerAccount>" -OrganizationUnitName "<ou-name-here>"
124128
```
125129

130+
The following description summarizes all actions performed when the `join-AzStorageAccountForAuth` cmdlet gets executed. You may perform these steps manually, if you prefer not to use the command:
126131

127-
The following is a description of the actions performed when the `join-AzStorageAccountForAuth` command is used. You may perform these steps manually, if you prefer not to use the command:
132+
> [!NOTE]
133+
> If you have already executed the join-AzStorageAccountForAuth script above successfuly, go to the next section "3. Confirm that the feature is enabled". You do not need to perform the operations below again.
128134
129-
### Checking environment
135+
#### a. Checking environment
130136

131-
First, it checks your environment. Specifically it checks if the [Active Directory PowerShell](https://docs.microsoft.com/powershell/module/addsadministration/?view=win10-ps) is installed and if the shell is being executed with administrator privileges. Then it checks to see if the [Az.Storage 1.11.1-preview module](https://www.powershellgallery.com/packages/Az.Storage/1.11.1-preview) is installed, and installs it if it isn't. If those checks pass, then it will check your AD to see if there is either a [computer account](https://docs.microsoft.com/windows/security/identity-protection/access-control/active-directory-accounts#manage-default-local-accounts-in-active-directory) (default) or [service logon account](https://docs.microsoft.com/windows/win32/ad/about-service-logon-accounts) that has already been created with SPN/UPN as "cifs/your-storage-account-name-here.file.core.windows.net" and create one if it doesn't exist.
137+
First, it checks your environment. Specifically it checks if the [Active Directory PowerShell](https://docs.microsoft.com/powershell/module/addsadministration/?view=win10-ps) is installed and if the shell is being executed with administrator privileges. Then it checks to see if the [Az.Storage 1.11.1-preview module](https://www.powershellgallery.com/packages/Az.Storage/1.11.1-preview) is installed, and installs it if it isn't. If those checks pass, then it will check your AD to see if there is either a [computer account](https://docs.microsoft.com/windows/security/identity-protection/access-control/active-directory-accounts#manage-default-local-accounts-in-active-directory) (default) or [service logon account](https://docs.microsoft.com/windows/win32/ad/about-service-logon-accounts) that has already been created with SPN/UPN as "cifs/your-storage-account-name-here.file.core.windows.net". If the account doesn't exist, it will create one as described in section b below.
132138

133-
### Creating an identity representing the storage account in your AD manually
139+
#### b. Creating an identity representing the storage account in your AD manually
134140

135-
To create this account manually, create a new kerberos key for your storage account using `New-AzStorageAccountKey -Keynam "yourKeyName"`. Then, use that kerberos key as the password for your account. This key is only used during setup and cannot be used for any control or data plane operations against the storage account.
141+
To create this account manually, create a new kerberos key for your storage account using `New-AzStorageAccountKey -KeyName kerb1`. Then, use that kerberos key as the password for your account. This key is only used during set up and cannot be used for any control or data plane operations against the storage account.
136142

137143
Once you have that key, create either a service or computer account under your OU. Use the following specification:
138144
SPN: "cifs/your-storage-account-name-here.file.core.windows.net"
@@ -142,9 +148,9 @@ If your OU enforces password expiration, you must update the password before the
142148

143149
Keep the SID of the newly created account, you'll need it for the next step.
144150

145-
### Enable the feature on your storage account
151+
##### c. Enable the feature on your storage account
146152

147-
The script would then enable the feature on your storage account. To do this manually, provide some configuration details for the domain properties in the following command, then run it. The storage account SID required in the following command is the SID of the identity you created in AD.
153+
The script would then enable the feature on your storage account. To perform this setup manually, provide some configuration details for the domain properties in the following command, then run it. The storage account SID required in the following command is the SID of the identity you created in AD (section b above).
148154

149155
```PowerShell
150156
#Set the feature flag on the target storage account and provide the required AD domain information
@@ -153,9 +159,9 @@ Set-AzStorageAccount -ResourceGroupName "<your-resource-group-name-here>" -Name
153159
```
154160

155161

156-
### Check if the feature is enabled
162+
### 3. Confirm that the feature is enabled
157163

158-
If you want to check whether the feature is enabled on your storage account, you can use the following script:
164+
You can check to confirm whether the feature is enabled on your storage account, you can use the following script:
159165

160166
```PowerShell
161167
#Get the target storage account
@@ -172,13 +178,13 @@ You've now successfully enabled the feature on your storage account. Even though
172178

173179
[!INCLUDE [storage-files-aad-permissions-and-mounting](../../../includes/storage-files-aad-permissions-and-mounting.md)]
174180

175-
You have now successfully enabled Azure AD authentication over SMB and assigned a custom role that provides access to an Azure file share with an AD identity. To grant additional users access to your file share, follow the instructions in the [Assign access permissions](#assign-access-permissions-to-an-identity) to use an identity and [Configure NTFS permissions over SMB](#configure-ntfs-permissions-over-smb) sections.
181+
You have now successfully enabled AD authentication over SMB and assigned a custom role that provides access to an Azure file share with an AD identity. To grant additional users access to your file share, follow the instructions in the [Assign access permissions](#assign-access-permissions-to-an-identity) to use an identity and [Configure NTFS permissions over SMB](#configure-ntfs-permissions-over-smb) sections.
176182

177183
## Update AD account password
178184

179-
If you registered the AD account representing your storage account under an OU that enforces password expiration time, you must rotate the password before the maximum password age. Failing to update the password of the AD account will result in authentication failures to access Azure file shares.
185+
If you registered the AD identity/account representing your storage account under an OU that enforces password expiration time, you must rotate the password before the maximum password age. Failing to update the password of the AD account will result in authentication failures to access Azure file shares.
180186

181-
To trigger password rotation, you can run the `Update-AzStorageAccountADObjectPassword` command from the [AzFilesHybrid module](#script-prerequisites). The cmdlet performs actions similar to storage account key rotation. It gets the second Kerberos key of the storage account and uses it to update the password of the registered account in AD. Then it regenerates the target Kerberos key of the storage account and updates the password of the registered account in AD. You must run this cmdlet in an AD domain joined environment.
187+
To trigger password rotation, you can run the `Update-AzStorageAccountADObjectPassword` command from the AzFilesHybrid module. The cmdlet performs actions similar to storage account key rotation. It gets the second Kerberos key of the storage account and uses it to update the password of the registered account in AD. Then it regenerates the target Kerberos key of the storage account and updates the password of the registered account in AD. You must run this cmdlet in an AD domain joined environment.
182188

183189
```PowerShell
184190
#Update the password of the AD account registered for the storage account
@@ -190,4 +196,4 @@ Update-AzStorageAccountADObjectPassword -RotateToKerbKey kerb2 -ResourceGroupNam
190196
For more information about Azure Files and how to use AD over SMB, see these resources:
191197

192198
- [ Overview of Azure Files identity-based authentication support for SMB access](storage-files-active-directory-overview.md)
193-
- [FAQ](storage-files-faq.md)
199+
- [FAQ](storage-files-faq.md)

articles/storage/files/storage-files-active-directory-enable.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ For an overview of Azure AD authentication over SMB for Azure file shares, see [
1818

1919
[!INCLUDE [updated-for-az](../../../includes/updated-for-az.md)]
2020

21+
> [!NOTE]
22+
> Azure Files supports Kerberos authentication with Azure AD DS with RC4-HMAC encryption. AES Kerberos encryption is not yet supported.
23+
2124
## Prerequisites
2225

2326
Before you enable Azure AD over SMB for Azure file shares, make sure you have completed the following prerequisites:

0 commit comments

Comments
 (0)