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

Open Door fix for Rego policies #1504

Merged
merged 1 commit into from
Sep 8, 2022
Merged

Open Door fix for Rego policies #1504

merged 1 commit into from
Sep 8, 2022

Conversation

matajoh
Copy link
Member

@matajoh matajoh commented Sep 8, 2022

Returning OpenDoorSecurityPolicyEnforcer (when appropriate) for Rego policies. This change reverts an unintended behaviour change when calling CreateSecurityPolicyEnforcer with:

  1. enforcer = "" indicating to use the default (which, with the rego build tag, will be rego)
  2. base64EncodedPolicy = a JSON policy with AllowAll=True and no containers
  3. Empty default and privileged mounts

In the past this would have produced an OpenDoorSecurityPolicyEnforcer but after the change to accept authored Rego policies, it would produce a RegoEnforcer with an allow all policy (which allows all enforcement points). There are changes in the pipe which will make a RegoEnforcer created in this way have the same properties as OpenDoorSecurityPolicyEnforcer, but for the time being this change reverts to the previous state.

…policies.

Signed-off-by: Matthew A Johnson <matjoh@microsoft.com>
@matajoh matajoh requested a review from a team as a code owner September 8, 2022 15:21
@anmaxvl anmaxvl merged commit 0f26f8d into microsoft:main Sep 8, 2022
@anmaxvl anmaxvl deleted the rego-open-door branch September 8, 2022 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants