identity-ad-ds-enable • ざっくり書くと以下のような手順である ① ストレージ アカウントでの AD DS 認証を有効にする -> https://github.com/Azure-Samples/azure-files-samples/releases からパッケージをダウンロード。これを利用するスクリプトを別途構成してPowerShellを実行 ② ターゲットの AD ID と同期している、Azure AD ID (ユーザー、グループ、またはサービス プリ ンシパル) に、共有のアクセス許可を割り当てる -> RBACを使用して「ファイル共有アクセス権」を設定する ③ SMB を使用してディレクトリとファイルに Windows ACL を構成する -> 共有アクセスルートへExplorerで移動し、NTFSアクセス権を設定する
unblock importing AzFilesHybrid.psm1 module Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser # Navigate to where AzFilesHybrid is unzipped and stored and run to copy the files into your path .¥CopyToPSPath.ps1 #Import AzFilesHybrid module Import-Module -Name AzFilesHybrid #Login with an Azure AD credential that has either storage account owner or contributer Azure role assignment Connect-AzAccount #Define parameters $SubscriptionId = "<your-subscription-id-here>" $ResourceGroupName = "<resource-group-name-here>" $StorageAccountName = "<storage-account-name-here>" #Select the target subscription for the current session Select-AzSubscription -SubscriptionId $SubscriptionId Join-AzStorageAccountForAuth ` -ResourceGroupName $ResourceGroupName ` -StorageAccountName $StorageAccountName ` -DomainAccountType "<ComputerAccount|ServiceLogonAccount>" ` -OrganizationalUnitDistinguishedName "<ou-distinguishedname-here>" ` -EncryptionType "<AES256/RC4/AES256,RC4>" Update-AzStorageAccountAuthForAES256 -ResourceGroupName $ResourceGroupName -StorageAccountName $StorageAccountName Debug-AzStorageAccountAuth -StorageAccountName $StorageAccountName -ResourceGroupName $ResourceGroupName -Verbose
EncryptionType Name Result ---- ------ CheckDomainJoined Passed CheckGetKerberosTicket Passed CheckUserRbacAssignment Failed CheckAadUserHasSid Skipped CheckADObjectPasswordIsCorrect Passed CheckADObject Passed CheckUserFileAccess Skipped CheckPort445Connectivity Passed CheckStorageAccountDomainJoined Passed CheckSidHasAadUser Passed Issues found: ---- CheckUserRbacAssignment ---- User '[email protected]' is not assigned any SMB share-level permission to storage account 'bccommonstor' in resource group 'BLUECORE-STORAGE'. Please configure proper share-level permission following the guidance at https://docs.microsoft.com/en-us/azure/storage/files/storage-files-identity-ad-ds-assign-permissions
the AD DS account registered for the storage account # You may use either kerb1 or kerb2 Update-AzStorageAccountADObjectPassword ` -RotateToKerbKey kerb2 ` -ResourceGroupName "<your-resource-group-name-here>" ` -StorageAccountName "<your-storage-account-name-here>"