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

Work-around for Policy API Missing OrgUnit in Settings (0.4.1) release #605

Merged
merged 3 commits into from
Feb 19, 2025

Conversation

rlxdev
Copy link
Collaborator

@rlxdev rlxdev commented Feb 14, 2025

🗣 Description

This contains the fix for the Policy API not including the orgunit with the policy setting in some rare cases. Google is looking into this issue, but this change will isolate us in the meantime. The basic rule for the policy settings is that the top-level orgunit has all the settings and any subunit or group will only have settings that deviate from the top-level orgunit's settings. It's appropriate to associate any setting without an orgunit with the top-level orgunit.

This also comes with the version update from 0.4.0 to 0.4.1.

Closes #599

🧪 Testing

Manual testing by faking out a setting without an orgunit. The setting gets the top-level orgunit.

The smoke test does not run successfully as of when this PR was created, because the meet 6.* baseline was added in a prior commit in the main branch and there's no corresponding Rego implementation.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • If applicable, All future TODOs are captured in issues, which are referenced in the PR description.
  • The relevant issues PR resolves are linked preferably via closing keywords.
  • All relevant type-of-change labels have been added.
  • I have read and agree to the CONTRIBUTING.md document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated to reflect the changes in this PR.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.

✅ Pre-merge Checklist

  • This PR has been smoke tested to ensure main is in a functional state when this PR is merged.
  • Squash all commits into one PR level commit using the Squash and merge button.

✅ Post-merge Checklist

  • Delete the branch to clean up.
  • Close issues resolved by this PR if the closing keywords did not activate.

@rlxdev rlxdev added the bug This issue or pull request addresses broken functionality label Feb 14, 2025
@rlxdev rlxdev self-assigned this Feb 14, 2025
@rlxdev rlxdev marked this pull request as draft February 14, 2025 18:57
@adhilto
Copy link
Collaborator

adhilto commented Feb 17, 2025

@rlxdev Now that #607 is closed, is this ready for review?

@rlxdev rlxdev marked this pull request as ready for review February 17, 2025 16:17
Copy link
Collaborator

@adhilto adhilto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested after assigning a DLP policy to multiple OUs, which triggers the underlying bug this PR addresses. The issue was correctly handled and logged.
image

Copy link
Collaborator

@mitchelbaker-cisa mitchelbaker-cisa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated report successfully.

@rlxdev rlxdev merged commit 8da61d3 into main Feb 19, 2025
19 of 25 checks passed
@rlxdev rlxdev deleted the v0_4_1_to_main branch February 19, 2025 19:22
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants