---
title: "Rules Reference | InvarDB Docs"
description: "Rules Reference: InvarDB documentation"
---
# Rules Reference

#### Rule evaluation

Formally, for a tunnel to be established between an application and a service, given a request identity `I`, request context `C`, and a service named `S`, the following must hold true:

```
(∃ rule ∈ ingressrules: eval(rule, I))
          ∧ (∃ selector ∈ S.selectors: eval(selector, C))
```

---

#### Available rule variables

Your CEL expressions can evaluate the following variables, depending on your execution environment:

  Vercel

| Variable name | Description | Example |
| --- | --- | --- |
| `owner_id` | The team ID | `team_7Gw5ZMzpQA8h90F832KGp7nwbuh3` |
| `project_id` | The project ID | `prj_7Gw5ZMBpQA8h9GF832KGp7nwbuh3` |
| `owner` | The team slug | `acme` |
| `project` | The project name | `acme_website` |
| `environment` | The environment: `development` or `preview` or `production` | `production` |
| `user_id` | When environment is `development`, this is the ID of the user who was issued the token | |

   Fly.io

| Variable name | Description | Example |
| --- | --- | --- |
| `app_name` | Name of the Fly application | `example-app` |
| `app_id` | ID of the Fly application | `11111111` |
| `machine_id` | ID of the VM hosting this request | `148e21ea7e46e8` |
| `image` | Docker image of this VM | `docker-hub-mirror.fly.io/you/image:latest` |
| `image_digest` | Digest of the VM's Docker image | `sha256:2c1cdaded1b3820020c9dc9fdd1d6...` |
| `machine_name` | Name of the machine | `example-machine` |
| `org_id` | ID of the owning Fly org | `12345678` |
| `org_name` | Name of the owning Fly org | `acme` |
| `region` | Machine region | `lhr` |

   GitHub Actions

| `actor` | The personal account that initiated the workflow run |
| --- | --- |
| `event_name` | The name of the event that triggered the workflow run |
| `job_workflow_ref` | For jobs using a reusable workflow, the ref path to the reusable workflow. For more information, see [Using OpenID Connect with reusable workflows](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/using-openid-connect-with-reusable-workflows) |
| `ref` | *(Reference)* The git ref that triggered the workflow run |
| `ref_type` | The type of `ref`, for example: "branch" |
| `repository_visibility` | The visibility of the repository where the workflow is running. Accepts the following values: `internal`, `private`, or `public` |
| `repository` | The repository from where the workflow is running |
| `repository_owner` | The name of the organization in which the `repository` is stored |
| `run_number` | The number of times this workflow has been run |
| `workflow` | The name of the workflow |
| `sub` | Defines the subject claim that is to be validated by the cloud provider. This setting is essential for making sure that access tokens are only allocated in a predictable way |
| `aud` | By default, this is the URL of the repository owner, such as the organization that owns the repository |

   Amazon EKS

| Variable Name | Description | Example |
| --- | --- | --- |
| `iss` | OIDC issuer URL for the EKS cluster. AWS IAM validates that this matches the configured OIDC provider | `https://oidc.eks.us-east-1.amazonaws.com/id/EXAMPLED539D4633E53DE1B716D3041E` |
| `sub` | Kubernetes service account identity in canonical form. This is commonly used in IAM trust policies | `system:serviceaccount:payments:api-server` |
| `aud` | Intended audience of the token. For IRSA this is typically AWS STS | `["sts.amazonaws.com"]` |
| `k8s_namespace` | Namespace containing the service account | `payments` |
| `k8s_serviceaccount_name` | Name of the Kubernetes service account | `api-server` |
| `k8s_pod_name` | Name of the pod that requested the token | `api-server-7cf6d8f5c9-2k9qj` |
| `k8s_pod_uid` | UID of the pod that requested the token | `d0f7b7cf-4b2e-4b2a-91d0-4fcb4a2b9a61` |
| `k8s_node_name` | Node hosting the pod | `ip-10-0-42-17.ec2.internal` |
