Skip to main content

Record message

sasha.common.public.Record · sasha/common/public/record.proto:68

A Record attaches creator-declared distribution intent, display metadata, and content provenance (a C2PA manifest store) to a signature.

Visibility​

A lookup always returns coarse Guidance (evaluated server-side). It may additionally return a field-filtered Record. Fields are private by default, and what a looker receives depends on who it is:

  • The owning creator receives the full Record.
  • Another creator receives the fields the owner has marked public together with the fields the owner has granted to that creator. Distribution fields are disclosed like any other field once public or granted.
  • Any other looker, including a creator with neither a public nor a granted field, receives no Record, only Guidance.

The full Record is always readable by its owning creator (see GetSignatureRecord).

Marking a field public is a deliberate, per-field opt-in and is effectively irreversible: once a value is returned to any other creator it is out, though the owner can stop disclosing it going forward.

Consistency rules (enforced on write)​

  • share_state must be set and must not be SHARE_STATE_UNSPECIFIED.
  • SHARE_STATE_UNRESTRICTED and SHARE_STATE_PRIVATE must not carry any distribution fields.
  • SHARE_STATE_RESTRICTED may carry any subset of the distribution fields, including none. The fields form a permit list: with none present the Record permits no locations yet, so a creator can declare the restriction first and add the conditions as they become known (progressive disclosure).
  • Every custom_fields key must be one the creator may currently write: declared for the creator, still open for writing, and with the declared type matching the supplied value kind.

Contradictory combinations are rejected with INVALID_ARGUMENT; there are no precedence rules.

Size limits (enforced on write)​

  • allowed_publish_urls / allowed_source_urls: at most 100 patterns each, each pattern at most 2048 characters.
  • custom_fields: at most 32 entries; keys 1-64 characters; string_value at most 1024 characters.
  • byline / licensee / asset_source_id: at most 256 characters each.
  • purchase_url: at most 2048 characters.
  • A Record serialized without c2pa_manifest_store must not exceed 64 KiB (the manifest store has its own 256 KiB limit).

Writes exceeding a limit are rejected with INVALID_ARGUMENT.

  • share_stateShareStaterequired= 1
    The creator-declared share state of the media.
  • allowed_publish_urlsrepeated stringoptional= 2
    URL patterns the browser-facing display URL of the media is allowed to match (only meaningful with SHARE_STATE_RESTRICTED).
  • allowed_source_urlsrepeated stringoptional= 3
    URL patterns the storage/CDN address of the media bytes is allowed to match (only meaningful with SHARE_STATE_RESTRICTED).
  • allowed_fromgoogle.protobuf.Timestampoptional= 4
    The media is not allowed to be available before this time (supports embargo dates). Only meaningful with SHARE_STATE_RESTRICTED.
  • allowed_togoogle.protobuf.Timestampoptional= 5
    The media is not allowed to be available after this time. Only meaningful with SHARE_STATE_RESTRICTED.
  • bylinegoogle.protobuf.StringValueoptional= 6
    Display text the publisher is expected to show alongside the media (e.g. photographer credit).
  • purchase_urlgoogle.protobuf.StringValueoptional= 7
    URL where the media can be purchased or licensed.
  • licenseegoogle.protobuf.StringValueoptional= 12
    Legal business name of the entity that has licensed the media asset (e.g. "Example Media Group Ltd."). Aids enforcers when the licence agreement is not bound to a specific location.
  • asset_source_idgoogle.protobuf.StringValueoptional= 13
    The creator's own upstream source ID for the asset: the creator's identifier for the media in their own system (e.g. "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d").
  • custom_fieldsmap<string, FieldValue>optional= 10
    Custom fields, keyed by a creator-chosen name.
  • c2pa_manifest_storegoogle.protobuf.BytesValueoptional= 11
    The signed C2PA manifest store persisted for the signature, as serialized C2PA manifest-store (JUMBF) bytes.
  • created_atgoogle.protobuf.Timestamp= 8
    Output only. The time the Record was first created. Ignored on write.
  • updated_atgoogle.protobuf.Timestamp= 9
    Output only. The time the Record was last replaced. Ignored on write.

Field notes​

allowed_publish_urls

Optional. URL patterns the browser-facing display URL of the media is allowed to match (only meaningful with SHARE_STATE_RESTRICTED).

The distribution fields form a permit list: every condition present must hold for the media to be allowed at a location, and when none are present the Record permits no locations.

Pattern syntax is defined by the SASHA URL matching specification.

allowed_source_urls

Optional. URL patterns the storage/CDN address of the media bytes is allowed to match (only meaningful with SHARE_STATE_RESTRICTED).

Pattern syntax is defined by the SASHA URL matching specification.

byline

Optional. Display text the publisher is expected to show alongside the media (e.g. photographer credit).

Plain text, at most 256 characters, no control characters. Consumers must always treat this value as text, never as markup.

purchase_url

Optional. URL where the media can be purchased or licensed.

Must be a well-formed https URL of at most 2048 characters, without userinfo, and must not point at an IP literal or localhost.

licensee

Optional. Legal business name of the entity that has licensed the media asset (e.g. "Example Media Group Ltd."). Aids enforcers when the licence agreement is not bound to a specific location.

Plain text, at most 256 characters, no control characters. Consumers must always treat this value as text, never as markup.

asset_source_id

Optional. The creator's own upstream source ID for the asset: the creator's identifier for the media in their own system (e.g. "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d").

Opaque text, at most 256 characters, no control characters. A UUID (RFC 9562) is recommended but not required. Consumers must always treat this value as text, never as markup.

custom_fields

Optional. Custom fields, keyed by a creator-chosen name.

Keys are case-sensitive and matched exactly: asset_id and Asset_Id are two different keys. A key travels verbatim through every encoding; the proto3 JSON mapping and the REST API leave map keys as written and never convert them to camelCase. By convention keys are lower_snake_case, such as asset_id; the format itself is not checked, only the length.

Each key must be declared for the creator before it can be written, and the value kind supplied here must match the type declared for that key. A write naming a key that is undeclared, or that was declared and has since been withdrawn from writing, or supplying a mismatched kind, is rejected with INVALID_ARGUMENT; the rejection names the keys the creator may currently write. The declarations are maintained by SASHA on the creator's behalf, so a field is declared once and then carries the same type across all of the creator's Records.

A key can be withdrawn from writing, or redeclared with a different type, after Records have already been written with it. Those Records are left as they are: their values stay stored and are disclosed exactly as before. Only further writes of the key are refused, so a write that replaces the whole Record is rejected while it still carries a value the creator may no longer write, and succeeds once that value is dropped from it. An update that does not touch custom_fields carries the stored values through untouched.

Custom fields are display/metadata only: they never participate in distribution guidance evaluation, so they may be set under any share_state. Each custom field is disclosed to other parties like any other Record field: to the creators the owner has granted it to, or to every creator that looks it up once the owner marks it public (see Visibility above).

c2pa_manifest_store

Optional. The signed C2PA manifest store persisted for the signature, as serialized C2PA manifest-store (JUMBF) bytes.

Set it when the signature is registered, or afterwards via UpdateSignatureRecord — either by replacing the whole record or by naming record.c2pa_manifest_store in the field mask. See UpdateSignatureRecord for the validation rules applied whenever a manifest store is stored. A surface that does not write this field says so in its own documentation. The media itself is never included.

Referenced by​