openvibers/openvibe.network Commits

Network: Services may send control requests to Watch (watch.resource.control) (#183)

OP OpenVibers committed 30 days ago · 06efd3b8c8 · 3 files, +8 −5

Plan T13 step 10 (ADR-048): OpenVibe.Services sends a person's control requests (suspend, resume, delete) to the authority that owns the resource.

- `services` gets `watch.resource.control` (audience `openvibe.watch`). Watch is the first authority to take control requests (Watch#57, Contracts 0.165.0).
- Contracts pin 0.162 → 0.165 (additive).

**Tests:** `principals` and `services-resource-grants` pass.

Changes

ddiff --git a/package-lock.json b/package-lock.json
iindex dd638a93..7637f918 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.162.0",
++ "openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.165.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.162.0",
-- "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.162.0",
-- "integrity": "sha512-uSJBsK1mFEnbS/SRoNx6jzSQE7P+ihJ1VkHXbaOKwbEc7wJdeFkeEVaJIMwUjq6f/u+StbyDepJR9CT8LkxNRA==",
++ "version": "0.165.0",
++ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.165.0",
++ "integrity": "sha512-IfBo0pI0lAqSGvtjA7PWjzf2apWMOrY1wAvHB9miGUgVOsjlLbkE8ND8SSutExoLGmZRsf+pePcCw2QbGjTjIA==",
"license": "AGPL-3.0-only",
"dependencies": {
"ajv": "^8.17.1",
ddiff --git a/package.json b/package.json
iindex 9fbdc386..919579e0 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.162.0",
++ "openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.165.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 094e96c8..54bb5fc1 100644
---- a/server/identity/principals.js
++++ b/server/identity/principals.js
@@@ -253,6 +253,9 @@ const DEFAULT_GRANTS = [
// pastes and spaces.
// Since contracts 0.150.0 the static hosting index is Space's (space.resource.read); Host's is retired.
...['media', 'events', 'space', 'watch', 'actor', 'bot', 'chat', 'openre', 'community'].map(id => ['services', `${id}.resource.read`, `openvibe.${id}`, []]),
++ // ADR-048 control (plan T13 step 10): Services sends a person's control requests to the authority that owns the
++ // resource. Watch is the first to take them (watch.resource.control, contracts 0.165.0; Watch#57).
++ ['services', 'watch.resource.control', 'openvibe.watch', []],
// Plan T14: OpenVibe.Run publishes run.job.* and hands each job to a paired Node through Bot's internal jobs API
// (POST /api/v1/jobs, /jobs/:id/cancel, GET /jobs/:id, capability bot.job.dispatch, service-to-service only).
['run', 'events.event.publish', 'openvibe.events', []],