Return an validation warning when we know a policy always evaluates to true
#1263
Labels
feature-request
This issue requets a substantial new feature
true
#1263
Category
Cedar validation features/changes
Describe the feature you'd like to request
We already have this for policies that evaluate to
false
, and a policy that always applies is potentially more problematic.E.g.,
is always true, so we should return a warning
A slightly complex example might be
When the
view
action applies to users and not groups.Note that, like the warning for
false
policies, this does not aim to be a sound analysis. There will be many policies that are alwaystrue
which we will not detect (without using our SMT based analysis tools).Two possible concerns:
permit(principal, action, resource);
. but the proposed change is a warning, so they can freely ignore it.true
. This isn't necessarily a problem because the proposed warning does not aim to be sound, but it would lead to some mistakes we should be able to notice being missed when split between policies. The might instead be run against the disjunction of all policy expressions, short-circuiting is a problem here because||
short-circuits ontrue
, but policy evaluation does not.Describe alternatives you've considered
.
Additional context
No response
Is this something that you'd be interested in working on?
The text was updated successfully, but these errors were encountered: