cel

command
v0.0.0-...-33feacd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 17 Imported by: 0

README

Common Expression Language

Goal of the POC

The goal of this...

Example

Rules

You can see more examples here.

# Validate that the three fields defining replicas are ordered appropriately
self.minReplicas <= self.replicas && self.replicas <= self.maxReplicas

# Validate that an object's name matches a specific value (making it a singleton)
self.metadata.name == 'singleton'
Curl
curl -X POST http://localhost:8080/evaluate \
  -H "Content-Type: application/json" \
  -d '{
    "rule": "jwt_audience.cel",
    "claims": {
      "exp": 1234567890,
      "aud": "my-audience"
    },
    "now": 1234567891
  }'

response:

{"jwt_audience.cel":true,"jwt_exp.cel":true}

Docs

Documentation

Overview

Example use CEL (Common Expression Language)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL