Skip to content

Add support for setting the constraint enforcement action per policy#71

Merged
jpreese merged 2 commits intoplexsystems:mainfrom
jalseth:add-enforcement-tag
Sep 30, 2020
Merged

Add support for setting the constraint enforcement action per policy#71
jpreese merged 2 commits intoplexsystems:mainfrom
jalseth:add-enforcement-tag

Conversation

@jalseth
Copy link
Collaborator

@jalseth jalseth commented Sep 30, 2020

In some scenarios, users may wish to set the enforcement action per policy rather than globally with the --dryrun flag. This adds support this via a @enforcement tag in the comment header block. If no enforcement is specified, we default to deny to align with Gatekeeper's handling of this setting and so we do not break any existing workflows using Konstraint. Additionally, policies with their enforcement action set to dryrun will be skipped in the policies documentation generation.

@jalseth jalseth requested a review from jpreese September 30, 2020 20:26
@jalseth jalseth changed the title Add @enforcement to Rego comment header block Add support for setting the enforcement action per policy Sep 30, 2020
@jalseth jalseth changed the title Add support for setting the enforcement action per policy Add support for setting the constraint enforcement action per policy Sep 30, 2020
Copy link
Collaborator

@jpreese jpreese left a comment

Choose a reason for hiding this comment

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

LGTM 🌮

@jpreese jpreese merged commit 192bef1 into plexsystems:main Sep 30, 2020
@jalseth jalseth deleted the add-enforcement-tag branch September 30, 2020 22:29
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.

2 participants