Skip to content

Issues with Inconsistent eval() Function Implementation and Non-Standard Expression Syntax in jcasbin #464

@AlabLan

Description

@AlabLan

Problem Description

The current implementation of eval() function in jcasbin based on aviatorscript rule engine leads to the following core issues:

Cross-Platform Incompatibility:

    The syntax used in jcasbin's eval expressions (e.g., seq.list(), string.startsWith() ,string.endsWith(), include(seq.list(),xx), etc.) cannot be directly used in Casbin implementations on other language platforms (Go, Node.js, Python, etc.)

    Different Casbin implementations on various platforms require their own corresponding syntax, breaking the "write once, run anywhere" design philosophy

Non-Standard Expression Syntax:

    The current expression syntax is not part of Casbin's standard specification

    Users need to learn aviatorscript-specific syntax rather than a unified Casbin expression syntax

    Example: seq.list("A", "B") needs to be changed to ["A", "B"] on other platforms

Exposure of Features Beyond Casbin Specification:

    Due to the aviatorscript foundation, the eval function can execute operations not officially supported by Casbin but available in aviatorscript

    This may lead to security issues and unpredictable behavior

    Reduces policy portability between different Casbin implementations

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions