Skip to content

Commit a71bfac

Browse files
ayeletshpigelmancormacpayne
authored andcommitted
Support setting secondary storage key in blob auditing and use the current AuditType for setPolicy if not configured (Azure#3520)
* adding NoAuditActionGroupsConfiguringBlobAuditingPolicy text * Support setting secondary storage key in blob auditing and use the current AuditType for setPolicy if not configured - If the user does not insert AuditType for setPolicy, we use the AuditType of his current policy if exists. If he doesn't have policy, AuditType is set to Table. - Allow secondary storage key in set blob auditing policy * fix the configuration of blob auditing with event type test * Update getEntity function in database and server CmdletBase Update getEntity function in database and server CmdletBase update auditing tests, merge 3 new tests with existing tests * change tests * rename blob auditing ewith audit actions test * Support setting secondary storage key in blob auditing and use the current AuditType for setPolicy if not configured update tests and add comments * update auditing tests records * Support inhering TD policy from server cmdlet * Revert "Support inhering TD policy from server cmdlet" This reverts commit 0740a8c. * fix the check if EventType and AuditAction have been populated fix the check if EventType and AuditAction have been populated * remove ValidateNotNullOrEmpty for AuditType * Add parametrs names to SecurityConstants * changing the check if parameter has been populated * Revert "changing the check if parameter has been populated" This reverts commit 485c1cb. * Remove throwing exceptions for invalid arguments will handle these cases in another task * Remove ValidateNotNullOrEmpty from AuditActionGroup and EventType * Remove TestTableAuditingWithAuditActionsAndAuditActionGroups * Remove unnecessary using in RemoveAuditing files * Remove TestTableAuditingWithAuditActionsAndAuditActionGroups Remove unnecessary using in RemoveAuditing files Remove ValidateNotNullOrEmpty from AuditActionGroup and EventType
1 parent c089f4b commit a71bfac

27 files changed

+20058
-7957
lines changed

src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,9 @@
487487
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AuditingTests\TestBlobAuditingOnServer.json">
488488
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
489489
</None>
490+
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AuditingTests\TestBlobAuditingWithAuditActionGroups.json">
491+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
492+
</None>
490493
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AuditingTests\TestDatatabaseAuditingTypeMigration.json">
491494
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
492495
</None>

src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/AuditingTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,5 +254,12 @@ public void TestGetServerAndDatabaseAuditingInUkRegion()
254254
{
255255
RunPowerShellTest("Test-GetServerAndDatabaseAuditingInUkRegion");
256256
}
257+
258+
[Fact]
259+
[Trait(Category.AcceptanceType, Category.CheckIn)]
260+
public void TestBlobAuditingWithAuditActionGroups()
261+
{
262+
RunPowerShellTest("Test-BlobAuditingWithAuditActionGroups");
263+
}
257264
}
258265
}

src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/AuditingTests.ps1

Lines changed: 185 additions & 22 deletions
Large diffs are not rendered by default.

src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AuditingTests/TestAuditingDatabaseDisableEnableKeepProperties.json

Lines changed: 708 additions & 546 deletions
Large diffs are not rendered by default.

src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AuditingTests/TestAuditingDatabaseRetentionKeepProperties.json

Lines changed: 752 additions & 647 deletions
Large diffs are not rendered by default.

src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AuditingTests/TestAuditingDatabaseUpdatePolicyWithEventTypes.json

Lines changed: 1569 additions & 705 deletions
Large diffs are not rendered by default.

src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AuditingTests/TestAuditingDatabaseUpdatePolicyWithStorage.json

Lines changed: 384 additions & 276 deletions
Large diffs are not rendered by default.

src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AuditingTests/TestAuditingDisableDatabaseAuditing.json

Lines changed: 853 additions & 640 deletions
Large diffs are not rendered by default.

src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AuditingTests/TestAuditingDisableServerAuditing.json

Lines changed: 489 additions & 435 deletions
Large diffs are not rendered by default.

src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AuditingTests/TestAuditingServerDisableEnableKeepProperties.json

Lines changed: 769 additions & 535 deletions
Large diffs are not rendered by default.

src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AuditingTests/TestAuditingServerUpdatePolicyWithEventTypes.json

Lines changed: 1420 additions & 673 deletions
Large diffs are not rendered by default.

src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AuditingTests/TestBlobAuditingOnDatabase.json

Lines changed: 927 additions & 324 deletions
Large diffs are not rendered by default.

src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AuditingTests/TestBlobAuditingOnServer.json

Lines changed: 1272 additions & 462 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)