v1.24.8
This release upgrades the common_input
field for the Batch Query API to support recursive merges with each per-query input. This is expected to allow further reduction of request sizes when the majority of each query's input would be shared data.
Here is an example of the recursive merging in action:
{
"inputs": {
"A": {
"user": {
"name": "alice",
"type": "admin"
},
"action": "write",
},
"B": {
"user": {
"name": "bob",
"type": "employee"
}
},
"C": {
"user": {"name": "eve"}
}
},
"common_input": {
"user": {
"company": "Acme Corp",
"type": "user",
},
"action": "read",
"object": "id1234"
}
}
The above request using common_input
is equivalent to sending this request:
{
"inputs": {
"A": {
"user": {
"name": "alice",
"company": "Acme Corp",
"type": "admin"
},
"action": "write",
"object": "id1234"
},
"B": {
"user": {
"name": "bob",
"company": "Acme Corp",
"type": "employee"
},
"action": "read",
"object": "id1234"
},
"C": {
"user": {
"name": "eve",
"company": "Acme Corp",
"type": "user",
},
"action": "read",
"object": "id1234"
}
}
}
In the event of matching keys between the common_input
and the per-query input
object, the per-query input's value is used.
This behavior is intentionally like the behavior of object.union
in Rego.