You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the policy documentation is not clear enough and the example is wrong. Which caused confusion.
I believe the appropriated rule to be used in the given example is notAllAreUsed. Which the description is rejects if all of the environmentVariables are **missing** in the resource. But during my tests I've found a bug in the rule which I've fixed in #57.
While I was working on this, I've discussed this issue with the team. Because of that we decided to refactor this policy. It's too much confusing now and need a good enhancement. Therefore, we open the #60 issue to address what we believe it's necessary.
Based on https://suse.slack.com/archives/C02DBSK7HC1/p1732694471848839
Kubewarden Enivronment variables Policy
Background
According to the example in environment-variable-policy doc.
In the following example, only resources that have the
envvar3
orenvvar2
defined will be allowed:However, I observed different results in my experiment. It seems both
envvar3
andenvvar2
are required for access to be allowed.envvar2
andenvvar3
envvar2
envvar3
Policy and Resources
Kubewarden Policy using anyNotIn
The following are the resources and their execution results:
Resource 1 uses both `envvar2` and `envvar3` environment variables, and its evaluation result is allowed.
Resource 2 uses only `envvar2` environment variable, and its evaluation result is denied.
Resource 3 uses only `envvar3` environment variable, and its evaluation result is denied.
The text was updated successfully, but these errors were encountered: