Variables

Inside conditions you can access two variables, which are records to call attributes on:

Attribute Value Types

The values attributes that can be called on the resources are always one of these types:

Each resource page contains documentation of which attributes are applicable, with the correct type.

In order to force the correct evaluation of a value type inside the policy JSON, the root key inside the conditions block is always the value type, like this:

...
"statement": {
  ...
  "condition": {
    "number": {
      "==": {"object.site_id": 1234},
      ">":  {"object.id": 9876}
    }
    "string": {
      "==": {"subject.email": "test@email.com"}
    }
  }
  ...
}

Since the parsing is forced you are able to for example send strings inside the number block. This will work, because the values get parsed according to which block they’re in.

Evaluation Operators

The way the policy gets evaluated is determined by the value types, and by which operator is used. The policy condition operators are:

Inside the policy JSON, the operators are used as a key inside the value type block, and as a value it has a single key/value object with the attribute and the value to evaluate. See the example above.