-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #337 from Snozzberries/aadFix
Fixes for #325
- Loading branch information
Showing
15 changed files
with
124 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
tests/cisa/entra/Test-MtCisaActivationNotificationGlobalAdmin.Tests.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
BeforeDiscovery { | ||
$EntraIDPlan = Get-MtLicenseInformation -Product EntraID | ||
} | ||
|
||
Describe "CISA SCuBA" -Tag "MS.AAD", "MS.AAD.7.8", "CISA", "Security", "All" -Skip:( $EntraIDPlan -eq "Free" ) { | ||
Describe "CISA SCuBA" -Tag "MS.AAD", "MS.AAD.7.8", "CISA", "Security", "All" { | ||
It "MS.AAD.7.8: User activation of the Global Administrator role SHALL trigger an alert." { | ||
Test-MtCisaActivationNotification -GlobalAdminOnly | Should -Be $true -Because "notifications are set for activation of the Global Admin role." | ||
$result = Test-MtCisaActivationNotification -GlobalAdminOnly | ||
|
||
if ($null -ne $result) { | ||
$result | Should -Be $true -Because "notifications are set for activation of the Global Admin role." | ||
} | ||
} | ||
} |
12 changes: 6 additions & 6 deletions
12
tests/cisa/entra/Test-MtCisaActivationNotificationOther.Tests.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
BeforeDiscovery { | ||
$EntraIDPlan = Get-MtLicenseInformation -Product EntraID | ||
} | ||
|
||
Describe "CISA SCuBA" -Tag "MS.AAD", "MS.AAD.7.9", "CISA", "Security", "All" -Skip:( $EntraIDPlan -eq "Free" ) { | ||
Describe "CISA SCuBA" -Tag "MS.AAD", "MS.AAD.7.9", "CISA", "Security", "All" { | ||
It "MS.AAD.7.9: User activation of other highly privileged roles SHOULD trigger an alert." { | ||
Test-MtCisaActivationNotification -GlobalAdminOnly | Should -Be $true -Because "notifications are set for activation of highly privileged roles." | ||
$result = Test-MtCisaActivationNotification | ||
|
||
if ($null -ne $result) { | ||
$result | Should -Be $true -Because "notifications are set for activation of highly privileged roles." | ||
} | ||
} | ||
} |
16 changes: 6 additions & 10 deletions
16
tests/cisa/entra/Test-MtCisaAuthenticatorContext.Tests.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
BeforeDiscovery { | ||
$EntraIDPlan = Get-MtLicenseInformation -Product EntraID | ||
|
||
$result = Get-MtAuthenticationMethodPolicyConfig | ||
|
||
$authenticator = $result | Where-Object { $_.id -eq "MicrosoftAuthenticator" } | ||
} | ||
|
||
Describe "CISA SCuBA" -Tag "MS.AAD", "MS.AAD.3.3", "CISA", "Security", "All" -Skip:( ($EntraIDPlan -eq "Free") -or (Test-MtCisaPhishResistant) -or $authenticator.state -eq "disabled") { | ||
Describe "CISA SCuBA" -Tag "MS.AAD", "MS.AAD.3.3", "CISA", "Security", "All" { | ||
It "MS.AAD.3.3: If phishing-resistant MFA has not been enforced and Microsoft Authenticator is enabled, it SHALL be configured to show login context information." { | ||
Test-MtCisaAuthenticatorContext | Should -Be $true -Because "Microsoft Authenticator is configured to show login context information." | ||
$result = Test-MtCisaAuthenticatorContext | ||
|
||
if ($null -ne $result) { | ||
$result | Should -Be $true -Because "Microsoft Authenticator is configured to show login context information." | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
tests/cisa/entra/Test-MtCisaCrossTenantInboundDefault.Tests.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Describe "CISA SCuBA" -Tag "MS.AAD", "MS.AAD.8.3", "CISA", "Security", "All" { | ||
It "MS.AAD.8.3: Guest invites SHOULD only be allowed to specific external domains that have been authorized by the agency for legitimate business purposes." { | ||
Test-MtCisaCrossTenantInboundDefault -GlobalAdminOnly | Should -Be $true -Because "default inbound cross-tenant access policy is set to block." | ||
Test-MtCisaCrossTenantInboundDefault | Should -Be $true -Because "default inbound cross-tenant access policy is set to block." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
BeforeAll { | ||
$azureSession = Test-MtConnection -Service Azure | ||
} | ||
|
||
Describe "CISA SCuBA" -Tag "MS.AAD", "MS.AAD.4.1", "CISA", "Security", "All" -Skip:((-not $azureSession)) { | ||
Describe "CISA SCuBA" -Tag "MS.AAD", "MS.AAD.4.1", "CISA", "Security", "All" { | ||
It "MS.AAD.4.1: Security logs SHALL be sent to the agency's security operations center for monitoring." { | ||
Test-MtCisaDiagnosticSettings | Should -Be $true -Because "diagnostic settings are configured for all logs." | ||
$cisaDiagnosticSettings = Test-MtCisaDiagnosticSettings | ||
|
||
if ($null -ne $cisaDiagnosticSettings) { | ||
$cisaDiagnosticSettings | Should -Be $true -Because "diagnostic settings are configured for all logs." | ||
} | ||
} | ||
} |