Kuadrant / authorino

K8s-native AuthN/AuthZ service to protect your APIs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logical disjunction (aka "OR" operator) in conditions

guicassolato opened this issue · comments

RFE: Add support for Logical disjunction (aka "OR" operator) in when conditions.

Possible steps for implementation

  • Add 2 fields to the JSONPattern (v1beta1) and PatternExpressionOrRef (v1beta2) types:
    All []JSONPattern / []PatternExpressionOrRef `json:"all,omitempty"`
    Any []JSONPattern / []PatternExpressionOrRef `json:"any,omitempty"`
    
  • Modify all internal Conditions field of the evaluators to a new type that withholds the new logical operation all and any
  • Modify the *AuthPipeline. evaluateConditions function to support the new operations – recursion will be needed
  • (Optional) Define a new pkg/conditions package for everything related to the implementation of conditions (types, interfaces and functions)