Choose what this site may use

This site uses strictly necessary cookies to work and to remember your privacy choices. With your permission it would also load content hosted by other services, such as videos, maps and fonts, which then receive your network address and device data. We do not sell or share your personal information and we run no advertising. Choose Accept all, Reject all or Customise. You can change your mind at any time through Privacy choices at the foot of every page.

  • Always on

    Needed for the site to work and to remember your privacy choices. Always on.

  • Remembers settings you choose, such as the light or dark display, in your browser.

  • Loads videos, maps and other content hosted by other services. Those services receive your address and device data.

Menu Close
In this section: Specification
Specification
Functions
Schemas
Registers

RequestContext

Source schemas/json/request-context.schema.json

On this page
  1. Properties
  2. Positive fixtures
  3. Negative fixtures
  4. Mappings to open standards
  5. Schema

Observatory Protocol request context (OBSP 0.1 section 4.3). Repository and version provenance of an implementation is deployment metadata and MUST NOT be injected into each request context.

FieldValue
Identifierurn:obsp:schema:v3.1:requestcontext
Dialecthttps://json-schema.org/draft/2020-12/schema
Used by functionsJoin

Properties

PropertyRequiredTypeDescription
schemaVersionyesreference
requestIdyesstring
tenantUniyesreference
workspaceUniyesreference
principalUniyesreference
workloadUninoreference
purposeyesreference
jurisdictionContextyesarray
chronotopeUniyesreference
policyDigestyesreference
classificationnostring
dataCutUninoreference
correlationIdnostring
idempotencyKeynostring
extensionsnoreference

Positive fixtures

  • request-context.valid.json

Negative fixtures

  • request-context.extra-property.json: additionalProperties at /: Additional properties are not allowed ('unexpected', 'unknownBinding' were unexpected)
  • request-context.missing-policy-digest.json: policyDigest is required

Mappings to open standards

A mapping to a standard, never a conformance statement.

  • maps to NS-10 Policies and clauses (relation REL-NS-10)

Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:obsp:schema:v3.1:requestcontext",
  "title": "RequestContext",
  "description": "Observatory Protocol request context (OBSP 0.1 section 4.3). Repository and version provenance of an implementation is deployment metadata and MUST NOT be injected into each request context.",
  "type": "object",
  "required": [
    "requestId",
    "tenantUni",
    "workspaceUni",
    "principalUni",
    "purpose",
    "jurisdictionContext",
    "chronotopeUni",
    "policyDigest",
    "schemaVersion"
  ],
  "properties": {
    "schemaVersion": {
      "$ref": "#/$defs/SchemaVersion"
    },
    "requestId": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128
    },
    "tenantUni": {
      "$ref": "#/$defs/Uni"
    },
    "workspaceUni": {
      "$ref": "#/$defs/Uni"
    },
    "principalUni": {
      "$ref": "#/$defs/Uni"
    },
    "workloadUni": {
      "$ref": "#/$defs/Uni"
    },
    "purpose": {
      "$ref": "#/$defs/NonEmptyString"
    },
    "jurisdictionContext": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 2,
        "maxLength": 128
      }
    },
    "chronotopeUni": {
      "$ref": "#/$defs/Uni"
    },
    "policyDigest": {
      "$ref": "#/$defs/Digest"
    },
    "classification": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "dataCutUni": {
      "$ref": "#/$defs/Uni"
    },
    "correlationId": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128
    },
    "idempotencyKey": {
      "type": "string",
      "minLength": 8,
      "maxLength": 256
    },
    "extensions": {
      "$ref": "#/$defs/Extensions"
    }
  },
  "$defs": {
    "Uni": {
      "type": "string",
      "minLength": 8,
      "maxLength": 256,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9:._/@-]{7,255}$",
      "description": "Durable UNI or typed unresolved identifier according to authority rules"
    },
    "Digest": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9._-]{1,31}:[A-Fa-f0-9]{32,128}$",
      "description": "Algorithm-prefixed hexadecimal digest"
    },
    "NonEmptyString": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048
    },
    "Extensions": {
      "type": "object",
      "description": "Namespaced extension bag. Extensions cannot override canonical top-level semantics.",
      "propertyNames": {
        "pattern": "^[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)+$"
      },
      "additionalProperties": true
    },
    "SchemaVersion": {
      "type": "string",
      "const": "3.1.0"
    }
  },
  "additionalProperties": false,
  "$comment": "tenantUni/workspaceUni/principalUni/policyDigest are authoritative security context. Implementations must derive or verify them server-side and must not trust caller-selected authority merely because the document validates structurally."
}