WebsiteShareConnectRequest website.share-connect-request@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/website/share-connect-request.v1.json

website.share-connect-request@1: what a Link presents to open the tunnel for one share (POST /api/v1/shares/:id/tunnel, capability website.share.connect). The Link proves its Network node principal with a client-credentials token whose audience is openvibe.website, and this short-lived, single-use tunnel_token minted by Connect binds the connection to one share. The edge checks both; neither alone opens the route. The token is presented once and never stored, logged or returned.

Fields

FieldTypeRequiredDescriptionConstraints
share_idstringyes
  • pattern ^shr_[0-9A-HJKMNP-TV-Z]{26}$
node_idstringyesMust equal the node principal in the Network token; a mismatch is refused and audited.
  • pattern ^lnk_[0-9A-HJKMNP-TV-Z]{26}$
tunnel_tokenstringyesA short-lived, single-use, share-scoped token minted by Connect. Send it once over TLS; never put it in a URL, log, audit entry or event.
  • minLength 20
  • maxLength 4096
transportenumThe data-plane transport the Link is trying. quic is ALPN ovconnect/1; http2-ws is the 443 fallback when UDP is blocked.
  • one of "quic", "http2-ws"
  • default "quic"
node_versionstringThe Link release, for posture and diagnostics; never used for authorization.
  • pattern ^[0-9]+\.[0-9]+\.[0-9]+(?:[-+][0-9A-Za-z.-]+)?$
regionstringThe edge region the Link is dialing; the edge refuses a region it does not serve.
  • maxLength 40

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: quic
{
  "share_id": "shr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3",
  "node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
  "tunnel_token": "ovt_01J8Z3Q4R5S6T7V8W9X0Y1Z2A9_one_time",
  "transport": "quic",
  "node_version": "0.42.0",
  "region": "eu"
}
Rejected: bad-transport
{
  "share_id": "shr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3",
  "node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
  "tunnel_token": "ovt_01J8Z3Q4R5S6T7V8W9X0Y1Z2A9_one_time",
  "transport": "websocket"
}
Rejected: missing-token
{
  "share_id": "shr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3",
  "node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('website.share-connect-request@1', value);   // { valid, errors: [{ path, message }] }