---
title: "media.access-key@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/media.access-key"
updated: null
---

# media.access-key@1 · OpenVibe.Services

HTML: [media.access-key@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/media.access-key)

# AccessKey `media.access-key@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: media
- Visibility: public
- Status: active
- Compatibility: backward
- Decision: [ADR-031](/docs/adr/ADR-031)
- Schema: [`https://openvibe.network/contracts/media/access-key.v1.json`](/docs/contracts/media.access-key.json)

media.access-key@1 (ADR-031, amended 2026-10-14): one S3 access key of OpenVibe.Media's S3 surface (https://s3.openvibe.media). It is bound to one project environment, reads and/or writes, and may be scoped to some zones of that environment (zone.object-zone@1 ids; empty means every zone). Media issues and verifies it: SigV4 needs the secret, so the party that checks signatures keeps it, encrypted, and shows it once (media.access-key-issued@1). The secret is never part of this record. A revoked key is refused at once; a key scoped only to a zone that is deleted is revoked with it. More fields may be added.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `id` | string | yes | The S3 access key id. | - `pattern ^ovk_[0-9A-HJKMNP-TV-Z]{26}$` |
| `project_id` | string | yes |  | - `pattern ^prj_[0-9A-HJKMNP-TV-Z]{26}$` |
| `env` | enum | yes |  | - `one of "sandbox", "production"` |
| `name` | string | yes | What uses the key, as the person who issued it named it. | - `minLength 1`<br>- `maxLength 80` |
| `permissions` | enum | yes |  | - `one of "read", "write", "read-write"` |
| `zones` | array of string | yes | The zones it may reach; empty = every zone of the environment. | - `maxItems 20`<br>- `unique items`<br>- `items: pattern ^zon_[0-9A-HJKMNP-TV-Z]{26}$` |
| `created_by` | string | yes |  | - `pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$` |
| `created_at` | string | yes |  | - `format date-time` |
| `last_used_at` | string \| null | yes | The last signed request, to the minute. | - `format date-time` |
| `revoked_at` | string \| null | yes |  | - `format date-time` |

## Examples

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

 Valid: basic

~~~~
{
  "id": "ovk_01JZ0000000000000000000K01",
  "project_id": "prj_01JZ0000000000000000000P01",
  "env": "production",
  "name": "ci deploys",
  "permissions": "read-write",
  "zones": [],
  "created_by": "usr_01JZ0000000000000000000A01",
  "created_at": "2026-10-14T12:00:00.000Z",
  "last_used_at": null,
  "revoked_at": null
}
~~~~

Rejected: basic

~~~~
{
  "id": "ovk_01JZ0000000000000000000K01",
  "project_id": "prj_01JZ0000000000000000000P01",
  "env": "production",
  "name": "ci deploys",
  "permissions": "read-write",
  "zones": [],
  "created_by": "usr_01JZ0000000000000000000A01",
  "created_at": "2026-10-14T12:00:00.000Z",
  "last_used_at": null,
  "revoked_at": null,
  "secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('media.access-key@1', value);   // { valid, errors: [{ path, message }] }
~~~~
