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

Two-step verification for admins policy reduction throws exeption #572

Open
ebarti opened this issue Jan 17, 2025 · 0 comments
Open

Two-step verification for admins policy reduction throws exeption #572

ebarti opened this issue Jan 17, 2025 · 0 comments
Assignees

Comments

@ebarti
Copy link

ebarti commented Jan 17, 2025

🐛 Summary

When evaluating the following policy in my environment, scubagoggles throws an uncaught exception as there is no group named WORKSPACE_ALL_ADMIN_GROUP. The org unit listed is root.

{
  "name" : "policies/awz2frpjeslov265asjnvrfpueffg",
  "customer" : "customers/C03krtfe4",
  "policyQuery" : {
    "query" : "entity.groups.exists(group, group.group_id == groupId('WORKSPACE_ALL_ADMIN_GROUP')) && entity.org_units.exists(org_unit, org_unit.org_unit_id == orgUnitId('04jha4ab0pkg0mx'))",
    "orgUnit" : "orgUnits/04jha4ab0pkg0mx",
    "group" : "WORKSPACE_ALL_ADMIN_GROUP",
    "sortOrder" : 399.00055
  },
  "setting" : {
    "type" : "settings/security.two_step_verification_enforcement",
    "value" : {
      "enforcedFrom" : "2024-01-30T05:30:00Z"
    }
  },
  "type" : "SYSTEM"
}

Exception:

To reproduce

Steps to reproduce the behavior:

  1. Do this
  2. Then this

Expected behavior

What did you expect to happen that didn't?

Any helpful log output or screenshots

Paste the results here:

File "/Users/XX/Github/ScubaGoggles/scubagoggles/policy_api.py", line 596, in _reduce
    group_name = self._group_id_map[group_id]
KeyError: 'WORKSPACE_ALL_ADMIN_GROUP'

Add any screenshots of the problem here.

@rlxdev rlxdev self-assigned this Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants