-
Notifications
You must be signed in to change notification settings - Fork 122
add support for AIPService #751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 2 commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
cc5e48a
initial commit
sandeepjha000 c94eab2
Adding test for assessment 25395
aahmed-spec c7c7398
Feature-35009
Manoj-Kesana 56b7637
Updated region markers and app conditional check
aahmed-spec 4e0014e
added test file
ashwinikarke 4cf5067
taken pull
ashwinikarke b1f861f
removed extra lines
aahmed-spec 408cd8e
Update src/powershell/tests/Test-Assessment.35009.ps1
Manoj-Kesana 608ceef
Update src/powershell/tests/Test-Assessment.35009.ps1
Manoj-Kesana c7f977e
Fixed the evaluation logic
Manoj-Kesana fd0029e
refactored report table
sandeepjha000 6708695
adding blade links to profiles and policies
sandeepjha000 ae8e049
updated comments and word capitalization
sandeepjha000 bc856ef
add support for AIPService
komalp2025 9d6b6dc
add md file
komalp2025 f6bee36
added test file
ashwinikarke 9684145
Merge pull request #749 from microsoft/Feature-35009
SagarSathe 0a648d9
Initial plan
Copilot 6a0065d
Extract AD ports to constant $AD_WELL_KNOWN_PORTS
Copilot 4bdf259
Merge pull request #752 from microsoft/copilot/sub-pr-747
aahmed-spec 1d168ed
Update src/powershell/tests/Test-Assessment.25395.ps1
aahmed-spec 003cabc
Update src/powershell/tests/Test-Assessment.25395.ps1
aahmed-spec b0e888d
Update src/powershell/tests/Test-Assessment.25395.ps1
aahmed-spec a621f44
"url" capitalized as "URL"
sandeepjha000 802dfa6
corrected grammar
sandeepjha000 1ea5d16
simplified priority check
sandeepjha000 e8203c6
Merge branch 'feature-25408' of https://github.com/microsoft/zerotrus…
sandeepjha000 da4d1fd
Added comments for Test-IsBroadCidr function
aahmed-spec cc80027
Added BroadPortRangeThreshold variable for src/powershell/tests/Test-…
aahmed-spec 6244d6b
Update line no: 69 src/powershell/tests/Test-Assessment.25395.ps1
aahmed-spec 0349d5a
Initial plan
Copilot 6b15741
Fix off-by-one errors in IP and port range calculations
Copilot f4bb78f
Merge pull request #754 from microsoft/copilot/sub-pr-747-another-one
aahmed-spec c160132
fix invetigate status and md file
komalp2025 3e80636
Merge pull request #750 from microsoft/feature-25408
SagarSathe 184a79c
Update test logic for assessment 25395
aahmed-spec c1fdf84
Refine segment evaluation logic for assessment 25395
aahmed-spec 0cfa271
updated test
ashwinikarke 3535ca1
taken pull
ashwinikarke 8c9c78d
add test 35030
komalp2025 20d428a
Refine segment scope column logic for assessment 25395
aahmed-spec 5349e01
remove duplicate link
komalp2025 3164c97
Fix formatting of DLP policy links in Test-Assessment.35030.md
alexandair e65ba67
Update DLP policy title and optimize enabled policies count query
alexandair 8f8a6f6
added test
ashwinikarke 21d7674
Merge pull request #756 from microsoft/Data-35030-DLP-Policies-Cloud-…
SagarSathe 1685849
updated test
ashwinikarke 5c8ab65
taken pull
ashwinikarke a4a0ce7
Merge pull request #747 from microsoft/test-25395
SagarSathe 92428bc
added portal link
ashwinikarke a020439
taken pull
ashwinikarke 961251f
fixed Copilot PR comments
ashwinikarke 9a536c2
draft 35031
komalp2025 4fcf99f
integrate Find-ZtProfileLinkedToPolicy
komalp2025 b841097
Revert draft 35031
komalp2025 5775669
updated portal link
ashwinikarke 6fdd459
Add Find-ZtProfilesLinkedToPolicy function to evaluate linked filteri…
alexandair aababe0
Merge pull request #765 from microsoft/add-ZTProfilesLinkedToPolicy-2…
SagarSathe 190ffc4
Merge pull request #763 from microsoft/Feature-35025
SagarSathe 7258fa5
Merge pull request #767 from alexandair/alex-Find-ZtProfilesLinkedToP…
alexandair 6f0b0f8
add support for AIPService
komalp2025 d313f25
add md file
komalp2025 929c481
fix invetigate status and md file
komalp2025 838ac69
Merge branch 'Data-35011-Super-User-Membership-Configuration' of http…
komalp2025 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| The super user feature in Azure Information Protection grants designated accounts the ability to decrypt all content protected by the organization's Rights Management service, regardless of the encryption permissions originally assigned. Super users can access encrypted documents even when they are not explicitly granted permissions by the content owner, enabling scenarios such as eDiscovery, data recovery, compliance investigations, and migration from encrypted content. | ||
|
|
||
| Without super user configuration, organizations risk data loss when encryption keys become inaccessible, employees leave without transferring ownership of critical encrypted files, or legal holds require access to protected content where the original rights holders cannot be reached. The super user feature must be explicitly enabled and membership must be carefully controlled—typically limited to service accounts used by compliance tools, backup systems, or eDiscovery platforms rather than individual user accounts. Failure to configure super users creates operational risk where encrypted content becomes permanently inaccessible, while overly broad super user membership creates security risk where unauthorized accounts gain unrestricted access to all protected content. | ||
|
|
||
| **Remediation action** | ||
|
|
||
| To configure super users: | ||
|
|
||
| Connect to Azure Information Protection PowerShell: Connect-AipService | ||
| Enable the super user feature: Enable-AipServiceSuperUserFeature | ||
| Add super users (service accounts recommended): | ||
| For user accounts: Add-AipServiceSuperUser -EmailAddress "[email protected]" | ||
| For service principals: Add-AipServiceSuperUser -ServicePrincipalId "service-principal-id" | ||
| Verify configuration: Get-AipServiceSuperUser | ||
|
|
||
| Best practices: | ||
|
|
||
| - Limit super user membership to dedicated service accounts | ||
| - Use service principals for automated tools (eDiscovery, backup) | ||
| - Avoid assigning super user to individual employee accounts | ||
| - Audit super user access regularly | ||
| - Document business justification for each super user account | ||
|
|
||
| [Configure super users for Azure Information Protection Enable-AipServiceSuperUserFeature Add-AipServiceSuperUser](https://learn.microsoft.com/en-us/powershell/module/aipservice/enable-aipservicesuperuserfeature) | ||
|
|
||
| <!--- Results ---> | ||
| %TestResult% | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,144 @@ | ||
| <# | ||
| .SYNOPSIS | ||
| Azure Information Protection (AIP) Super User Feature Configuration | ||
|
|
||
| .DESCRIPTION | ||
| Evaluates whether the Azure Information Protection (AIP) super user feature is enabled and properly configured with designated super users. The super user feature allows specified service accounts or administrators to decrypt rights-managed content for auditing, search, and compliance purposes. | ||
|
|
||
| The cmdlets require the AipService module (v3.0+) which is only supported on Windows PowerShell 5.1. A PowerShell 7 subprocess workaround is automatically employed if running under PowerShell Core. | ||
|
|
||
| .NOTES | ||
| Test ID: 35011 | ||
| Pillar: Data | ||
| Risk Level: High | ||
| #> | ||
|
|
||
| function Test-Assessment-35011 { | ||
| [ZtTest( | ||
| Category = 'Azure Information Protection', | ||
| ImplementationCost = 'Medium', | ||
| MinimumLicense = ('Microsoft 365 E5'), | ||
| Pillar = 'Data', | ||
| RiskLevel = 'High', | ||
| SfiPillar = '', | ||
| TenantType = ('Workforce','External'), | ||
| TestId = 35011, | ||
| Title = 'Azure Information Protection (AIP) Super User Feature', | ||
| UserImpact = 'Low' | ||
| )] | ||
| [CmdletBinding()] | ||
| param() | ||
|
|
||
| #region Data Collection | ||
| Write-PSFMessage '🟦 Start' -Tag Test -Level VeryVerbose | ||
|
|
||
| $activity = 'Checking Azure Information Protection Super User Configuration' | ||
| Write-ZtProgress -Activity $activity -Status 'Querying AIP super user settings' | ||
|
|
||
| $superUserFeatureEnabled = $null | ||
| $superUsers = @() | ||
| $errorMsg = $null | ||
|
|
||
| try { | ||
| # Note: AipService must be authenticated in Connect-ZtAssessment first | ||
| # This test only performs queries against the authenticated service | ||
|
|
||
| # Query Q1: Check if super user feature is enabled | ||
| $superUserFeatureEnabled = Get-AipServiceSuperUserFeature -ErrorAction Stop | ||
|
|
||
| # Query Q2: Get list of configured super users | ||
| $superUsers = Get-AipServiceSuperUser -ErrorAction Stop | ||
| } | ||
| catch { | ||
| $errorMsg = $_ | ||
| Write-PSFMessage "Error querying AIP Super User configuration: $_" -Level Error | ||
| } | ||
| #endregion Data Collection | ||
|
|
||
| #region Assessment Logic | ||
| $passed = $false | ||
| $investigateFlag = $false | ||
|
|
||
| if ($errorMsg) { | ||
| $investigateFlag = $true | ||
| } | ||
| else { | ||
| # Evaluation logic: | ||
| # 1. If feature is disabled, test fails | ||
| if ($superUserFeatureEnabled -eq $false) { | ||
| $passed = $false | ||
| } | ||
| # 2. If feature is enabled, check if at least one super user is configured | ||
| elseif ($superUserFeatureEnabled -eq $true) { | ||
| $superUserCount = if ($superUsers) { @($superUsers).Count } else { 0 } | ||
|
|
||
| if ($superUserCount -ge 1) { | ||
| $passed = $true | ||
| } | ||
| else { | ||
| $passed = $false | ||
| } | ||
| } | ||
| } | ||
| #endregion Assessment Logic | ||
|
|
||
| #region Report Generation | ||
| $testResultMarkdown = "" | ||
|
|
||
| if ($investigateFlag) { | ||
| $testResultMarkdown = "⚠️ Unable to determine AIP super user configuration due to permissions or connection issues.`n`n" | ||
| $testResultMarkdown += "**Error Details:**`n" | ||
| $testResultMarkdown += "* $errorMsg`n`n" | ||
| $testResultMarkdown += "**Possible Causes:**`n" | ||
| $testResultMarkdown += "* AipService module not installed (requires v3.0+)`n" | ||
| $testResultMarkdown += "* Not connected to AIP service`n" | ||
| $testResultMarkdown += "* Insufficient permissions to query AIP configuration`n" | ||
| } | ||
| else { | ||
| if ($passed) { | ||
| $testResultMarkdown = "✅ Super user feature is enabled with at least one member configured.`n`n" | ||
| } | ||
| else { | ||
| if ($superUserFeatureEnabled -eq $true) { | ||
| $testResultMarkdown = "❌ Super user feature is enabled BUT no members are configured.`n`n" | ||
| } | ||
| else { | ||
| $testResultMarkdown = "❌ Super user feature is DISABLED.`n`n" | ||
| } | ||
| } | ||
|
|
||
| $testResultMarkdown += "### Azure Information Protection Super User Configuration`n`n" | ||
| $testResultMarkdown += "**Feature Status:**`n" | ||
|
|
||
| $featureStatus = if ($superUserFeatureEnabled) { "Enabled" } else { "Disabled" } | ||
| $testResultMarkdown += "* Super User Feature: $featureStatus`n`n" | ||
|
|
||
| if ($superUserFeatureEnabled) { | ||
| $superUserCount = if ($superUsers) { @($superUsers).Count } else { 0 } | ||
| $testResultMarkdown += "**Super Users Configured: $superUserCount**`n`n" | ||
|
|
||
| if ($superUserCount -gt 0) { | ||
| $testResultMarkdown += "| Email Address / Service Principal ID | Account Type |`n" | ||
| $testResultMarkdown += "| :--- | :--- |`n" | ||
|
|
||
| foreach ($superUser in $superUsers) { | ||
| $accountType = if ($superUser -like '*-*-*-*-*') { "Service Principal" } else { "User" } | ||
| $testResultMarkdown += "| $superUser | $accountType |`n" | ||
| } | ||
|
|
||
| $testResultMarkdown += "`n" | ||
| } | ||
| } | ||
|
|
||
| $testResultMarkdown += "**Note:** Super user configuration is not available through the Azure portal and must be managed via PowerShell using the AipService module.`n" | ||
| } | ||
| #endregion Report Generation | ||
|
|
||
| $testResultDetail = @{ | ||
| TestId = '35011' | ||
| Title = 'Azure Information Protection (AIP) Super User Feature' | ||
| Status = $passed | ||
| Result = $testResultMarkdown | ||
| } | ||
komalp2025 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Add-ZtTestResultDetail @testResultDetail | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.