Commit 1d48c47
authored
xGroup: Refactored Principal Resolution Functions for Enhanced Virtual Account Support (#764)
* Refactored Principal Resolution Functions for Enhanced Virtual Account
Support
- Enhanced Test-IsLocalMachine to recognize 'IIS APPPOOL' and
'NT VIRTUAL MACHINE' as local machine scopes, improving virtual
account type coverage.
- Updated Split-MemberName to preserve original scope, allowing local
accounts that do not use the computer name to be resolved.
- Extended Find-Principal with a new Scope parameter, enabling searches
additional local machine scopes.
- Augmented Find-Principal to handle a predefined list of NT account
scopes ('NT Authority', 'NT Service', 'IIS APPPOOL',
'NT Virtual Machine'), utilizing System.Security.Principal.NTAccount
for SID resolution. This enhancement focuses on local virtual account
identification.
- Implemented new integration tests for ConvertTo-Principal to verify
local, virtual account resolution.
- Introduced Get-ScopeFromDistinguishedName to accurately parse scope
from distinguished names, addressing issues with multiple domain
components and escaped commas.
- Added unit tests for Get-ScopeFromDistinguishedName, ensuring
functional correctness.
- Adjusted outside domain test to expect 'domain.com' instead of
'domain'.
* Updating chagelog
* Fixing assertion in xDSCWebService for
mock call count.
* - Modify assertion for the number of calls to the
Test-Path mock to account for the
short-circuiting of the if conditions on line 449
of DSC_xDSCWebService.psm1 preventing the
third condition from being evaluated.
* - Fixing issues identified during the pull request
review process1 parent 7703bb1 commit 1d48c47
5 files changed
Lines changed: 219 additions & 106 deletions
File tree
- source/DSCResources/DSC_xGroupResource
- tests
- Integration
- Unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | | - | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| |||
0 commit comments