WebsiteAuditEntry website.audit-entry@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/audit-entry.v1.json

website.audit-entry@1: one decision row for a Share, as the owner or a moderator sees it. It answers who reached (or tried to reach) a share, from where, what method and path, what the policy decided and how much crossed the edge. It deliberately carries no request or response body, headers, cookies, bearer or tunnel tokens, query string, password or hook payload: query strings are stripped before this record is made and bodies are captured, if at all, by the separate opt-in inspector with its own redaction.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • pattern ^aud_[0-9A-HJKMNP-TV-Z]{26}$
share_idstringyes
  • pattern ^shr_[0-9A-HJKMNP-TV-Z]{26}$
request_idstringyesThe edge request id, for joining a row to a captured request and a trace; never a secret.
  • minLength 1
  • maxLength 64
subjectanyWho the policy identified; absent for an anonymous request.
ipstring | nullThe observed client address (IPv4 or IPv6). Behind Cloudflare it is CF-Connecting-IP, trusted only from Cloudflare's ranges.
  • maxLength 45
countrystring | nullISO 3166-1 alpha-2 country from the edge's trusted lookup.
  • pattern ^[A-Z]{2}$
user_agentstring | null
  • maxLength 512
methodstring | null
  • pattern ^[A-Z]{3,10}$
pathstring | nullPath only, with the query string removed. No body, header, cookie or token is ever stored here.
  • maxLength 2048
statusinteger | null
  • minimum 100
  • maximum 599
decisionenumyesThe policy outcome: allow, deny, a bot challenge, an OIDC/sign-in redirect, or an edge error.
  • one of "allow", "deny", "challenge", "redirect", "error"
reasonstringA stable, short reason such as policy.denied or policy.password_required; never free-form request data.
  • maxLength 120
policy_idstring | null
  • pattern ^pol_[0-9A-HJKMNP-TV-Z]{26}$
policy_versioninteger | null
  • minimum 1
bytes_ininteger | null
  • minimum 0
bytes_outinteger | null
  • minimum 0
edge_idstring | null
  • maxLength 80
regionstring | null
  • maxLength 40
atstringyes
  • format date-time

Examples

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

Valid: denied
{
  "id": "aud_01J8Z3Q4R5S6T7V8W9X0Y1Z2B2",
  "share_id": "shr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3",
  "request_id": "req_01J8Z3Q4R5S6T7V8W9",
  "subject": {
    "type": "user",
    "id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A6"
  },
  "ip": "203.0.113.7",
  "country": "DE",
  "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X)",
  "method": "GET",
  "path": "/",
  "status": 403,
  "decision": "deny",
  "reason": "policy.named_only",
  "policy_id": "pol_01J8Z3Q4R5S6T7V8W9X0Y1Z2A4",
  "policy_version": 3,
  "bytes_in": 412,
  "bytes_out": 0,
  "edge_id": "edge-eu-1",
  "region": "eu",
  "at": "2026-10-29T09:00:00.000Z"
}
Rejected: bad-decision
{
  "id": "aud_01J8Z3Q4R5S6T7V8W9X0Y1Z2B2",
  "share_id": "shr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3",
  "request_id": "req_01J8Z3Q4R5S6T7V8W9",
  "decision": "allowed",
  "at": "2026-10-29T09:00:00.000Z"
}
Rejected: body-field
{
  "id": "aud_01J8Z3Q4R5S6T7V8W9X0Y1Z2B2",
  "share_id": "shr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3",
  "request_id": "req_01J8Z3Q4R5S6T7V8W9",
  "decision": "allow",
  "at": "2026-10-29T09:00:00.000Z",
  "body": "{\"password\":\"hunter2\"}"
}

Validate

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