ADL 0.6.0 reference · Review draft 1 · November 14, 2026.
Contents · Source map · Evidence
The 0.6 edition note
Retained §45.10 owns ranked classification and purpose handling. Its current boundary is record handling on export and declared integration dispatch. It is not a platform-wide information-flow guarantee and does not replace ordinary permissions on get/list.
Purpose must come from a trusted context: a supported signed claim, a configured client mapping, or a header explicitly trusted by the operator. A request body cannot declare its own authority. A purpose fixed in an authored integration operation is trusted configuration. Region values are declared names; this implementation does not measure the physical location of a remote host.
metadataOnly handling covers the documented history/audit paths, not every change log, rule log, server log, report, notification, or external sink. A lower classification in an incoming dispatch body does not override a higher stored classification when the stored record is resolved.
Erasure and retention must be read together with ADL 24. Keeping history can retain captured personal values. Rewriting chained or immutable history is refused by the current erasure path. This draft makes no claim about satisfying an external legal regime; it describes ADL declarations and implementation behavior.
Retained reference detail
The numbered sections below are carried from 45-privacy-and-gdpr.md. Their original baseline and evidence remain attached to the source. Statements about “current” or “checked” behavior in this retained text refer to those original observations unless the edition note explicitly updates them. This is a consolidated draft, not a claim of complete re-verification.
45.1 Scope and edition boundary
Privacy declarations classify fields, identify subject records, describe transformations and retention, and enable management operations for access, export, erasure, rectification, consent, restrictions, and legal holds. These are software contracts. The names of rights and regulations do not establish that a declaration or an application satisfies a legal obligation.
This chapter separates configured policy, invoked operation, and observed data changes. It corrects absolute guarantees in the inherited privacy chapter (v0.5.0, retired) where current execution is narrower. ADL 21 owns resource authority; ADL 24 owns record history; ADL 10 owns field declarations; and the platform owns encryption-key configuration and storage operation.
Cross-domain classification propagation remains an open item in the governing delta. No domain privacy block is a site-wide discovery or erasure guarantee.
45.2 Domain and field declarations
Place the policy under domain.privacy. An absent block leaves privacy disabled;
a supplied object defaults enabled to true. This is a fragment from the
complete privacy.yaml:
privacy:
classifications:
personal:
description: Fixture personal data
retention: 30 days
subjectIdentifier:
primary: email
alternates: [accountId]
anonymization:
method: anonymize
rules:
default: Redacted
email: $preserve
name: $hash6
| Policy key | Shape and native default |
|---|---|
classifications | Name-to-object map; description/retention are strings |
subjectIdentifier.primary | Claim/identifier name string, empty |
subjectIdentifier.alternates | Ordered array of names, empty |
anonymization.method | String, anonymize |
anonymization.rules | Field-name/default mapping to transformation strings |
retention | Array of category/duration/action/from policies |
consent | Array of purpose declarations |
A field’s privacy object can specify classification, pii, sensitive,
phi, encrypted, and subjectIdentifier. Boolean flags default false.
The example marks email both PII and a subject identifier; name is PII in
the same classification. A classification string does not automatically set
all of these flags.
The parser also supports inherited personal-data shorthand, but explicit field
privacy metadata takes precedence. privacy.encrypted: true on a field is
normalized into field security’s encryption flag. It is different from an
unsupported domain-level privacy.encryption provider block (§45.8).
45.3 Subject discovery and access/export
The engine discovers resources containing fields explicitly marked
privacy.subjectIdentifier: true. For each such resource it queries rows where
any marked field equals the supplied identifier. It does not automatically mark
a field merely because its name appears in the domain’s primary/alternate list,
follow every relationship, or search every resource with a PII field.
In the checked domain, Person has a marked email and is discovered; Unmarked
has the same email text and PII name but no identifier flag, so it is omitted.
A second activated domain containing the same subject remains outside the first
domain’s response. Calling that second domain’s access action reaches its own row.
Shared database storage does not expand a privacy engine’s domain model.
The primary/alternate configuration also determines the caller identity used by the consent gate: primary claim first, then alternate claims in declaration order, then username, then user ID. That caller-resolution sequence is distinct from the field flags used to discover data rows.
Access and export require privacyOfficer, admin, or administrator authority.
Missing identifier returns 422 VALIDATION_ERROR; an ordinary reader is refused
with 403 FORBIDDEN. Access returns subject, per-resource counts/records and
classification field lists, plus audit/history count blocks. It reads database
rows directly rather than applying each resource’s normal get filtering.
Export returns the same material with format: json. Its current generated
value is the subject identifier placeholder, not an export timestamp. It does
not build a CSV archive or collect every related file. Access/export entries are
written to the domain privacy log. A zero count does not prove that subject data
is absent from unmarked resources, other domains, external services, or backups.
45.4 Erasure, transformations, and partial application
The erase request accepts identifier, method (default anonymize), reason,
retainAudit/retainHistory flags (default true), excludeResources, and
dryRun (default false). Dry run reports affected resources/record IDs/fields and
blockers without performing the erasure. Counts identify matched records; they
are not a guarantee that every counted record can or will be changed.
The current engine uses direct SQL to delete records or transform their PII fields. It does not invoke ordinary delete/update handlers, so resource hooks, media cleanup, validation, and ordinary response filtering do not automatically apply.
retainAudit and retainHistory decide what happens to the audit rows and
history events of each erased record (kalos_adl 0.118.1, #1909). With true,
the default, those rows are left as they are and still name the subject. With
false, the rows are kept and the subject’s values in them are replaced, in
the same transaction as the record:
- In an audit row, the
fromandtoof every PII field get that field’s transformation rule. - In a history event, PII fields captured in
dataget their rule. - Any other text in those rows (
label,detail,actorName, nested values) that contains a value one of the record’s PII fields holds or has held, as the audit rows record it, has that value replaced.
Values shorter than three characters are not searched for. A field marked
$preserve is left alone. Personal data typed into a field that is not marked
pii is not recognised and stays. A record under legal hold keeps its trail
untouched. The response reports audit and history, each with rows (how
many rows the erased records have) and retained. Full-text search indexes,
other domains, files and backups are not covered.
Transformation rules are selected by field name, then default, then Redacted:
| Rule | Current transformation behavior |
|---|---|
Redacted or unrecognized method | Replacement string Redacted |
$preserve | Skip the field |
$hash6 | First six hexadecimal SHA-256 characters of the current string |
$pseudonym | Deterministic synthetic value seeded by record ID and field name |
Text containing $pseudonym | Interpolated synthetic value |
$fuzzyDate(duration) | Deterministic date shift within the parsed window |
Ruling R11 (kalos#447).
pseudonymizeis one-way. Lawful re-identification is not promised, no{domain}_pseudonym_maptable is written, and no reversal operation exists.
GDPR Article 4(5) defines pseudonymisation as reversible with separately-kept additional information — so a reader who knows the regulation will expect a mapping, and the inherited chapter promised one. Nothing writes it. Rather than build a reversal path, the ruling records that the transformation is one-way: the operation is closer to anonymisation than the Article 4(5) term suggests, and a controller relying on it cannot satisfy a re-identification obligation through this feature.
The practical consequence is a design constraint, not a caveat. If a lawful
basis requires re-identifying a subject later, the mapping has to exist
somewhere this feature does not put it — and $preserve on a key field, with
its own access controls, is the honest way to say so in the document.
These outputs are software transformations, not proof of anonymization or
resistance to re-identification. A six-character hash is not a uniqueness
constraint, and preserving an identifier keeps that identifier available.
Repeatedly hashing the already-transformed current value is not idempotent.
The fixture independently expects SHA-256(Alice) to start with 3bc510.
Legal holds are checked per matched record. The implementation can change
unheld records before discovering/reporting a held sibling. The checked real
request hashes p1.name, leaves held p2.name unchanged, and returns
409 LEGAL_HOLD. That response is not an all-or-nothing rollback guarantee.
Its dry-run predecessor correctly leaves both names untouched and reports the
hold. SQL failures are also not uniformly propagated into affected-record counts.
Immutable and chained history (ADL 0.6.0, #1563). A resource whose
history declares immutable: true or integrity: sha256Chain
(Chapter 24 §24.9) does not have those rows
rewritten. retainHistory defaults to true, and with it erasure proceeds and
leaves the history rows as they are, the subject’s captured values included.
An erasure that sends retainHistory: false for a record that has such
history is refused with 409 HISTORY_IMMUTABLE, and nothing is erased. Its
dry run reports a blocker of type immutableHistory. The author chooses
between a history nobody can rewrite and one erasure can reach; a resource
that must do both should not capture personal data in its history events.
45.5 Legal holds and retention
Create a legal hold with resource, recordId, and reason; optional fields
include expiration and regulation metadata. The action records caller/time and
returns a hold ID. Matching uses resource name and record ID. An unexpired hold
or one without an expiry blocks that record’s erasure/retention processing.
Creating a hold does not establish that its target record exists. Release takes
the hold ID; the engine removes that hold record.
A retention entry contains category, duration, action (default anonymize), and
from (default recordCreation). Classification-level retention text alone does
not schedule the array’s executable policy. The policy scans resources containing
fields in the selected category, including resources that are not subject-discovery
resources.
recordCreation uses a declared createdAt column; lastUpdate and lastActivity
use updatedAt. An unrecognized from value currently falls back to creation
rather than providing another clock. Missing timestamp fields, invalid durations,
and unsupported actions are reported as refusals. archive is explicitly refused;
it does not silently copy records to archival storage.
The manual retention sweep defaults to dryRun: true. It reports examined,
anonymized, deleted, onLegalHold, and optional refused messages. Dry-run
anonymized/deleted counts remain zero; they are not predictions of successful
future writes. In the fixture, two old people are examined, one is held, and a
real sweep anonymizes only the other. Unmarked produces a refusal because its
declared schema lacks createdAt.
The engine can run a background retention thread. It waits a full heartbeat before the first sweep rather than deleting at startup. This chapter’s execution evidence invokes the real sweep explicitly; it does not wait for or establish a production scheduler cadence. Verify deployment timing, clocks, error reporting, and recovery separately before relying on automatic retention.
45.6 Processing restrictions and rectification
Restriction requests identify the subject and can list restrictedOperations
and allowedOperations (with supported legacy aliases). The engine stores a
subject restriction and generated write paths consult marked subject identifiers
on the existing record. The checked update returns 403 PROCESSING_RESTRICTED,
while get still succeeds; unrestrict removes the gate and a subsequent update
succeeds. A restriction does not make every access path or external integration
consult this table automatically.
Rectification accepts resource, recordId, corrections, and reason and dispatches an internal update while preserving caller context. It is not a direct grant to write any field. The reviewed implementation also does not independently prove that the requested record belongs to the supplied subject identifier; its action name construction uses the supplied resource name without the usual resource normalization. Treat identity and naming as operation-specific gaps, and verify a concrete rectification request before claiming correct subject-bound correction. The current fixtures do not claim rectification end-to-end coverage.
45.7 Consent and operation gates
Each consent purpose contains a purpose string, description, required (default
false), withdrawable (default true), and resources list. Declare
withdrawable: false explicitly for required consent. The native parser accepts
a contradictory required-and-withdrawable purpose; the modeller reports
PRIVACY_CONTRADICTORY_CONSENT. The separate contradictory fixture records that
admission disagreement, while consent.yaml uses a consistent declaration.
Grant records subject, purpose, grantor, and evidence. Withdrawal of a required
purpose returns 409 CONSENT_REQUIRED; a nonwithdrawable purpose returns
409 CONSENT_NOT_WITHDRAWABLE. Optional withdrawal can anonymize subject resources
covered only by that purpose, excluding resources still covered by another granted
purpose. That path inherits the discovery, hold, transformation, and partial-write
limits of erasure; a reported resource list is not proof every row changed.
Generated CRUD paths can gate authenticated callers missing required consent, but only when the resolved caller is already a subject of that domain. Operators without a matching subject record, anonymous callers, and specified internal transports have different treatment. The fixture first creates the subject, then verifies that the subject caller’s get is refused, granting enables get, and required-purpose withdrawal is refused. This does not establish that consent is required before the very first subject record can be created.
Privacy management operations are separately role-gated; granting consent does not confer privacyOfficer authority. Purpose/resource associations and current consent status should be inspected independently of the ordinary resource permission declaration.
45.8 Encryption and current SQL bypasses
Encrypted fields now use the runtime field-security path and configured
AES-256-GCM keys. The checked keyed fixture stores a v2:fixture:... ciphertext
value while ordinary create/get returns Alice. With no configured key, the same
write returns 500 ENCRYPTION_UNAVAILABLE and creates no record. Keys are supplied
through host adl.encryption.keys and adl.encryption.active_key configuration,
not through this chapter’s ADL policy block.
The unsupported domain-level privacy.encryption block is rejected natively with
FIELD_ENCRYPTION_UNAVAILABLE; its diagnostic still includes an obsolete claim
that no cipher is linked. The functioning keyed-field fixture demonstrates why
that message must not be generalized to field encryption. The modeller accepts
the unsupported block, another admission difference.
Privacy access/export use direct database rows, so the checked access response
contains ciphertext instead of the normal decrypted field value. Erasure also
reads that ciphertext directly: its $hash6 transformation hashes the stored
ciphertext and writes the six-character result as plaintext, without field-security
re-encryption. Subsequent ordinary get returns that transformed plaintext. These
paths break a uniform encrypted-field contract and need correction; successful
ordinary encrypted CRUD does not validate privacy operations on the same field.
45.9 Generated interface, restoration, and evidence
Under /api/v1/rights/privacy, the route inventory includes access/export/erase,
rectify, restrict/unrestrict, consent grant/withdraw, legal-hold create/release,
retention sweep, privacy log, and data-map operations. Data map is administrator-only;
the other management handlers use privacyOfficer or administrator checks. Data map
reports configured resource classifications and purposes, not an independent
inventory of all personal data in the installation.
Source-backed registry reconstruction retains the checked privacy model. Export and source-free reconstruction lose domain privacy configuration in this revision. Existing consent, hold, or privacy-log tables alone do not establish that restored handlers still enforce the original policy.
Evidence covers native/parser/modeller boundaries, actual SQLite records, subject and cross-domain discovery, held dry run and partial erasure, manual retention, restrictions, required consent, key-present/key-absent writes, and encrypted-field handling through privacy operations. It does not establish legal sufficiency, all database dialects, relationship-wide discovery, external-store erasure, rectification completeness, backup deletion, or production key rotation.
45.10 Ranked classifications, purposes and prohibited uses (ADL 0.6.0)
Since kalos_adl 0.124.0 (#1562, Aegis phase 4) a classification can say how
its data is handled, a resource can take its classification from a field on
each record, and a resource can say what its records may be used for. The
keys in this section need adl: "0.6.0"; a document that uses one under an
earlier version is refused at submit (ADL_HANDLING_VERSION).
The rules watch the two doors a record leaves by: a resource export, and
an integration operation, called a dispatch here. They do not watch get
or list; who may read a record is permissions (ADL 21) and policies
(ADL 21 §21.12).
45.10.1 Declarations
adl: "0.6.0"
domain:
privacy:
classifications:
public: { rank: 0 }
cui: { rank: 40, exportable: false, regions: [us-gov], propagate: highest }
phi: { rank: 50, exportable: false, logging: metadataOnly, propagate: highest }
resources:
Document:
object:
classification: { type: string, default: public }
privacy: { classificationField: classification }
Contact:
privacy:
purposes:
service: {}
marketing: { requires: "record.marketingConsent == true" }
prohibitedUses: [profiling]
integrations:
govCloud:
region: us-gov
operations:
archive: { source: Document, request: { ... } }
mailer:
operations:
campaign: { source: Contact, purpose: marketing, request: { ... } }
| Key | On | Meaning |
|---|---|---|
rank | a classification | A whole number, 0 to 1000000. Higher is more sensitive. Required on a classification that sets any key below |
exportable | a classification | false: a record of this classification is left out of a resource export. Default true |
regions | a classification | The regions an integration may be in to receive a record of this classification. With regions, only such an integration receives it. Without, any integration does when exportable is true and none does when it is false |
logging | a classification | metadataOnly: history and audit rows for the record keep who, when and which fields, and none of the values. Default full |
propagate | a classification | highest: a record holding a value in a field of this classification is at least this classification (§45.10.2). Default none |
privacy.classificationField | a resource | The field whose value names each record’s classification. The domain must rank at least one classification |
privacy.purposes | a resource | A map of the purposes the records are held for. requires is a policy expression (ADL 21 §21.12) a record must meet to be used for that purpose |
privacy.prohibitedUses | a resource | Purposes refused by name. A name cannot be in both lists |
region | an integration | Where the far end is. Read in a 0.6.0 document only; in an earlier one the key means what it always did (an s3 integration’s region) and has no handling effect |
source | an integration operation | The resource the record sent is one of, for an operation with no trigger. It must equal the trigger’s resource when both are given |
purpose | an integration operation | What the operation uses the record for |
A malformed declaration is refused at submit with ADL_HANDLING_INVALID.
45.10.2 A record’s classification
A record’s classification is the highest-ranked of:
- what its
classificationFieldholds, and - the classification of each of its fields that holds a value and whose
classification is ranked, sets
propagate: highest, and restricts something (exportable: falseorregions).
A classificationField value that is not a declared classification, an empty
one included, is not “unclassified”. The record is treated as classified
and unknown, and is refused at both doors. Give the field a default.
For a dispatch, where the record sent carries an id that is found in the store, the stored classification is used when the record sent names none or a lower-ranked one. A caller cannot lower a classification in the request body.
Propagation stops at records (Owner decision, 2026-11-13). An output that carries a record’s own fields inherits its classification: an export, an integration payload, a history or audit row. Reports, declared queries, analytics and dashboards do not: a count or a sum over classified rows is not classified by these rules.
45.10.3 Purposes
On a resource that declares purposes or prohibitedUses, an export or a
dispatch needs a purpose.
| The request’s purpose | Answer |
|---|---|
| None stated | 403 PURPOSE_REQUIRED |
In prohibitedUses | 403 PURPOSE_PROHIBITED |
Not in purposes (when the resource declares any) | 403 PURPOSE_NOT_PERMITTED |
Allowed, and the purpose has requires | Each record is checked. In an export, a record that does not meet it is left out; in a dispatch, 403 PURPOSE_CONDITION_UNMET |
A purpose never comes from the request body or query string. For a dispatch
it is the operation’s purpose when it declares one. Otherwise it is the
purpose claim of the request, which the policy supervisor fills from trusted
context (docs/kalos-plugins/compliance.md). A triggered dispatch has no
caller, so its operation must declare a purpose.
45.10.4 What is refused, and how
adl writes each rule that applies as a policy and hands it to the policy
supervisor (ADL 21 §21.12), which decides it, records the decision and
refuses. So the supervisor’s modes, its decision log and explain cover
these rules.
| Rule | Door | Error |
|---|---|---|
privacy.exportable | export | CLASSIFICATION_NOT_EXPORTABLE (the row is left out) |
privacy.destination | dispatch | 403 CLASSIFICATION_DESTINATION_REFUSED |
privacy.purposeStated, privacy.prohibitedUse, privacy.purposePermitted | both | The three purpose errors above |
privacy.purpose.<name> | both | PURPOSE_CONDITION_UNMET |
- With no supervisor loaded, an export or a dispatch of a resource these rules
cover answers
503 POLICY_SUPERVISOR_MISSING. - A dispatch that sends a record and whose operation names neither a trigger
resource nor a
source, in a domain where some resource has handling rules, answers403 CLASSIFICATION_SOURCE_UNKNOWN. - A dry run (
dryRun: true) is refused as the dispatch would be. - A triggered dispatch that is refused is not sent, is not retried, is not
dead-lettered, and runs neither
onSuccessnoronError. The refusal is in the decision log and the server log.
45.10.5 Not covered
get,list, includes, custom operations, relationship sub-routes, views, reports, dashboards, declared queries and analytics.- Subject access and export under
/privacy(§45.3), notifications, templates and document generation, and the AI plugin’s own dispatch, which is not given records by a domain. - Webhooks received (inbound).
logging: metadataOnlyfollows theclassificationFieldonly, not a field’s classification, and does not reach the change log, the rules log, the server log or the policy decision log.- An export’s refused rows are dropped after they are read. Their count is not reported.
- The classification a caller pastes into a dispatch with no id cannot be checked against the store.
Checks: bash tools/repro/aegis/flagship.sh (scenarios 2 and 8) and
python3 tools/repro/aegis/handling.py.