openvibers/openvibe.network Commits

Network: Actor may use a person's own computer through Bot (bot.computer.control, contracts 0.166) (#184)

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

Plan T14/T17 (contracts 0.166.0, Bot#102, Node#41): Actor gets `bot.computer.control` on openvibe.bot, so a person's agent can use their own computer through Bot.

Bot answers only for the machine's owner (X-OV-Subject), and only where the owner turned "Let my agent use this computer" on. The level the owner set on the machine decides what may happen there.

This also pins contracts v0.166.0.

principals, service-principal and restored-grants tests pass.

Changes

ddiff --git a/package-lock.json b/package-lock.json
iindex 7637f918..64198b8c 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.165.0",
++ "openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.166.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.165.0",
-- "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.165.0",
-- "integrity": "sha512-IfBo0pI0lAqSGvtjA7PWjzf2apWMOrY1wAvHB9miGUgVOsjlLbkE8ND8SSutExoLGmZRsf+pePcCw2QbGjTjIA==",
++ "version": "0.166.0",
++ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.166.0",
++ "integrity": "sha512-62U8JXv2sf2YVJaO4T4l8eszcm9qSpNCKMgbRX3xxeSFxytyR6jwcuB+GRhkVzp0DLssk9AIks7pUxG/n2fDtw==",
"license": "AGPL-3.0-only",
"dependencies": {
"ajv": "^8.17.1",
ddiff --git a/package.json b/package.json
iindex 919579e0..bbd0d4f4 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.165.0",
++ "openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.166.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 54bb5fc1..0d24eb4a 100644
---- a/server/identity/principals.js
++++ b/server/identity/principals.js
@@@ -269,6 +269,10 @@ const DEFAULT_GRANTS = [
// (robots.agent_control); its gate, limits and e-stop still judge every step.
['actor', 'bot.robot.read', 'openvibe.bot', []],
['actor', 'bot.robot.control', 'openvibe.bot', []],
++ // Plan T14/T17 (contracts 0.166.0): the agent uses a person's own computer (OpenVibe.Node's computer plugin) through
++ // 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 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