Draft
This is a working draft. Documents and schemas may change before 0.1.0. Discuss changes on GitHub.
OPP Specification¶
Version: 0.1.0.dev0 (draft; documents and schemas may change before 0.1.0)
OPP describes what an organization treats as private or confidential, where that data lives, and how it may be shared, in a form any tool or agent can read. The key words MUST, MUST NOT, SHOULD and MAY are to be read as in RFC 2119.
1. Documents¶
OPP has three document kinds, each a single YAML or JSON object:
| Kind | Recognized by | Schema |
|---|---|---|
| Catalog | a root classes list |
schema/catalog.schema.json |
| Privacy model | a root catalog reference |
schema/model.schema.json |
| Presets | a root presets list |
schema/presets.schema.json |
Documents SHOULD be named <name>.catalog.yaml and <name>.opp.yaml. Every document has an
opp field holding the specification version it was written for.
YAML documents MUST be representable as JSON. Quote scalars YAML might read as booleans, numbers
or dates ("yes", "010", "2026-01-01").
2. Enumerations¶
2.1 Sensitivity¶
Four ordered levels, lowest first:
| Level | Meaning |
|---|---|
public |
May be published |
internal |
For people inside the organization; harmless if it leaks |
confidential |
Harm to people or the organization if it leaks |
restricted |
Serious harm; legal duties attach (special-category data, credentials, card data) |
"Stricter" means a higher level.
2.2 Handling¶
How content of a class is made safe when it may be shared at all, ordered from least to most protective:
| Handling | Meaning |
|---|---|
allow |
Share as is |
generalize |
Share a coarser form: a year instead of a date, a city instead of an address, an aggregate instead of rows |
pseudonymize |
Replace each value with a consistent substitute that the organization can map back |
redact |
Remove the value and leave a typed placeholder |
block |
Do not share the content at all |
2.3 Destination¶
Where content is going:
| Destination | Meaning |
|---|---|
internal |
People and systems inside the organization |
partner |
A named outside party under contract |
external_ai |
A model or agent run by a third party, such as a cloud LLM |
public |
Anyone |
2.4 Action¶
The answer for one piece of content and one destination: allow, generalize, pseudonymize,
redact, block, or review (a person must decide). handling in a rule means "apply the
class's handling".
2.5 Status¶
proposed (written by a generator, not checked) or certified (checked by a person). A generator
MUST NOT overwrite a certified entry.
3. Catalog¶
A catalog is the shared vocabulary. The baseline catalog catalog/baseline.catalog.yaml ships
with this specification; organizations MAY publish catalogs that extend it.
| Field | Type | Required | Description |
|---|---|---|---|
opp |
string | yes | Specification version |
name |
string | yes | Catalog name, unique within its publisher |
version |
string | yes | Catalog version |
description |
string | no | |
extends |
list of catalog references | no | Catalogs whose classes this one inherits |
groups |
list of Group | yes | Top-level families of classes |
classes |
list of Class | yes | |
references |
list of Reference source | no | The legal and industry sources the classes cite |
3.1 Group¶
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | personal, special, credential, confidential in the baseline |
label |
string | yes | |
description |
string | no |
3.2 Class¶
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | Dotted, starting with its group id: personal.email |
label |
string | yes | |
description |
string | yes | What belongs in this class, in plain words |
group |
string | yes | A group id |
sensitivity |
Sensitivity | yes | Default level |
handling |
Handling | yes | Default handling |
kind |
value or topic |
yes | value: a piece of data with a boundary (an email address). topic: what a text or record is about (a health condition, a legal dispute) |
refs |
list of Reference | no | Where law or an industry standard names this class |
hints |
Hints | no | Non-normative help for generators and detectors |
3.3 Reference¶
| Field | Type | Required | Description |
|---|---|---|---|
source |
string | yes | An id from the catalog's references: gdpr, hipaa, pci_dss, ccpa |
item |
string | yes | The article, section or list item, as written in the source: Art. 9(1), 164.514(b)(2)(i)(F) |
note |
string | no |
A Reference source has id, title and url.
3.4 Hints¶
| Field | Type | Description |
|---|---|---|
name_hints |
list of string | Words that suggest the class in a column or field name, lowercase (email, e_mail, mail_address) |
value_types |
list of string | Detector types that find values of the class (EMAIL, PERSON, IBAN) |
cues |
list of string | Phrases that suggest a topic class in text |
Hints help a generator propose classifications; they never decide one on their own.
4. Privacy model¶
One organization's representation.
| Field | Type | Required | Description |
|---|---|---|---|
opp |
string | yes | Specification version |
name |
string | yes | |
organization |
string | yes | |
description |
string | no | |
catalog |
Catalog reference | yes | The catalog whose classes this model uses |
sources |
list of Source | yes | Where the data lives |
concepts |
list of Concept | no | The organization's own confidential concepts |
identifiers |
list of Identifier | no | The organization's identifier formats |
terms |
list of Term | no | Names that are confidential in themselves: codenames, unreleased products |
rules |
Rules | no | Sharing rules; the defaults in section 5 apply when absent |
provenance |
Provenance | no | How the model was produced |
extensions |
list of Extension | no | Vendor data, as in Ossie's nonportable_extensions |
A Catalog reference has name, version and an optional url.
4.1 Source¶
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | Unique in the model |
type |
database, file, document, web, api |
yes | |
locator |
string | yes | Where it is, without credentials: postgresql://db.internal/crm, s3://bucket/exports/, https://intranet/policies |
description |
string | no | |
datasets |
list of Dataset | yes | |
ossie |
Ossie reference | no | The Ossie semantic model that describes this source (section 6) |
A locator MUST NOT contain a password, token or key.
4.2 Dataset¶
A table, a file, a document or a page.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | crm.customers, exports/orders.csv, Employee handbook |
type |
table, file, document, page |
yes | |
description |
string | no | |
fields |
list of Field | no | Columns or keys; for tables and structured files |
topics |
list of Classification | no | topic classes found in the content; for documents and pages |
sensitivity |
Sensitivity | no | Overrides the level computed from fields and topics |
A dataset's computed sensitivity is the strictest of its fields' and topics' sensitivities.
4.3 Field¶
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Column name or JSON path |
datatype |
string | no | As reported by the source |
classes |
list of Classification | no | Empty means nothing private was found |
sensitivity |
Sensitivity | no | Overrides the strictest of its classes |
handling |
Handling | no | Overrides the strictest of its classes |
identifier |
string | no | The id of an Identifier this field holds |
ossie_field |
string | no | dataset.field in the referenced Ossie model |
4.4 Classification¶
| Field | Type | Required | Description |
|---|---|---|---|
class |
string | yes | A class id from the catalog, or a concept id from this model |
confidence |
number 0 to 1 | yes | |
status |
Status | yes | |
evidence |
list of Evidence | no |
Evidence has kind (name, values, detector, person), detail (text) and, for values,
share (the share of sampled values that matched, 0 to 1) and sampled (how many were
sampled). Evidence MUST NOT contain data values.
4.5 Concept¶
Something the organization calls confidential in its own words.
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | Unique in the model, outside the catalog's namespaces: org.coachee_notes |
label |
string | yes | |
description |
string | yes | Written as an admin would define it; tools MAY embed it to match text by meaning |
extends |
string | yes | The catalog class it specializes: special.health, confidential.customers |
sensitivity |
Sensitivity | no | Defaults to the class's; MUST NOT be lower |
handling |
Handling | no | Defaults to the class's; MUST NOT be less protective |
synonyms |
list of string | no | |
cues |
list of string | no | Phrases that suggest it in text |
status |
Status | yes |
4.6 Identifier¶
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | |
label |
string | yes | Coachee ID |
class |
string | yes | Class or concept id |
pattern |
string | yes | A regular expression in the common subset of ECMAScript, Python and RE2 (no lookbehind, no backreferences) that matches one whole value |
keywords |
list of string | no | Words that, when near a match, confirm it |
status |
Status | yes |
4.7 Term¶
| Field | Type | Required | Description |
|---|---|---|---|
term |
string | yes | Matched case-insensitively as a whole word |
class |
string | yes | Class or concept id |
status |
Status | yes |
4.8 Provenance¶
generator (name and version), generated_at (RFC 3339 time), reviewed_by (list of names)
and notes.
5. Rules¶
Rules decide the action for content of a given sensitivity going to a given destination.
| Field | Type | Description |
|---|---|---|
default |
map of Sensitivity → map of Destination → Action | The matrix below, overridden cell by cell |
overrides |
list of Override | Exceptions for one class, concept or dataset |
An Override has target (a class, concept or dataset name), destination and action, and an
optional reason.
Default matrix (applies when a model has no rules, and fills any cell a model omits):
| Sensitivity | internal | partner | external_ai | public |
|---|---|---|---|---|
public |
allow | allow | allow | allow |
internal |
allow | allow | allow | review |
confidential |
allow | handling | handling | block |
restricted |
handling | block | block | block |
Resolution for one piece of content:
- Find every classification that applies (fields, topics, concepts, identifiers, terms).
- For each, take its sensitivity and handling (entry override, else concept, else class).
- Look up the action: an Override for the target and destination wins; otherwise the matrix.
handlingresolves to the entry's handling. - The content's action is the strictest of the actions, in the order
allow<generalize<pseudonymize<redact<review<block.
6. Ossie interoperability¶
A privacy model can describe data that an Apache Ossie semantic model already describes:
Source.ossieholdsnameand an optionalurlof the Ossie model.Field.ossie_fieldholds the Ossiedataset.fieldname.
A privacy model MAY instead be carried inside an Ossie document as a non-portable extension with
vendor_name: OPP and the privacy model's fields under data, until Ossie defines a portable
place for privacy metadata.
7. Industry presets¶
A presets document (schema/presets.schema.json) gives starting points by industry. The baseline
presets, presets/industries.preset.yaml, cover 15 industry groups matched by NAICS 2022 code
prefix (the longest matching prefix wins).
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | healthcare, finance, hr, ... |
label |
string | yes | |
naics_prefixes |
list of string | yes | NAICS 2022 code prefixes, 2 to 6 digits |
focus_classes |
list of string | yes | Catalog classes most likely to matter in this industry |
typical_identifiers |
list of string | no | Identifier kinds, described in words, never as real values |
typical_documents |
list of string | no |
A preset only proposes: a generator MAY use it to rank classes and to look for the identifiers it names, and MUST NOT lower any class's sensitivity because of it.
8. Conformance¶
- A conforming document validates against its JSON Schema, and every class and concept id it uses resolves.
- A conforming generator writes conforming documents, writes no data values anywhere, marks
its entries
proposed, and preservescertifiedentries. - A conforming query engine applies section 5 exactly and returns, for every finding, the class or concept, its sensitivity, the action and the reason.
9. Version history¶
- 0.1.0.dev0: first draft.