-
Notifications
You must be signed in to change notification settings - Fork 776
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
Disable audit for constraint #2266
Comments
Sounds like we need an explicit |
Opt out would make the most sense to me. If audit is enabled I would expect it to be enabled for all constraints by default. |
On a related note, can a constraint only be checked during audit? An enforcement action of warn or deny will check in real-time which we may not want to reduce load/response time but having it run in the background may still be desirable to have warnings bubble up. Dryrun also still processes the constraint in real-time but takes no action. For example, what if my constraint requires resources to be synced because it's referential, it might require a lot of resources to do so.. perhaps I only want to have these audited so we don't need to enable cache or slow down api calls. I assume there would still be some benefit to having an enforcementAction other than dry-run to entirely skip processing of these constraints in the webhook. To cover this (if it isn't already possible) perhaps we also need an option to disable the enforcementAction all together? Example: If auditEnforcementAction is not specified, default to enforcementAction (deny treated as warn). |
We don't currently scope which constraints get evaluated where, but it's def. a good idea. |
This is similar to my request With the addition of the external data provider, audit can cause calls to other applications, that could result in external calls to cloud APIs. |
I think we need a similar way to scope processes as we do in config resource
|
IMO this is tied in with E.g. there may be different enforcement actions available, and taking different actions may make sense, depending on whether a violation is caught shift-left via Because we probably don't want to couple infrastructure with policy implementation, we should have some means of letting enforcement points self-identify (e.g. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
@maxsmythe is there a current enforcement action that would disable Audit or is that what you are proposing? |
@jimmyraywv There's no mechanism to disable audit selectively per constraint today (it can only be disabled as a whole or on a namespace level). There's a design doc that we are discussing various options: https://docs.google.com/document/d/1QIABjZN9B8oBZF5mm1hz5IhpTGulm1jTNn20nYIF-Hc/edit |
Hello! |
Up |
Am I right that there are no plans regarding the topic? |
@ikusomr This is the design doc that we are discussing various options: https://docs.google.com/document/d/1QIABjZN9B8oBZF5mm1hz5IhpTGulm1jTNn20nYIF-Hc/edit |
@ritazh yep, I've seen it, thank you. I mean, no decision has been made on this, right? |
no decision yet |
@salaxander this might be a good one for you to drive |
Describe the solution you'd like
I would like a flag on constraints so that I can control whether audit checks a constraint or not. This would prevent needless consumption of resources by audit.
Anything else you would like to add:
My use case is primarily centred on DELETE operations. I have two constraint templates/constraints that are only checking whether the operation is a DELETE on specific resources. Audit is not useful here - any object that it checks will necessarily not be deleted! If the object is deleted, it's already too late for audit!
Specifically we ban any DELETE operation of any kind within the
argocd
namespace, and we ban any DELETE operation on any CRD across all namespaces. We allow the operation if a specific annotation has been applied. This helps prevent accidental deletes.Environment:
kubectl version
): 1.21The text was updated successfully, but these errors were encountered: