-
Notifications
You must be signed in to change notification settings - Fork 54
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
UserRightsAssignment: Allow unresolvable SIDs found in local security policy #161
base: master
Are you sure you want to change the base?
UserRightsAssignment: Allow unresolvable SIDs found in local security policy #161
Conversation
…resource; Unresolvable SIDs found on local machine would cause resource to fail. During a configure operation (secedit.exe /configure), secedit will happily accept either style in the .inf file. It will also accept and de-duplicate security principals that are specified as an account name and SID in the same line item under the [Privileges] section.
Codecov Report
@@ Coverage Diff @@
## master #161 +/- ##
=====================================
Coverage 89% 89%
=====================================
Files 5 5
Lines 577 579 +2
=====================================
+ Hits 517 520 +3
+ Misses 60 59 -1 |
I believe this PR is ready for review. It is my understanding that the currently failing CI tests are not related to my PR. |
Is there anything missing that I need to address to have this reviewed? |
Can this be reviewed for merge? I would like to utilize this. Thanks! |
I've just kicked another build to check, but please make sure all the test pass for starter. |
Ok they're passing. |
Still looking to get this reviewed. :) |
Can this be reviewed please? |
Bump.... Would really like to see this merged. |
Bump for release. |
Still looking for someone to review this lol. We've forked this internally, but would see benefit in having this merged. |
Will bump this in the #DSC channel of the PowerShell slack/discord |
Hi there. Any updates on this? Facing the same problem. |
We're hitting the same problem also, would be good to get a fix |
Pull Request (PR) description
Do not attempt to translate identities returned by local security policy when setting the resource. If the identity returned is an unresolvable SID (usually due to deleted/orphaned AD objects), then the resource will throw a translation error.
I also thought of changing the
ConvertTo-NTAccount
function to never throw but instead log verbosely for all scope types, but felt that the implementation in this PR was more precise.SecurityPolicyDsc/source/Modules/SecurityPolicyResourceHelper/SecurityPolicyResourceHelper.psm1
Lines 369 to 377 in b29bdf8
The resource will still translate any identities given to the resource by the user.
Neither secedit nor Windows care about the presence of unresolved SIDs in a security policy. During a configure operation (secedit.exe /configure), secedit will happily accept either style in the .inf file. It will also accept and de-duplicate security principals that are specified as an account name and SID in the same line item under the [Privileges] section.
First attempt at using Pester unit testing before. I don't have a way to test locally due to permission restrictions.
This Pull Request (PR) fixes the following issues
Task list
Entry should say what was changed and how that affects users (if applicable), and
reference the issue being resolved (if applicable).
help.
This change is