Skip to content
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

Add support to handle group override policies #190

Closed
8 tasks done
snarve opened this issue Feb 14, 2024 · 2 comments
Closed
8 tasks done

Add support to handle group override policies #190

snarve opened this issue Feb 14, 2024 · 2 comments
Labels
bug This issue or pull request addresses broken functionality epic A high-level objective issue encompassing multiple issues instead of a specific unit of work High
Milestone

Comments

@snarve
Copy link
Collaborator

snarve commented Feb 14, 2024

🐛 Summary

User groups can override settings/policies implemented at OU level.
Current implementation does not have support to handle this use case and thus some inherited group level policies may report a false positive in the report.

Each baseline policy needs to be updated to handle this use case.

Next steps:

  • Discuss a possible solution to handle this use case
  • Design and implement a prototype for one of the baselines
  • Research if all the baselines follow similar setting when group level policies are updated
  • Add support for the remaining baselines using the prototype as a guideline

Related issues:

@snarve snarve added bug This issue or pull request addresses broken functionality epic A high-level objective issue encompassing multiple issues instead of a specific unit of work High labels Feb 14, 2024
@snarve snarve added this to the Backlog milestone Feb 14, 2024
@adhilto
Copy link
Collaborator

adhilto commented Feb 16, 2024

One final todo item for this:

  • After all products have been refactored, remove the FilterEvents function from the utils file. It will be superseded by the FilterEventsOU and FilterEventsGroup functions.

@adhilto
Copy link
Collaborator

adhilto commented Feb 16, 2024

Method for implementing this (as used in #204).

  1. Modify the SettingChangeEvents events rule to be also save the group name. NOTE: Calendar group settings fix #204 changes this rule in the utils file. So unless your product has a custom SettingChangeEvents rule (Sites and Common Controls), skip this step.
  2. Modify the FilterEvents function. Split into two functions, FilterEventsOU and FilterEventsGroup which identify setting changes that apply to OUs and groups, respectively. NOTE: Calendar group settings fix #204 changes this rule in the utils file. So unless your product has a custom SettingChangeEvents rule (Sites and Common Controls), skip this step.
  3. For each control that can be set at the group level:
    • Change the NonCompliantOUsX_x rule to use the new FilterEventsOU function
    • Make a copy of the NonCompliantOUsX_x rule. Name it `NonCompliantGroupsX_x"
    • Modify it so that it iterates through utils.GroupsWithEvents instead of OUs
    • Modify it so that it uses the new FilterEventsGroup function
    • Modify the actual value so that it looks like this: {"NonCompliantOUs": NonCompliantOUsX_x, "NonCompliantGroups": NonCompliantGroupsX_x}
    • Modify the report details
    • Modify the status
    • Test and ensure it works as expected
    • Modify existing unit tests so they pass
    • Add new unit tests that check for group changes

The report details should look like this:

    "ReportDetails": concat(" ", [
        utils.ReportDetailsOUs(NonCompliantOUsX_x),
        utils.ReportDetailsGroups(NonCompliantGroupsX_x)
    ]),

Note that the report details will need to be modified again soon for the detailed report epic. If you want to see what the report details would look like with both the group filtering and detailed report enhancements, see GWS.CALENDAR.1.1.

The status should look like this:

Conditions := {count(NonCompliantOUs2_1) == 0, count(NonCompliantGroups2_1) == 0}
Status := (false in Conditions) == false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue or pull request addresses broken functionality epic A high-level objective issue encompassing multiple issues instead of a specific unit of work High
Projects
None yet
Development

No branches or pull requests

2 participants