Skip to content

Commit 13568b7

Browse files
mcolleraregedit32bgouldmanjcwalkerbcwilhite
authored
Release 1.4.3 (#67)
* Active directory access entry (#28) * initial ActiveDirectoryAccessEntry resource * updates to ActiveDirectoryAccessEntry resource * ActiveDirectoryAccessEntry unit test; resource fixes * updated readme; added example; mof fixes * version rev * AuditRule fixes * Updated issue with ACLRules not always being an array when trying to add additional objects. Updated issue where Expected.Rules might only be a single object while trying to call a Where extension method. (#31) * Rights guid (#32) * Updated ActiveDirectoryAccessEntry example with a valid ADRights value Refactored Get-SchemaGuidId helper function to Get-DelegationRightsGuid so it returns schemaGuids and rightsGuids * typo corrections * Update Get-SchemaObjectName to resolve SchemaGuids and RightsGuids * Added $guidmap to Get-SchemaObjectName * Added $rootDse to Get-SchemaObjectName * Changes RegistryAccessEntry to correctly remove specific ACEs from ACLs and gracefully handle the App Packages Principal, Issues #37 and #38 (#39) * Added ConvertTo-SidIdentityReg... funct. to addr app packages transation * Mod. Rule/Expected foreach to correct rule input for ConvertTo-SidId... * modified RemoveAccessRule to RemoveAccessRuleSpecific to addr. issue #38 * added Set-RegistryRightsAclAllAppPackages function * added test for Set-RegistryRightsAclAllAppPackages function. * updated test to hanlde deny scenario * updated formatting and defined output type for New-TempAclItem * Update ReadMe to include new version and changes. (#42) * Added ConvertTo-SidIdentityReg... funct. to addr app packages transation * Mod. Rule/Expected foreach to correct rule input for ConvertTo-SidId... * modified RemoveAccessRule to RemoveAccessRuleSpecific to addr. issue #38 * added Set-RegistryRightsAclAllAppPackages function * added test for Set-RegistryRightsAclAllAppPackages function. * updated test to hanlde deny scenario * updated formatting and defined output type for New-TempAclItem * updated readme.md * NTFSAccessControlEntry Resource Bug Fix (#45) * Added ConvertTo-SidIdentityReg... funct. to addr app packages transation * Mod. Rule/Expected foreach to correct rule input for ConvertTo-SidId... * modified RemoveAccessRule to RemoveAccessRuleSpecific to addr. issue #38 * added Set-RegistryRightsAclAllAppPackages function * added test for Set-RegistryRightsAclAllAppPackages function. * updated test to hanlde deny scenario * updated formatting and defined output type for New-TempAclItem * updated readme.md * updated Test/Set to use Get/SetAccessControl Methods, vs. Get/Set-Acl * updated readme.md with bug fix information * NTFSAccessControl Refactoring and fix for bug #46 - NTFSAccessControlEntry - False Positive Test Bug (#47) * Added ConvertTo-SidIdentityReg... funct. to addr app packages transation * Mod. Rule/Expected foreach to correct rule input for ConvertTo-SidId... * modified RemoveAccessRule to RemoveAccessRuleSpecific to addr. issue #38 * added Set-RegistryRightsAclAllAppPackages function * added test for Set-RegistryRightsAclAllAppPackages function. * updated test to hanlde deny scenario * updated formatting and defined output type for New-TempAclItem * updated readme.md * updated Test/Set to use Get/SetAccessControl Methods, vs. Get/Set-Acl * updated readme.md with bug fix information * pre-test run, new feature, w/force wipe acl * updated NTFSAccessEntry.psm1 to clear existing currentacl * refactoring changes. * bug fix #46 and code refactoring with added Write-CustomVerbose function * updated README.md with bug fix information * updated fs rights logic to ensure test runs when permissions are less. * Update ModuleVersion in Module Manifest psd1 (#48) * Added ConvertTo-SidIdentityReg... funct. to addr app packages transation * Mod. Rule/Expected foreach to correct rule input for ConvertTo-SidId... * modified RemoveAccessRule to RemoveAccessRuleSpecific to addr. issue #38 * added Set-RegistryRightsAclAllAppPackages function * added test for Set-RegistryRightsAclAllAppPackages function. * updated test to hanlde deny scenario * updated formatting and defined output type for New-TempAclItem * updated readme.md * updated Test/Set to use Get/SetAccessControl Methods, vs. Get/Set-Acl * updated readme.md with bug fix information * pre-test run, new feature, w/force wipe acl * updated NTFSAccessEntry.psm1 to clear existing currentacl * refactoring changes. * bug fix #46 and code refactoring with added Write-CustomVerbose function * updated README.md with bug fix information * updated fs rights logic to ensure test runs when permissions are less. * incremented the ModuleVersion in module manifest psd1. * Fix for Feature Request #49 - ObjectType Parameter in ActiveDirectoryAuditRuleEntry (#50) * refactor work * daily commit for refactor work * add support for objecttype and central localization text * updated code to be in line with style guide lines. * updated NTFSAccessEntry with import localization based on PSUICulture * updated/refactor tests to handle objecttype parameter * Finish Get Method * Test method first version * 1st version Set method * Test Set working Get broken * Everything works. Needs tests * Started unit tests * Unit tests done * Add integration tests but not verified * Correct typo in FileSystemAuidtRuleEntry unit test * Updater readme and examples FileSystemAuditRuleEntry * Updated schema files Moved base class to top of file to pass PSScriptAnalyzer rule * Update tests * Update testHelper path * Resolve PR descrepancies * Updated module version * put comments on get/test/set functions * Style updates * style corrections * AccessControlDSC v1.4.0.0 is throwing error while trying to set permission to a folder for the group "ALL APPLICATION PACKAGES" and "ALL RESTRICTED APPLICATION PACKAGES" (#59) * workaround for Win32 API bug App Package * added new line to the EoF * updated appveyor.yml * updated appveyor.yml * updated appveyor.yml to use Pester 4.10.1 * update tests to satisfy code coverage * updated module manifest with symantic versioning * fixed NTFS PowerShell v7 compat * Capabilitysids (#65) * Merge Dev into Master Build 1.1.0.0 (#33) * Active directory access entry (#28) * initial ActiveDirectoryAccessEntry resource * updates to ActiveDirectoryAccessEntry resource * ActiveDirectoryAccessEntry unit test; resource fixes * updated readme; added example; mof fixes * version rev * AuditRule fixes * Updated issue with ACLRules not always being an array when trying to add additional objects. Updated issue where Expected.Rules might only be a single object while trying to call a Where extension method. (#31) * Rights guid (#32) * Updated ActiveDirectoryAccessEntry example with a valid ADRights value Refactored Get-SchemaGuidId helper function to Get-DelegationRightsGuid so it returns schemaGuids and rightsGuids * typo corrections * Update Get-SchemaObjectName to resolve SchemaGuids and RightsGuids * Added $guidmap to Get-SchemaObjectName * Added $rootDse to Get-SchemaObjectName * Add inheritance options to NtfsAccessEntry (#34) It's easier to get these values from the Readme, than going through code each time. * Release 10/6/2021 * Support for capability SIDS Co-authored-by: Brett Slaski <brettski@yahoo.com> Co-authored-by: Jason Ryberg <jason@ryberg.dev> Co-authored-by: Matthew Collera <Matthew.Collera@microsoft.com> Co-authored-by: Reggie Gibson <31147354+regedit32@users.noreply.github.com> Co-authored-by: Brian Gouldman <32549363+bgouldman@users.noreply.github.com> Co-authored-by: Jason Walker <walkerjason@live.com> Co-authored-by: Brian Wilhite <bcwilhite@live.com> Co-authored-by: Jason Walker <jwalker@microsoft.com> Co-authored-by: Chase Wilson <31453523+chasewilson@users.noreply.github.com> Co-authored-by: Brett Slaski <brettski@yahoo.com> Co-authored-by: Jason Ryberg <jason@ryberg.dev> Co-authored-by: Matthew Collera <Matthew.Collera@microsoft.com>
1 parent d553d8e commit 13568b7

File tree

7 files changed

+23
-14
lines changed

7 files changed

+23
-14
lines changed

AccessControlDsc.psd1

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
@{
66
# Version number of this module.
7-
ModuleVersion = '1.4.2'
7+
8+
ModuleVersion = '1.4.3'
89

910
# ID used to uniquely identify this module
1011
GUID = 'a544c26f-3f96-4c1e-8351-1604867aafc5'

DscResources/AccessControlResourceHelper/AccessControlResourceHelper.psm1

+9
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ function Resolve-Identity
5252
if ($Identity -match '^S-\d-(\d+-){1,14}\d+$')
5353
{
5454
[System.Security.Principal.SecurityIdentifier]$Identity = $Identity
55+
56+
# Support for capability sids
57+
if ($Identity.Value.StartsWith('S-1-15-3-'))
58+
{
59+
return [PSCustomObject]@{
60+
Name = $Identity.Value
61+
SID = $Identity.Value
62+
}
63+
}
5564
}
5665
else
5766
{

DscResources/ActiveDirectoryAccessEntry/ActiveDirectoryAccessEntry.psm1

+3-3
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ Function Compare-ActiveDirectoryAccessRule
400400
$_.InheritanceType -eq $referenceObject.InheritanceType -and
401401
$_.InheritedObjectType -eq $referenceObject.InheritedObjectType -and
402402
$_.ObjectType -eq $referenceObject.ObjectType -and
403-
$_.IdentityReference -eq $referenceObject.IdentityReference
403+
$_.IdentityReference.Value -eq $referenceObject.IdentityReference.Value
404404
})
405405
if($match.Count -ge 1)
406406
{
@@ -426,7 +426,7 @@ Function Compare-ActiveDirectoryAccessRule
426426
$_.InheritanceType -eq $referenceObject.InheritanceType -and
427427
$_.InheritedObjectType -eq $referenceObject.InheritedObjectType -and
428428
$_.ObjectType -eq $referenceObject.ObjectType -and
429-
$_.IdentityReference -eq $referenceObject.IdentityReference
429+
$_.IdentityReference.Value -eq $referenceObject.IdentityReference.Value
430430
})
431431
if($match.Count -gt 0)
432432
{
@@ -444,7 +444,7 @@ Function Compare-ActiveDirectoryAccessRule
444444
$_.InheritanceType -eq $referenceObject.InheritanceType -and
445445
$_.InheritedObjectType -eq $referenceObject.InheritedObjectType -and
446446
$_.ObjectType -eq $referenceObject.ObjectType -and
447-
$_.IdentityReference -eq $referenceObject.IdentityReference
447+
$_.IdentityReference.Value -eq $referenceObject.IdentityReference.Value
448448
})
449449
if($match.Count -eq 0)
450450
{

DscResources/ActiveDirectoryAuditRuleEntry/ActiveDirectoryAuditRuleEntry.psm1

+2-2
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ function Test-ActiveDirectoryAuditRuleMatch
498498
$_.ObjectType -eq $ReferenceRule.ObjectType -and
499499
$_.InheritanceType -eq $ReferenceRule.InheritanceType -and
500500
$_.InheritedObjectType -eq $ReferenceRule.InheritedObjectType -and
501-
$_.IdentityReference -eq $ReferenceRule.IdentityReference
501+
$_.IdentityReference.Value -eq $ReferenceRule.IdentityReference.Value
502502
})
503503
}
504504
else
@@ -512,7 +512,7 @@ function Test-ActiveDirectoryAuditRuleMatch
512512
$_.ObjectType -eq $ReferenceRule.ObjectType -and
513513
$_.InheritanceType -eq $ReferenceRule.InheritanceType -and
514514
$_.InheritedObjectType -eq $ReferenceRule.InheritedObjectType -and
515-
$_.IdentityReference -eq $ReferenceRule.IdentityReference
515+
$_.IdentityReference.Value -eq $ReferenceRule.IdentityReference.Value
516516
})
517517
}
518518
}

DscResources/FileSystemAuditRuleEntry/FileSystemAuditRuleEntry.psm1

+2-3
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ function Test-FileSystemAuditRuleMatch
518518
$_.AuditFlags -eq $ReferenceRule.AuditFlags -and
519519
$_.InheritanceFlags -eq $ReferenceRule.InheritanceFlags -and
520520
$_.PropagationFlags -eq $ReferenceRule.PropagationFlags -and
521-
$_.IdentityReference -eq $ReferenceRule.IdentityReference
521+
$_.IdentityReference.Value -eq $ReferenceRule.IdentityReference.Value
522522
})
523523
}
524524
else
@@ -536,8 +536,7 @@ function Test-FileSystemAuditRuleMatch
536536
(($_.PropagationFlags.value__ -eq 3 -and $ReferenceRule.PropagationFlags.value__ -in 1..3) -or
537537
($_.PropagationFlags.value__ -in 1..3 -and $ReferenceRule.PropagationFlags.value__ -eq 0) -or
538538
($_.PropagationFlags.value__ -eq $ReferenceRule.PropagationFlags.value__)) -and
539-
540-
$_.IdentityReference -eq $ReferenceRule.IdentityReference
539+
$_.IdentityReference.Value -eq $ReferenceRule.IdentityReference.Value
541540
})
542541
}
543542
}

DscResources/NTFSAccessEntry/NTFSAccessEntry.psm1

+2-2
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ function Test-FileSystemAccessRuleMatch
631631
$_.InheritanceFlags -eq $ReferenceRule.InheritanceFlags -and
632632
$_.PropagationFlags -eq $ReferenceRule.PropagationFlags -and
633633
$_.AccessControlType -eq $ReferenceRule.AccessControlType -and
634-
$_.IdentityReference -eq $ReferenceRule.IdentityReference
634+
$_.IdentityReference.Value -eq $ReferenceRule.IdentityReference.Value
635635
})
636636
}
637637
else
@@ -646,7 +646,7 @@ function Test-FileSystemAccessRuleMatch
646646
($_.PropagationFlags.value__ -in 1..3 -and $ReferenceRule.PropagationFlags.value__ -eq 0) -or
647647
($_.PropagationFlags.value__ -eq $ReferenceRule.PropagationFlags.value__)) -and
648648
$_.AccessControlType -eq $ReferenceRule.AccessControlType -and
649-
$_.IdentityReference -eq $ReferenceRule.IdentityReference
649+
$_.IdentityReference.Value -eq $ReferenceRule.IdentityReference.Value
650650
})
651651
}
652652
}

DscResources/RegistryAccessEntry/RegistryAccessEntry.psm1

+3-3
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ Function Compare-RegistryRule
382382
$_.InheritanceFlags -eq $refrenceObject.InheritanceFlags -and
383383
$_.PropagationFlags -eq $refrenceObject.PropagationFlags -and
384384
$_.AccessControlType -eq $refrenceObject.AccessControlType -and
385-
$_.IdentityReference -eq $refrenceObject.IdentityReference
385+
$_.IdentityReference.Value -eq $refrenceObject.IdentityReference.Value
386386
})
387387
if ($match.Count -ge 1)
388388
{
@@ -407,7 +407,7 @@ Function Compare-RegistryRule
407407
$_.InheritanceFlags -eq $refrenceObject.InheritanceFlags -and
408408
$_.PropagationFlags -eq $refrenceObject.PropagationFlags -and
409409
$_.AccessControlType -eq $refrenceObject.AccessControlType -and
410-
$_.IdentityReference -eq $refrenceObject.IdentityReference
410+
$_.IdentityReference.Value -eq $refrenceObject.IdentityReference.Value
411411
})
412412
if($match.Count -eq 0)
413413
{
@@ -424,7 +424,7 @@ Function Compare-RegistryRule
424424
$_.InheritanceFlags -eq $refrenceObject.InheritanceFlags -and
425425
$_.PropagationFlags -eq $refrenceObject.PropagationFlags -and
426426
$_.AccessControlType -eq $refrenceObject.AccessControlType -and
427-
$_.IdentityReference -eq $refrenceObject.IdentityReference
427+
$_.IdentityReference.Value -eq $refrenceObject.IdentityReference.Value
428428
})
429429
if ($match.Count -gt 0)
430430
{

0 commit comments

Comments
 (0)