Add permissions config handling
Create a config something like.
{
"permissions: [
{
"message_type": "mission_plan",
"accept_from": [ "noc-c2", "ori" ],
},
{
"message_type": "acknowledgement",
"accept_from": [ "noc-c2" ],
"where": [
{
"field": "payload.acknowledgement_type",
"value": "mission_plan.pilot_approval"
}
]
}
]
}
On receiving messages process test against any configured permissions.
- Default to an empty list if the permissions config file is not specified
- Approve by default
- If there is a rule which applies for the message type and conditions
- Accept if meets conditions
- 403 if not