openvibers/openvibe.network Commits

Network: Watch may probe from a person's machine through Bot (bot.computer.control, contracts 0.167) (#185)

OP OpenVibers committed 30 days ago · a381e1533e · 3 files, +9 −5

Plan T18 step 7 (contracts 0.167.0, Bot#104): Watch gets `bot.computer.control` on openvibe.bot, for a watch's `node` source.

Bot lets Watch send only the read-only `probe`, as the machine's owner, and only where the owner turned on "Let my watches check things from this computer".

This also pins contracts v0.167.0. The principals and service-principal tests pass.

Changes

ddiff --git a/package-lock.json b/package-lock.json
iindex 64198b8c..a7844d52 100644
---- a/package-lock.json
++++ b/package-lock.json
@@@ -20,7 +20,7 @@
"iovalkey": "^0.4.0",
"jsonwebtoken": "^9.0.0",
"multer": "^1.4.5-lts.1",
-- "openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.166.0",
++ "openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.167.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.44.0",
"openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.1.3",
"pg": "^8.23.0",
@@@ -1320,9 +1320,9 @@
}
},
"node_modules/openvibe-contracts": {
-- "version": "0.166.0",
-- "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.166.0",
-- "integrity": "sha512-62U8JXv2sf2YVJaO4T4l8eszcm9qSpNCKMgbRX3xxeSFxytyR6jwcuB+GRhkVzp0DLssk9AIks7pUxG/n2fDtw==",
++ "version": "0.167.0",
++ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.167.0",
++ "integrity": "sha512-CVV3IX+jS6WJM5+7lYS3KK8ZJUNkTyBY55Pal3CG0hZlSDpIqGa/wFw1uSVgoo4vE4vkljE6hIjz6cGvopLrnQ==",
"license": "AGPL-3.0-only",
"dependencies": {
"ajv": "^8.17.1",
ddiff --git a/package.json b/package.json
iindex bbd0d4f4..7ddd64cc 100644
---- a/package.json
++++ b/package.json
@@@ -24,7 +24,7 @@
"iovalkey": "^0.4.0",
"jsonwebtoken": "^9.0.0",
"multer": "^1.4.5-lts.1",
-- "openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.166.0",
++ "openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.167.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.44.0",
"openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.1.3",
"pg": "^8.23.0",
ddiff --git a/server/identity/principals.js b/server/identity/principals.js
iindex 0d24eb4a..36da1730 100644
---- a/server/identity/principals.js
++++ b/server/identity/principals.js
@@@ -273,6 +273,10 @@ const DEFAULT_GRANTS = [
// Bot, only as that machine's owner (X-OV-Subject) and only where the owner turned on "Let my agent use this
// computer"; the level the owner set on the machine decides what may happen there.
['actor', 'bot.computer.control', 'openvibe.bot', []],
++ // Plan T18 step 7 (contracts 0.167.0): a watch's node source checks something on its owner's own network from their
++ // machine. Bot lets Watch send only the read-only probe, as the owner, where they turned on "Let my watches check
++ // things from this computer".
++ ['watch', 'bot.computer.control', 'openvibe.bot', []],
// Plan T14/T16 (contracts 0.161.0): a person's own machine runs jobs for them. Bot reports the worker offers of the
// machines connected to it (each user-owned offer names its owner); Run reads them, owner included, to place a
// person's job only on that person's own machines; Codes starts, follows and cancels a coding job for the signed-in