Skip to content

Commit f9a7854

Browse files
authored
Merge pull request #3819 from wastoresh/https
Support EnableHttpsTrafficOnly feature
2 parents d3752bc + 0ce21ac commit f9a7854

File tree

19 files changed

+827
-6315
lines changed

19 files changed

+827
-6315
lines changed

src/ResourceManager/Compute/Commands.Compute.Test/SessionRecords/Microsoft.Azure.Commands.Compute.Test.ScenarioTests.AEMExtensionTests/TestAEMExtensionAdvancedWindowsMD.json

Lines changed: 1 addition & 5722 deletions
Large diffs are not rendered by default.

src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@
198198
<None Include="..\..\Common\Commands.ScenarioTests.ResourceManager.Common\AzureRM.Resources.ps1">
199199
<Link>ScenarioTests\AzureRM.Resources.ps1</Link>
200200
</None>
201+
<None Include="..\..\Common\Commands.ScenarioTests.ResourceManager.Common\AzureRM.Storage.ps1">
202+
<Link>ScenarioTests\AzureRM.Storage.ps1</Link>
203+
</None>
201204
<None Include="MSSharedLibKey.snk" />
202205
<None Include="packages.config">
203206
<SubType>Designer</SubType>

src/ResourceManager/Network/Commands.Network.Test/NetworkResourcesController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public void RunPsTestWorkflow(
127127
helper.GetRMModulePath("AzureRM.Network.psd1"),
128128
helper.GetRMModulePath("AzureRM.Compute.psd1"),
129129
helper.RMStorageDataPlaneModule,
130-
helper.GetRMModulePath("AzureRM.Storage.psd1"),
130+
"AzureRM.Storage.ps1",
131131
"AzureRM.Resources.ps1");
132132

133133
try

src/ResourceManager/Storage/ChangeLog.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21-
* Get-AzureRmStorageAccountKey: Key list is now enumerated on the pipeline
21+
* Upgrade SRP SDK to 6.3.0
22+
* New/Set-AzureRmStorageAccount:Add a new parameter to support EnableHttpsTrafficOnly
23+
* New/Set/Get-AzureRmStorageAccount: Returned Storage Account contains a new attribute EnableHttpsTrafficOnly
2224
## Version 2.8.0
2325

2426
## Version 2.7.0

src/ResourceManager/Storage/Commands.Management.Storage.Test/Commands.Management.Storage.Test.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111
<AppDesignerFolder>Properties</AppDesignerFolder>
1212
<RootNamespace>Microsoft.Azure.Commands.Management.Storage.Test</RootNamespace>
1313
<AssemblyName>Microsoft.Azure.Commands.Management.Storage.Test</AssemblyName>
14-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
14+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
1515
<FileAlignment>512</FileAlignment>
1616
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\..\</SolutionDir>
1717
<RestorePackages>true</RestorePackages>
1818
<NuGetPackageImportStamp>f747f8a7</NuGetPackageImportStamp>
19+
<TargetFrameworkProfile />
1920
</PropertyGroup>
2021
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2122
<DebugSymbols>true</DebugSymbols>
@@ -51,7 +52,7 @@
5152
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
5253
</Reference>
5354
<Reference Include="Microsoft.Azure.Management.Storage, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
54-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.6.1.0-preview\lib\net45\Microsoft.Azure.Management.Storage.dll</HintPath>
55+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.6.3.0-preview\lib\net452\Microsoft.Azure.Management.Storage.dll</HintPath>
5556
<Private>True</Private>
5657
</Reference>
5758
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -72,7 +73,7 @@
7273
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.3\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
7374
</Reference>
7475
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
75-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.5\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
76+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.6\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
7677
<Private>True</Private>
7778
</Reference>
7879
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

src/ResourceManager/Storage/Commands.Management.Storage.Test/ScenarioTests/StorageAccountTests.ps1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,20 +160,22 @@ function Test-GetAzureStorageAccount
160160

161161
New-AzureRmResourceGroup -Name $rgname -Location $loc;
162162

163-
New-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype;
163+
New-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype ;
164164

165165
Retry-IfException { $global:sto = Get-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname; }
166166
$stotype = 'StandardGRS';
167167
Assert-AreEqual $sto.StorageAccountName $stoname;
168168
Assert-AreEqual $sto.Sku.Name $stotype;
169169
Assert-AreEqual $sto.Location $loc;
170170
Assert-AreEqual $sto.Kind $kind;
171+
Assert-AreEqual $sto.EnableHttpsTrafficOnly $false;
171172

172173
$stos = Get-AzureRmStorageAccount -ResourceGroupName $rgname;
173174
Assert-AreEqual $stos[0].StorageAccountName $stoname;
174175
Assert-AreEqual $stos[0].Sku.Name $stotype;
175176
Assert-AreEqual $stos[0].Location $loc;
176177
Assert-AreEqual $sto.Kind $kind;
178+
Assert-AreEqual $sto.EnableHttpsTrafficOnly $false;
177179

178180
Remove-AzureRmStorageAccount -Force -ResourceGroupName $rgname -Name $stoname;
179181
}
@@ -203,14 +205,15 @@ function Test-SetAzureStorageAccount
203205
$encryptionServiceBF = "File,Blob"
204206

205207
New-AzureRmResourceGroup -Name $rgname -Location $loc;
206-
New-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype -Kind $kind -EnableEncryptionService $encryptionServiceBF;
208+
New-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype -Kind $kind -EnableEncryptionService $encryptionServiceBF -EnableHttpsTrafficOnly $true;
207209

208210
Retry-IfException { $global:sto = Get-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname; }
209211
$stotype = 'StandardGRS';
210212
Assert-AreEqual $sto.StorageAccountName $stoname;
211213
Assert-AreEqual $sto.Sku.Name $stotype;
212214
Assert-AreEqual $sto.Location $loc;
213215
Assert-AreEqual $sto.Kind $kind;
216+
Assert-AreEqual $sto.EnableHttpsTrafficOnly $true;
214217
Assert-AreEqual $sto.Encryption.Services.Blob.Enabled $true
215218
Assert-AreEqual $sto.Encryption.Services.File.Enabled $true
216219

@@ -219,12 +222,13 @@ function Test-SetAzureStorageAccount
219222
Assert-AreEqual $stos[0].Sku.Name $stotype;
220223
Assert-AreEqual $stos[0].Location $loc;
221224
Assert-AreEqual $sto.Kind $kind;
225+
Assert-AreEqual $sto.EnableHttpsTrafficOnly $true;
222226
Assert-AreEqual $sto.Encryption.Services.Blob.Enabled $true
223227
Assert-AreEqual $sto.Encryption.Services.File.Enabled $true
224228

225229
$stotype = 'Standard_LRS';
226230
# TODO: Still need to do retry for Set-, even after Get- returns it.
227-
Retry-IfException { Set-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Type $stotype -DisableEncryptionService $encryptionServiceBF; }
231+
Retry-IfException { Set-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Type $stotype -DisableEncryptionService $encryptionServiceBF -EnableHttpsTrafficOnly $false; }
228232
$stotype = 'Standard_RAGRS';
229233
Set-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Type $stotype;
230234

@@ -234,6 +238,7 @@ function Test-SetAzureStorageAccount
234238
Assert-AreEqual $sto.Sku.Name $stotype;
235239
Assert-AreEqual $sto.Location $loc;
236240
Assert-AreEqual $sto.Kind $kind;
241+
Assert-AreEqual $sto.EnableHttpsTrafficOnly $false;
237242
Assert-AreEqual $sto.Encryption $null
238243

239244
Remove-AzureRmStorageAccount -Force -ResourceGroupName $rgname -Name $stoname;

0 commit comments

Comments
 (0)