Skip to content

[Feature Request] report errors for @@allow policy rules that pass for anonymous users #397

Open
@ymc9

Description

@ymc9

Today a user must ensure that policy rules cover the cases of anonymous users (where auth() evaluates to null). This can be not obvious when comparing auth() with other (nullable) fields. E.g.:

@@allow('all', owner == auth())

If owner field is nullable, anonymous users are effectively granted full access to the entity, which may not be the intention.

@sidharthv96 suggests that at compile time, we detect the cases where policy rules pass for anonymous users and report errors. Users can explicitly suppress the errors with some kind of special comments (similar to how you suppress lint errors).

Metadata

Metadata

Assignees

Labels

cliZenStack cli related

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions