ConnectPolicy connect.policy@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- connect
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/connect/policy.v1.json
connect.policy@1: the grants, routes and exit-node settings of one private Connect tenant. It is deliberately tenant-scoped: a rule never names a device, person or tag from another tenant, and default_action is deny unless the owner opens a path. It describes intent, not the control plane's internal ACL file or keys.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | string | yes |
| |
owner | identity.subject-ref | yes | ||
project_id | string | null |
| ||
tenant | one of | yes | The one tenant this policy can affect; a rule or route naming another tenant's id is invalid. | |
name | string |
| ||
version | integer | yes | Bumped on every change; a device keeps the version it last applied. |
|
default_action | enum | yes | deny unless the owner explicitly opens a path. |
|
rules | array of object | yes |
| |
rules[].action | enum | yes |
| |
rules[].sources | https://openvibe.network/contracts/connect/policy.v1.json#/$defs/selector | yes |
| |
rules[].destinations | https://openvibe.network/contracts/connect/policy.v1.json#/$defs/selector | yes |
| |
rules[].ports | https://openvibe.network/contracts/connect/policy.v1.json#/$defs/port | TCP/UDP ports or ranges; omit for all ports. |
| |
rules[].description | string |
| ||
exit_node | object | null | Exit nodes are usable only by this tenant's devices; no public share may target one. | ||
subnet_routes | array of object |
| ||
subnet_routes[].device_id | string | yes |
| |
subnet_routes[].cidr | string | yes |
| |
updated_by | identity.subject-ref | |||
created_at | string | yes |
| |
updated_at | string | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: home-mesh
{
"id": "pol_01J8Z3Q4R5S6T7V8W9X0Y1Z2A4",
"owner": {
"type": "user",
"id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A6"
},
"project_id": null,
"tenant": {
"type": "user",
"id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A6"
},
"name": "Home mesh",
"version": 2,
"default_action": "deny",
"rules": [
{
"action": "allow",
"sources": [
"device:dev_01J8Z3Q4R5S6T7V8W9X0Y1Z2A8"
],
"destinations": [
"device:dev_01J8Z3Q4R5S6T7V8W9X0Y1Z2A8"
],
"ports": [
"443",
"8000-8100"
],
"description": "The owner's own devices reach each other."
}
],
"exit_node": {
"enabled": false,
"device_ids": []
},
"subnet_routes": [
{
"device_id": "dev_01J8Z3Q4R5S6T7V8W9X0Y1Z2A8",
"cidr": "192.168.1.0/24"
}
],
"updated_by": {
"type": "user",
"id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A6"
},
"created_at": "2026-10-29T08:00:00.000Z",
"updated_at": "2026-10-29T09:00:00.000Z"
}Rejected: bad-port
{
"id": "pol_01J8Z3Q4R5S6T7V8W9X0Y1Z2A4",
"owner": {
"type": "user",
"id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A6"
},
"tenant": {
"type": "user",
"id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A6"
},
"version": 1,
"default_action": "deny",
"rules": [
{
"action": "allow",
"sources": [
"*"
],
"destinations": [
"*"
],
"ports": [
"http"
]
}
],
"created_at": "2026-10-29T08:00:00.000Z",
"updated_at": "2026-10-29T09:00:00.000Z"
}Rejected: bad-selector
{
"id": "pol_01J8Z3Q4R5S6T7V8W9X0Y1Z2A4",
"owner": {
"type": "user",
"id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A6"
},
"tenant": {
"type": "user",
"id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A6"
},
"version": 1,
"default_action": "deny",
"rules": [
{
"action": "allow",
"sources": [
"everyone"
],
"destinations": [
"*"
]
}
],
"created_at": "2026-10-29T08:00:00.000Z",
"updated_at": "2026-10-29T09:00:00.000Z"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('connect.policy@1', value); // { valid, errors: [{ path, message }] }