# Pryv compliance matrix > Maps 15 regulations and standards (GDPR, HIPAA, Swiss nLPD, CCPA, PIPEDA, DiGA, MDR, HDS, ISO 27001, ISO 27701, ISO 13485, SOC 2 and more) requirement by requirement onto what Pryv, the platform built from open-pryv.io, implements, makes configurable, facilitates or documents, and what stays with the implementer. 439 requirements, each backed by evidence (tests, docs, configuration keys). Use it to answer questions such as "does Pryv support GDPR Art. 17 erasure?" or "what is left for me to do for HIPAA 164.312(b)?". Start from the scope file, then follow its evidence links. This matrix describes the software's contribution to compliance. It is not legal advice and not a certification: implementer organisations remain responsible for their own GDPR, HIPAA, ISO, MDR or HDS posture. Rows marked draft are authored but not yet reviewed. ## How to read a requirement Coverage (what Pryv does for the implementer): - `implemented`: Pryv ships the control out of the box; it works with no configuration. - `configurable`: Pryv provides the control once the operator sets the configuration keys cited on the requirement. - `facilitated`: Pryv reduces the work; the implementer still does part of it (see the facilitation mode). - `documented`: Guidance only: the implementer does the work, following the cited documentation. - `out-of-scope`: No software contribution from Pryv; the obligation, if any, stays with the implementer. Effort saved (how much of the work Pryv carries): - `high`: Pryv carries most of the engineering and operational work. - `medium`: The work is roughly shared between Pryv and the implementer. - `low`: Pryv contributes a small technical substrate; most of the work is the implementer's. Facilitation mode (the kind of help, mostly on `facilitated` rows): - `primitive`: Pryv's permissions, access versioning or system streams technically enforce the obligation; the implementer chooses the stream layout and permission scope. - `evidence`: Pryv generates structured data (audit log, access version chain, event history) that the implementer uses as proof in an artefact they produce. - `storage`: Pryv durably stores artefacts the implementer creates (notice text, consent records, policies) and makes them recoverable per subject and per time. - `infrastructure`: Pryv runs the technical layer the obligation depends on (TLS, encryption at rest, high availability, data residency, backup and restore). - `awareness`: Pryv has minimal direct contribution; the row reminds the implementer of the obligation. Evidence: test codes resolve at https://pryv.github.io/tests/#, functional specs at https://pryv.github.io/functional-specifications/ and docs paths at https://pryv.github.io//. ## California Consumer Privacy Act (as amended by CPRA) (CCPA / CPRA) - Scope id: `ccpa` (regulation) - Jurisdiction: US, California (extraterritorial via business-nexus thresholds) - Version: Cal. Civ. Code §§ 1798.100 - 1798.199.100 (CPRA amendments operative) (2023-01-01) - Official text: https://leginfo.legislature.ca.gov/faces/codes_displayText.xhtml?division=3.&part=4.&lawCode=CIV&title=1.81.5 - Requirements: 18 (3 implemented, 3 configurable, 9 facilitated, 3 out-of-scope) - Browse: https://pryv.github.io/compliance-matrix/#/scope/ccpa ### CCPA / CPRA 1798.100: Right to know what personal information is collected Coverage: implemented · effort saved: high · draft Requirement: Consumer has the right to request that a business that collects personal information about the consumer disclose the categories, sources, business / commercial purposes, and specific pieces collected. **What Pryv does for you** Same Pryv mechanism as GDPR Art. 15: the consumer holding a personal token reads events, streams, accesses, audit data via the standard API. Categories + sources are encoded in the event class/format (data-types) and event.clientData.source. Business / commercial purpose is encoded in `access.clientData.purpose` per access. **Evidence** - tests: AA01, EGSQ, UZEV - specs: EVENT.BASE, STREAM.BASE - derives from: gdpr.Art.15 - primitives: access, stream, event, audit, data-types ### CCPA / CPRA 1798.105: Right to delete personal information Coverage: configurable · effort saved: medium · draft Requirement: Consumer has the right to request deletion of personal information collected from the consumer; with statutory exceptions (Section 1798.105(d)). **What Pryv does for you** Same primitive as GDPR Art. 17: `system.users.delete` is the per-consumer erasure call. Backup-completeness of the deletion depends on the chosen storage engine (SQLite per-user file vs PG row deletion), same notes as gdpr.Art.17 apply. Since open-pryv.io 2.0.0-rc.58 the deletion also releases the consumer's external ids (links to third-party record ids) at once, on the home core and in the platform index `[XIDD2]`. The §1798.105(d) statutory exceptions (warranty, security, legal compliance, etc.) are your programmatic determination; if an exception applies you suppress the deletion and document why. **Detail** Account auto-deletion, since open-pryv.io 2.0.0-rc.66 (`8521c8d5`, see gdpr.Art.17): the consumer can schedule the deletion of their own account, at a date or after a period without use, from the reference account app, where your `user-account.delete` lets them delete it directly (`[ACST10]`; arming needs the password, `[ACST3]`); reminders precede it (`[ACRM1]`) and the deletion is the same as `system.users.delete`, guards included (`[ADSW8]`). It has no hook for a §1798.105(d) exception: if one applies to a consumer whose deletion is scheduled, that is still your determination, made before the deadline (for example by turning the feature off on the core with `account.autoDeletion.enabled: false`, or by your own process outside it). **Evidence** - tests: USAD, XIDD2, ACST3, ACST10, ADSW8, ACRM1 - docs: customer-resources/account-auto-deletion.md - config keys: storages.userAccountStorage.engine, user-account.delete, account.autoDeletion.enabled - derives from: gdpr.Art.17 - primitives: event, stream, backup-restore, external-id-index, account-auto-deletion ### CCPA / CPRA 1798.106: Right to correct inaccurate personal information Coverage: implemented · effort saved: high · draft Requirement: Consumer has the right to request that a business correct inaccurate personal information. **What Pryv does for you** `events.update` is the correction primitive, and the audit log records who corrected which event and when. The prior (inaccurate) value is kept for traceability only if your deployment sets `versioning.forceKeepHistory: true` (off by default; see `context/event-history.md`). The §1798.106 process (consumer request → reasonable efforts → action) is yours to run; the technical correction is shipped, and keeping the history is your configuration choice. **Evidence** - tests: PTU1 - specs: EVENT.BASE - derives from: gdpr.Art.16 - primitives: event - context notes: event-history ### CCPA / CPRA 1798.110: Right to know, categories and specific pieces Coverage: implemented · effort saved: high · draft Requirement: Consumer has the right to request specific categories of personal information and the specific pieces of personal information the business has collected about the consumer. **What Pryv does for you** Categories surface from the canonical event-type schemas (`event.type` = `/`); specific pieces are the events themselves. A consumer-portal app wrapping `events.get`+`streams.get` delivers both in one response. **Evidence** - tests: EGSQ, UZEV - specs: EVENT.BASE, STREAM.BASE - derives from: gdpr.Art.15 - primitives: event, stream, data-types, account-backup-tool ### CCPA / CPRA 1798.115: Right to know about sale or sharing Coverage: facilitated · effort saved: medium · mode: storage · draft Requirement: Consumer has the right to know whether personal information was sold or shared, the categories sold or shared, and the categories of third parties to whom it was sold or shared. **What Pryv does for you** Every "sale" or "sharing" you do, in CCPA's broad sense, which includes cross-context behavioural advertising, happens through a Pryv access granted to the recipient. The access's `clientData` can carry the §1798.115 classification (sale vs share, category of third party); audit records anchor the transaction in time. What's not the software's job: deciding when a use qualifies as "sale" or "sharing" under the CCPA definition (Civ. Code §1798.140(ad) +(ah)), that's a contractual / classification decision you record on the access. **Detail** Pattern: when minting an access for a counterparty: `access.clientData = {` ` type: "share", // or "sale", per §1798.140` ` third_party_category: "ad_partner",` ` contract_id: "..."` `}` The consumer-side §1798.115 response then queries `accesses.get ?includeHistory=true` filtered on `clientData.type ∈ {sale, share}` and surfaces the third-party categories. **Evidence** - primitives: access, clientData, audit, CMC ### CCPA / CPRA 1798.120: Right to opt out of sale or sharing Coverage: configurable · effort saved: medium · draft Requirement: Consumer has the right, at any time, to direct a business that sells or shares personal information about the consumer to third parties not to do so. **What Pryv does for you** Opt-out is implemented by revoking or narrowing the access powering the sale/share, `accesses.delete` for full opt-out, `accesses.update` for narrowing, both versioned and audit- anchored. A `consent/opt-out-sale-cmc` event (or custom `optout/*` event) gives the consumer-side artefact alongside the technical effect. **Detail** Honoring Global Privacy Control signals (which CPPA regulations require treating as a §1798.120 opt-out request) is your application-layer responsibility, detect the GPC header on the consumer's browser session and trigger the access revoke flow automatically. Pryv has no opinion on the signal source. **Evidence** - tests: AA02, ACCP - config keys: access.permissions - derives from: gdpr.Art.21 - primitives: access, permissions, clientData, audit ### CCPA / CPRA 1798.121: Right to limit use of sensitive personal information Coverage: configurable · effort saved: medium · draft Requirement: Consumer has the right to direct a business that collects sensitive personal information to limit its use to what is necessary to perform the services or provide the goods reasonably expected (with statutory exceptions in CPPA regulations). **What Pryv does for you** The limit-use directive is operationalized by narrowing the relevant accesses' `permissions[]` to the minimum-necessary streams. The "reasonably expected use" classification is your programmatic decision; the technical control is the access mutation. Sensitive personal information (per §1798.140(ae)) can be segregated onto designated streams up front so the narrowing operation is a known-shape transformation. **Evidence** - tests: AA02, ACCP - config keys: access.permissions - derives from: gdpr.Art.18 - primitives: access, permissions, stream ### CCPA / CPRA 1798.125: Non-discrimination Coverage: out-of-scope · draft Requirement: Business shall not discriminate against a consumer because the consumer exercised any rights under CCPA. **What Pryv does for you** Non-discrimination is a business-policy commitment, pricing, service levels, marketing eligibility, not a software control. Pryv has no role in pricing or product gating; if your app enforces tier-based feature access, the non-discrimination analysis happens at your app's pricing-policy layer. ### CCPA / CPRA 1798.130: Notice and response procedures Coverage: facilitated · effort saved: medium · mode: storage · draft Requirement: Business must provide notice of categories of PI collected, purposes, sources; respond to verifiable consumer requests within 45 days (one extension permitted, 90 day total max). **What Pryv does for you** Notice text lives on `access.clientData.privacy_notice` or on a dedicated `consent/notice` event, preserved per consumer per time, recoverable later. The 45-day response window is your operational target. Pryv's read APIs respond in milliseconds, so the rate-limit on the response is your fulfilment workflow, not a software latency. **Evidence** - derives from: gdpr.Art.12 - primitives: access, clientData, app-web-auth3, event ### CCPA / CPRA 1798.135: Methods for opt-out Coverage: facilitated · effort saved: low · mode: awareness · draft Requirement: Business must provide a clear "Do Not Sell or Share My Personal Information" link / mechanism; CPRA additionally requires honoring opt-out preference signals (Global Privacy Control). **What Pryv does for you** The opt-out UI surface is your app, a CCPA-required link or an automated GPC-signal handler. When the opt-out is exercised, the Pryv mechanism is the access revoke / narrow flow from §1798.120. Implementer's job: detect the opt-out, call the Pryv revoke flow, surface confirmation. **Evidence** - primitives: access, clientData ### CCPA / CPRA 1798.140: Definitions Coverage: facilitated · effort saved: medium · mode: awareness · draft Requirement: Defines key terms including "personal information", "sensitive personal information", "sale", "sharing", "service provider", "third party". **What Pryv does for you** Pryv primitives map cleanly to most CCPA-defined terms (event = personal-information storage; access + permissions = the consent / authorization layer; CMC = sharing across distinct operators). The §1798.140(ae) sensitive-personal-information category drives stream layout (segregate sensitive categories onto designated subtrees for clean §1798.121 limit-use operation). **Detail** Service-provider vs third-party (§1798.140(ag) vs (ai)) classification is contractual, record it on the access's `clientData.role` so the consumer-side §1798.115 response surfaces the right category. **Evidence** - primitives: event, stream, access, clientData, CMC ### CCPA / CPRA 1798.150: Civil action for breach Coverage: facilitated · effort saved: medium · mode: infrastructure · draft Requirement: Consumer whose nonencrypted and nonredacted personal information is subject to an unauthorized access, exfiltration, theft, or disclosure as a result of failure to maintain reasonable security may bring a civil action for statutory damages ($100-$750 per consumer per incident or actual damages). **What Pryv does for you** Two contributions: (1) TLS-in-transit + operator-side at-rest encryption move ePHI / personal-information out of the "nonencrypted and nonredacted" trigger zone for §1798.150; (2) audit + access-version data are the technical evidence layer when defending a "reasonable security" claim. The "reasonable security" determination remains a fact-specific legal question; Pryv provides the substrate. **Detail** The §1798.150 trigger is narrow, encrypted-and-redacted PI that leaks doesn't ground a statutory-damages claim. Pryv's posture (TLS in the core or at your proxy, as you configure it + operator-side at-rest encryption + per- access access-control + audit) substantially constrains the surface where §1798.150 can attach. Encryption-at-rest is operator-side (LUKS, PG TDE, etc.) for event content today; Pryv-managed at-rest encryption covers platform secrets. **Evidence** - primitives: letsEncrypt-integration, encryption-at-rest-secrets, audit, access **Planned changes** - feature: End-to-end encryption narrows the §1798.150 nonencrypted-PI trigger zone further ### CCPA / CPRA 1798.81.5: Reasonable security procedures (Cal. Civ. Code §1798.81.5) Coverage: facilitated · effort saved: high · mode: infrastructure · draft Requirement: Business that owns, licenses, or maintains personal information about a California resident shall implement and maintain reasonable security procedures and practices appropriate to the nature of the information, to protect the information from unauthorized access, destruction, use, modification, or disclosure. **What Pryv does for you** Statute predates CCPA but provides the "reasonable security" basis the §1798.150 civil action attaches to. Pryv's multi-aspect technical baseline (TLS, mTLS, at-rest secrets, audit, MFA, backup-restore, permissions) constitutes the software-layer "reasonable security" inventory. The organizational-side reasonable-security programme is the operator's. **Evidence** - derives from: ccpa.1798.150, gdpr.Art.32 - primitives: access, permissions, audit, letsEncrypt-integration, encryption-at-rest-secrets, MFA, backup-restore ### CCPA / CPRA 1798.130(a)(5): Notice, content elements Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: Privacy-policy notice must include categories of PI collected, categories of sources, business / commercial purposes, categories of third parties with whom PI is shared, sale / sharing practices, and consumer rights. **What Pryv does for you** Notice content is editorial. Pryv preserves the notice text per individual consumer (on `account.clientData.privacy_notice` or a dedicated event), so the precise wording shown at the moment a particular consumer first interacted is recoverable later. Drafting the wording remains the implementer's editorial work. **Evidence** - derives from: ccpa.1798.130 - primitives: access, clientData ### CCPA / CPRA 1798.135(a): Methods for opt-out, Do Not Sell / Share + Limit Use links Coverage: out-of-scope · draft Requirement: Business that sells or shares PI shall provide a clear and conspicuous link titled "Do Not Sell or Share My Personal Information" on its homepage. Business that uses sensitive PI for purposes beyond those listed in §1798.121(a) shall provide an additional link titled "Limit the Use of My Sensitive Personal Information". **What Pryv does for you** The UI link is part of the implementer's homepage; Pryv is the backend the link's handler talks to (revoke / narrow the relevant access). Surface itself is app-layer. **Evidence** - derives from: ccpa.1798.135, ccpa.1798.120 ### CCPA / CPRA 1798.140(ad): Definition, "Sale" Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: "Sale" / "Sell" includes selling, renting, releasing, disclosing, disseminating, making available, transferring, or otherwise communicating orally, in writing, or by electronic / other means, a consumer's personal information by the business to another business or a third party for monetary or other valuable consideration. **What Pryv does for you** Whether a given access constitutes a "sale" under §1798.140(ad) is a classification the implementer applies + records on the access's `clientData.type = "sale"`. The consideration test (monetary or valuable) is fact-specific and editorial; Pryv preserves whatever classification you record. **Evidence** - derives from: ccpa.1798.140 - primitives: access, clientData ### CCPA / CPRA 1798.140(ae): Definition, "Sensitive personal information" Coverage: facilitated · effort saved: medium · mode: primitive · draft Requirement: Enumerated categories: SSN, drivers license, account log-in with password, precise geolocation, racial / ethnic origin, religious / philosophical beliefs, union membership, contents of mail / email / text messages not directed at the business, genetic data, biometric identifier, health, sex life or sexual orientation. **What Pryv does for you** Sensitive-PI enumeration drives stream-layout design, dedicate subtrees per sensitive category (`sensitive/health/`, `sensitive/precise-location/`, etc.) for clean §1798.121 limit-use enforcement. The classification of whether a specific event qualifies as sensitive PI is editorial. An alias-only deployment pattern is now available: issue accesses with `randomAlias:true` so counterparties hold a routable `r-XXXXXXXX` alias instead of a linkable username, keeping linkable identifiers off the sensitive-PI access path. Since open-pryv.io 2.0.0-rc.69 the token is accepted under its alias only, so a counterparty that suspects the username cannot confirm it with the token; earlier releases accepted the token under every name of the account. **Evidence** - derives from: ccpa.1798.121, gdpr.Art.9 - primitives: stream, system-streams, event, randomAlias ### CCPA / CPRA 1798.155: Enforcement Coverage: out-of-scope · draft Requirement: California Privacy Protection Agency (CPPA) + California Attorney General may bring civil actions for CCPA violations; statutory penalties up to $2,500 per violation ($7,500 for intentional violations + violations involving minors). **What Pryv does for you** Enforcement is regulator-side. No software role; Pryv's audit log + access-version chain are the evidence pack the implementer surfaces in response to inquiries. ## Data Governance (DAMA-DMBOK knowledge areas) (Data Governance) - Scope id: `data-governance` (discipline) - Jurisdiction: International (framework) - Version: DAMA-DMBOK 2 (framing) + ISO/IEC 38505-1 (2017-07-01) - Official text: https://www.dama.org/cpages/body-of-knowledge - Requirements: 11 (5 facilitated, 6 out-of-scope) - Browse: https://pryv.github.io/compliance-matrix/#/scope/data-governance ### Data Governance DG-01: Data Governance (framework / accountability) Coverage: facilitated · effort saved: medium · mode: primitive · draft **What Pryv does for you** Pryv gives you the governance substrate, every datum is owned by a user (per-user storage isolation), every privileged action is auditable, and cross-organization sharing is consent-managed (CMC). What Pryv does NOT give you is the governance *program*: the policies, stewardship roles, decision rights and oversight cadence. Those are organizational, start from the QMS templates and the ISO/IEC 38505 Evaluate-Direct- Monitor model. **Detail** ISO/IEC 38505-1 frames governance as accountability for the value, risk and constraints of data. Pryv's primitives map to the "constraints" pillar (ownership, access, audit); value and risk decisions remain the governing body's. The matrix itself is a governance artefact, it makes "which control covers which obligation" mechanical. **Evidence** - qms: qms/pryv/01-policies/quality-policy.md, qms/pryv/01-policies/information-security-policy.md - primitives: access, audit, CMC, system-streams ### Data Governance DG-04: Data Storage & Operations Coverage: facilitated · effort saved: medium · mode: infrastructure · draft **What Pryv does for you** Pryv stores each user's data in isolation, lets you choose the storage engine (PostgreSQL or SQLite) and keep data in-region per core (residency), and ships backup/restore primitives. Capacity planning, SLAs, monitoring and the operational runbook are yours (see the QMS backup-and-recovery + change procedures). **Evidence** - primitives: data-residency, backup-restore ### Data Governance DG-05: Data Security Coverage: facilitated · effort saved: high · mode: primitive · draft **What Pryv does for you** This is Pryv's strongest data-governance contribution: scoped accesses, per-stream permissions, privileged-data separation via system streams, and an audit trail are the enforcement primitives. You still own the classification-to-control policy (which streams are sensitive, who may hold which access), Pryv enforces the decisions you encode. **Detail** Cross-references the regulation scopes: the same primitives back gdpr.Art.32, iso-27001 Annex A.5/A.8 access-control rows, and hipaa-security technical safeguards. Use those rows for the requirement-level evidence. **Evidence** - qms: qms/pryv/01-policies/information-security-policy.md - primitives: access, permissions, system-streams, audit ### Data Governance DG-06: Data Integration & Interoperability Coverage: facilitated · effort saved: medium · mode: primitive · draft **What Pryv does for you** Pryv moves data between parties through consented channels, CMC for controller-to-controller sharing with a consent record, webhooks for event propagation, and a shared event-type catalogue (data-types) for semantic interoperability. Pipeline orchestration, transformation governance and data-contract management remain yours. **Evidence** - primitives: CMC, webhooks, data-types ### Data Governance DG-10: Metadata Management Coverage: facilitated · effort saved: medium · mode: storage · draft **What Pryv does for you** Streams classify data into a navigable hierarchy, clientData carries business metadata alongside each access/event, and the data-types catalogue is a schema registry for event formats. The metadata *management process* (curation, ownership, glossary upkeep) is yours. **Evidence** - primitives: stream, clientData, data-types ### Data Governance DG-02: Data Architecture Coverage: out-of-scope · draft **What Pryv does for you** Enterprise data architecture (target-state models, data-flow design across systems) is the operator's. Pryv is one component within it; its per-core residency topology is described under DG-04, not here. ### Data Governance DG-03: Data Modeling & Design Coverage: out-of-scope · draft **What Pryv does for you** Logical/physical data modelling is an operator design activity. Pryv's event/stream model is fixed substrate, not a modelling tool. ### Data Governance DG-07: Document & Content Management Coverage: out-of-scope · draft **What Pryv does for you** Pryv stores events and attachments, not a document-management system (records lifecycle, content workflow, e-discovery). Out of software scope here. ### Data Governance DG-08: Reference & Master Data Management Coverage: out-of-scope · draft **What Pryv does for you** MDM (golden records, match/merge, reference-data distribution) is an operator capability layered above Pryv, not provided by it. ### Data Governance DG-09: Data Warehousing & Business Intelligence Coverage: out-of-scope · draft **What Pryv does for you** Analytics warehousing and BI are downstream of Pryv; the operator builds them from exported/streamed data. ### Data Governance DG-11: Data Quality Coverage: out-of-scope · draft **What Pryv does for you** Typed events (data-types) give light structural validation, but a data- quality program (profiling, rules, remediation, scorecards) is the operator's. Recorded as out-of-scope rather than overclaiming. ## Digital Healthcare Act (DVG) + DiGA Ordinance (DiGAV) (DiGA) - Scope id: `diga` (regulation) - Jurisdiction: Germany - Version: DiGAV (Digitale-Gesundheitsanwendungen-Verordnung), current consolidated text (2020-04-21) - Official text: https://www.gesetze-im-internet.de/digav/index.html - Layered on: gdpr, mdr - Requirements: 24 (4 implemented, 1 configurable, 13 facilitated, 6 out-of-scope) - Browse: https://pryv.github.io/compliance-matrix/#/scope/diga ### DiGA 4: § 4 Data protection and information security Coverage: facilitated · effort saved: high · mode: infrastructure · draft Requirement: The digital health application must demonstrate compliance with requirements on data protection (per GDPR + Bundesdatenschutzgesetz) and information security (per current state of the art, including BSI guidelines). **What Pryv does for you** The data-protection half of § 4 derives directly from the GDPR coverage already authored (see GDPR Art. 5, Art. 25 by-design, Art. 32 security of processing). The information-security half aligns with the BSI TR-03161 + BSI C5 baseline; Pryv's primitives (TLS-default + AES-256-GCM secrets at rest + audit by default + multi-core mTLS + MFA + data-residency) carry most of the manufacturer's "state of the art" claim without additional software work. **Detail** For BfArM review, expect to provide: - Data-protection concept (Datenschutzkonzept), reuse the GDPR rows from this matrix as evidence per concept item. - Information-security concept (BSI TR-03161-aligned), Pryv's Annex 1 row mappings (below) feed this. - Penetration test certificate within 1 year of submission for the backend (Pryv) + app sides. Required at listing. **Evidence** - derives from: gdpr.Art.5, gdpr.Art.25, gdpr.Art.32 - primitives: access, permissions, audit, letsEncrypt-integration, encryption-at-rest-secrets, MFA, data-residency, system-streams, backup-restore ### DiGA 5: § 5 Interoperability Coverage: facilitated · effort saved: low · mode: infrastructure · draft Requirement: The digital health application must support interoperable data exchange with other systems, in particular electronic patient records (ePA / TI), based on the semantic and technical standards named in the BfArM interoperability annex. **What Pryv does for you** Pryv's data-types schemas (canonical `class/format` JSON Schema) give you a stable in-platform data model that you can map to FHIR R4 (the standard BfArM expects). The FHIR-mapping layer is app-side or implemented as a Pryv data-type extension, not shipped today. See `proposals/fhir-data-type-mapping.md` if filed, or treat as a per-app integration concern. **Detail** BfArM lists specific HL7 FHIR profiles (KBV / gematik) the device must consume / produce for ePA interoperability. Pryv's event + stream model is structurally adequate (events carry typed content; streams provide hierarchical categorization) but the mapping is an app-layer transformation today. **Evidence** - primitives: event, data-types, stream ### DiGA 6: § 6 Robustness Coverage: facilitated · effort saved: medium · mode: infrastructure · draft Requirement: The digital health application must be robust against failure, interruption and manipulation, with appropriate processes to address security incidents. **What Pryv does for you** Pryv contributes the operational baseline: multi-core HA with Raft replication; cluster-CA mTLS between cores; encrypted bootstrap bundles; daily-renewed TLS certs; backup + restore; audit-log for forensic review. The manufacturer's incident-response procedure (detection, escalation, communication) sits on top of this and is the regulatory artefact BfArM reviews. **Evidence** - primitives: multi-core-mTLS, backup-restore, audit, observability-provider, letsEncrypt-integration ### DiGA 7: § 7 Consumer protection Coverage: facilitated · effort saved: medium · mode: storage · draft Requirement: Information must be provided to users in a manner that is comprehensible to laypersons; pricing, intended use, contra- indications, supported devices + operating systems, data categories collected, and other minimum elements must be disclosed in advance. **What Pryv does for you** Same artefact set as GDPR Art. 13 (notice at collection): Pryv stores the text shown to the user, durably, versioned, per subject, typically on `access.clientData.privacy_notice` or in a `consent/notice` event. Drafting the actual text in "lay-comprehensible" language is the manufacturer's editorial work, not Pryv's. **Evidence** - derives from: gdpr.Art.13 - primitives: access, clientData, app-web-auth3, event ### DiGA 8: § 8 Patient safety Coverage: out-of-scope · draft Requirement: The digital health application must, in its intended use, not pose unacceptable risks to patient safety. Medical-device classification + conformity assessment per MDR remain the manufacturer's process. **What Pryv does for you** Patient-safety classification is the manufacturer's regulatory task per MDR; Pryv has no software role at this layer. Derives_from points at the MDR Art. 51 (classification) + Art. 52 (conformity) rows where Pryv is similarly out-of-scope. **Evidence** - derives from: mdr.Art.51, mdr.Art.52 ### DiGA 14: § 14 Positive supply effects (Nutzennachweis) Coverage: out-of-scope · draft Requirement: The manufacturer must demonstrate positive supply effects, medical benefit and/or patient-relevant structural and procedural improvements, through a comparative study (typically RCT) or, under specified conditions, real-world evidence. **What Pryv does for you** Clinical evidence is the manufacturer's regulatory work. Pryv is not in scope at the trial design / statistical analysis layer. For the data-collection substrate during the study, Pryv events + audit log are an option, but the regulatory burden of § 14 sits entirely on the manufacturer's clinical team. ### DiGA A1.1.1: Annex 1.1, Data protection, legal basis declared per processing Coverage: facilitated · effort saved: medium · mode: storage · draft Requirement: For each processing purpose, the manufacturer must declare the Art. 6 + (if applicable) Art. 9 GDPR legal basis used. **What Pryv does for you** Pryv pattern: `access.clientData.legal_basis` captures the Art. 6 basis per access; for sensitive data, `clientData.special_category_basis` captures the Art. 9 paragraph. Both travel with the access into the audit log so the declaration is auditable per processing instance, not just per system. **Evidence** - derives from: gdpr.Art.6, gdpr.Art.9 - primitives: access, clientData ### DiGA A1.1.7: Annex 1.1, Data minimisation Coverage: implemented · effort saved: high · draft Requirement: Only data necessary for the intended use shall be processed; data must be deleted as soon as the purpose is fulfilled. **What Pryv does for you** Per-stream permissions are the technical minimisation primitive: each access carries only the streams + levels needed; the holder cannot see more than granted. Deletion-when-purpose-fulfilled is the manufacturer's retention policy, executed via `system.users.delete` (full erasure) or event/stream-level deletion (partial). **Evidence** - tests: AA01, ACCP - derives from: gdpr.Art.5 - primitives: permissions, stream ### DiGA A1.2.1: Annex 1.2, Information security, TLS at all interfaces Coverage: configurable · effort saved: medium · draft Requirement: All communication interfaces of the digital health application shall employ Transport Layer Security at current state of the art. **What Pryv does for you** TLS is configured, not default: the core terminates it when `http.ssl.*` is set (the built-in ACME integration issues, renews and replicates certificates across the cluster when `letsEncrypt.enabled` is set), otherwise it serves plain HTTP and your reverse proxy terminates TLS. Inter-core Raft traffic runs over mTLS with a cluster-private CA once `bin/bootstrap.js` has written `storages.engines.rqlite.tls` (default plain TCP). The core sets no TLS version or cipher options of its own, so "current state of the art" in the core rests on Node.js defaults (on the Node 24 the image runs: TLS 1.2 floor, TLS 1.3 when the client supports it); if BfArM expects a TLS 1.3-only or narrower cipher policy, enforce it at your proxy. **Evidence** - tests: ACMEINT, ACMEORCH, CERTUTILS, FORCERENEWIPC - config keys: http.ssl.keyFile, http.ssl.certFile, letsEncrypt.enabled, storages.engines.rqlite.tls - derives from: gdpr.Art.32 - primitives: letsEncrypt-integration, multi-core-mTLS ### DiGA A1.2.7: Annex 1.2, Penetration test within 12 months Coverage: facilitated · effort saved: low · mode: infrastructure · draft Requirement: A penetration test performed by an independent third party within 12 months before listing application is required; findings of "critical" severity must be remediated; "high" findings must have a mitigation plan. **What Pryv does for you** Pryv supports the manufacturer's pentest by providing a reproducible deployment artefact (Docker image), a structured audit log for verification, and documentation of the security surface. The test commissioning + remediation cycle is the manufacturer's. For repeat customers, Pryv-side findings already remediated upstream reduce repeat test scope. **Detail** The 2026 code-level security review of open-pryv.io (fixes in 2.0.0-rc.40 to 2.0.0-rc.51; public report `SECURITY-AUDIT.md`, published 2026-10-14, https://github.com/pryv/open-pryv.io/blob/master/SECURITY-AUDIT.md; `context/code-security-review-2026.md`) does **not** satisfy this requirement: it was performed by the maintainers of the code, not by an independent third party, and it reviewed source code, not your running application. It helps your penetration test: run a release that carries the fixes before the test, and hand the tester the report and release notes so known, fixed platform findings are not re-reported against your listing. **Evidence** - primitives: audit - context notes: code-security-review-2026 ### DiGA A1.3.1: Annex 1.3, Interoperability, FHIR R4 export of treatment-relevant data Coverage: facilitated · effort saved: low · mode: infrastructure · draft Requirement: The digital health application must export treatment-relevant data using HL7 FHIR R4 profiles approved in the BfArM interoperability annex. **What Pryv does for you** Same status as § 5: Pryv's event model is structurally adequate; the FHIR-mapping transformation is app-side today. A "compliance-matrix/proposals/fhir-data-type-mapping.md" entry tracks the potential Pryv-side mapping primitive for cleaner downstream coverage. **Detail** The implementer's natural extension path is a **FHIR-flavoured custom event-type catalogue**, a sibling data-model repo that defines Pryv event types mapping 1-to-1 (or 1-to-many) to BfArM-approved FHIR resources, published via the standard `service.eventTypes` extension model (see `context/custom-event-type-catalogues.md`). The mapping transformation (Pryv event ↔ FHIR Bundle) still runs app-side, but the schemas being mapped are first-class Pryv types validated by the same z-schema pipeline as the legacy catalogue. **Evidence** - derives from: diga.5 - primitives: event, data-types, stream - context notes: custom-event-type-catalogues ### DiGA A1.6.1: Annex 1.6, Patient safety, usability tested with target group Coverage: out-of-scope · draft Requirement: Usability of the digital health application shall be tested against the intended user group prior to listing application; results documented. **What Pryv does for you** Usability testing is the manufacturer's process (UX research + protocols + documentation). Pryv has no software role at the usability layer. ### DiGA A1.1.5: Annex 1.1, Data subject rights at the BfArM-specified level Coverage: implemented · effort saved: high · draft Requirement: Mechanisms must be provided to allow data subjects to exercise their rights under GDPR Art. 15-22 directly within the digital health application or via a clearly named contact. **What Pryv does for you** The personal-token Pryv API gives the data subject direct access to events, streams, accesses, audit data. Implementer wraps it in a UI section ("Your data + your rights") inside the DiGA app; no separate portal needed. Each GDPR Art. 15-22 right has a single API call behind it. **Evidence** - tests: AA01, EGSQ, UZEV, PTU1, USAD - derives from: gdpr.Art.15, gdpr.Art.16, gdpr.Art.17, gdpr.Art.20 - primitives: access, event, stream, audit ### DiGA A1.2.4: Annex 1.2, Authentication of users and devices Coverage: implemented · effort saved: high · draft Requirement: Strong authentication of users (and where applicable devices) must be implemented; passwords alone are not sufficient when sensitive health data is processed. **What Pryv does for you** MFA via the `mfa.*` API methods (live by default since open-pryv.io 2.0.0-rc.14 with authenticator-app TOTP, `services.mfa.active`; the legacy `services.mfa.mode` is still honoured); failed second factors hit a per-account backoff, not a lockout, since 2.0.0-rc.27 (see HIPAA §164.312(d)); personal-token + access-token model gives separation of user identity from app identity. The BfArM "strong authentication where sensitive health data is processed" bar maps to MFA on by default for DiGA-listed apps. **Evidence** - tests: MA15A, MA15C, MA10A, MA11A, MA3A, MA12A - config keys: services.mfa.mode - derives from: hipaa-security.164.312(d), iso-27001.A.8.5 - primitives: access, MFA, system-streams **Planned changes** - enhancement: Reference WebAuthn plugin meets the BfArM 'strong authentication for sensitive health data' bar without SMS-OTP weakness ### DiGA A1.2.10: Annex 1.2, Logging of security-relevant events Coverage: implemented · effort saved: high · draft Requirement: Security-relevant events must be logged with sufficient detail to support incident investigation and audit; logs must be protected against tampering. **What Pryv does for you** Per-user audit log records every API method invocation; storage is SQLite directly (decoupled from data-path engine) so log integrity is independent of primary engine state. The audit-event-stream optional channel additionally emits audit records into the subject's own streams when surface-side visibility is required. **Evidence** - tests: AT01, AT02, AT51, AT61, AT65 - derives from: iso-27001.A.8.15, hipaa-security.164.312(b) - primitives: audit, audit-event-stream ### DiGA A1.3.6: Annex 1.3, Use of established healthcare data standards Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: Where established standards exist for the data domain (FHIR R4, LOINC, SNOMED CT, ICD-10, etc.), the application shall use them to encode treatment-relevant data. **What Pryv does for you** Pryv stores whatever event content the application writes. For LOINC / SNOMED / ICD-10 codings, the implementer encodes the code system + value as event content fields (typically `event.content.code` + `event.content.codeSystem`) per the `data-types` schema chosen. The semantic-standard choice is app-side; Pryv preserves it. **Evidence** - primitives: event, data-types, stream ### DiGA A1.4.3: Annex 1.4, Availability and continuity Coverage: facilitated · effort saved: medium · mode: infrastructure · draft Requirement: The digital health application must be designed to be available to users during its specified use periods, with documented procedures for handling unavailability. **What Pryv does for you** Pryv-side availability: multi-core HA (cluster topology + Raft replication); TLS auto-renewal preventing cert-expiry outages; backup-restore for catastrophic recovery; observability gives uptime metrics. The application-layer continuity procedures (offline mode, degraded-service messaging, support channels) are manufacturer-side. **Detail** Since open-pryv.io 2.0.0-rc.47 and 2.0.0-rc.50 the core also bounds what one client can consume (batch, paging, upload, socket.io and preview limits; per-address budgets on the unauthenticated entry points) and replaces a crashing worker after a growing delay instead of in a tight loop, so a single misbehaving client is less likely to make the service unavailable for others. Since open-pryv.io 2.0.0-rc.87, a flood of password checks no longer stalls a worker's other requests (a bounded number run at a time, the rest refused with `Retry-After`), and on PostgreSQL a runaway database statement of an API request is stopped after a time limit instead of holding its connection for as long as it takes. From the release after 2.0.0-rc.87, one account, one access or one socket.io connection can hold only a bounded number of calls and connections at once on a worker (the extra ones answer `429 too-many-requests`), and overly nested or oversized call parameters are refused up front. The same release bounds the depth and size of an account's stream tree and the stream ids of one event, closes a connection a client stopped reading after an idle timeout, and caps the mail a caller can make a core send (registration codes per client address, verification mails per account, an hourly breaker per core that keeps password resets apart from registration codes). See `context/rate-limiting-and-dos-protection.md` and iso-27001 A.8.6. An edge layer in front of the cores remains your part. **Evidence** - docs: customer-resources/rate-limiting.md - derives from: iso-27001.A.5.23, mdr.A1.17 - primitives: multi-core-mTLS, letsEncrypt-integration, backup-restore, observability-provider - context notes: rate-limiting-and-dos-protection ### DiGA A1.5.1: Annex 1.5, Consumer protection, clear pricing + contractual conditions Coverage: out-of-scope · draft Requirement: The implementer shall provide users with clear information on pricing model + contractual conditions (subscription duration, cancellation terms, renewal mechanics) in advance. **What Pryv does for you** Pricing + contract terms are editorial / commercial. No software role; Pryv stores whatever notice text you present (per A1.1 data-protection notices pattern) but doesn't generate it. ### DiGA A1.5.4: Annex 1.5, Consumer protection, barrier-free access (accessibility) Coverage: out-of-scope · draft Requirement: The digital health application shall meet relevant accessibility requirements (WCAG 2.1 AA equivalent or higher, per BfArM interpretation), supporting users with disabilities. **What Pryv does for you** Accessibility is an app-layer UX concern. Pryv is a backend; the app's HTML / WAI-ARIA / contrast / keyboard-navigation posture is the manufacturer's frontend implementation. ### DiGA A1.5.7: Annex 1.5, Consumer protection, clear language + age-appropriate UI Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: User-facing text shall be in clear, plain language; for applications targeting children or adolescents, the UI shall be age-appropriate. **What Pryv does for you** Plain-language text + age- appropriate UI are app-layer responsibilities. Pryv contributes the artefact storage: when different content variants are served to different age cohorts, `access.clientData.target_audience` records the variant served, and `account.clientData.age_verification_method` (per GDPR Art.8) ties the variant to the verified age. Composition of the text is editorial. **Evidence** - derives from: gdpr.Art.8 - primitives: access, clientData, event ### DiGA A1.6.5: Annex 1.6, Patient safety, alarm / escalation logic when applicable Coverage: out-of-scope · draft Requirement: Where the digital health application generates alarms or escalation messages (urgent clinical signal, abnormal value crossing a threshold), the logic shall be documented + validated; escalation paths shall be tested + reliable. **What Pryv does for you** Clinical-alarm logic is the manufacturer's software responsibility (and falls under MDR Art.61 clinical evaluation + Annex I §17.4 verification). Pryv stores the alarm events; the logic that produces them is app-side. ### DiGA A1.2.2: Annex 1.2, Documentation of architecture + components Coverage: facilitated · effort saved: medium · mode: awareness · draft Requirement: Manufacturer shall document the application's architecture including all components, their role + interactions, and the security boundary of each. **What Pryv does for you** Pryv's architecture is publicly documented (open-pryv.io README, AGENTS.md, component-level READMEs), the BfArM-required architecture document references Pryv as a sub-system. The app-layer architecture (services, libraries, network topology) is the manufacturer's documentation. **Evidence** - derives from: iso-27001.A.8.27 - primitives: audit ### DiGA A1.2.3: Annex 1.2, Hardening + secure configuration Coverage: facilitated · effort saved: high · mode: infrastructure · draft Requirement: The technical platform shall be hardened per current best practices; configuration shall minimize attack surface (disabled services, restricted ports, least-privilege defaults). **What Pryv does for you** Pryv ships secure-by- default (TLS on, mTLS between cores, no anonymous access path, system-streams isolating privileged data, at-rest secret encryption). Operator-side hardening (host OS, firewall, OS-level least-privilege) layers on top per their hardening guide. **Evidence** - derives from: iso-27001.A.8.9 - primitives: letsEncrypt-integration, multi-core-mTLS, system-streams, encryption-at-rest-secrets ### DiGA A1.2.6: Annex 1.2, Incident response capability Coverage: facilitated · effort saved: medium · mode: evidence · draft Requirement: Manufacturer shall have documented incident-response procedures, with detection + escalation + containment + recovery + post- mortem phases defined. **What Pryv does for you** Pryv contributes detection (observability anomalies, audit-log patterns) + containment (accesses.delete revokes implicated tokens) + recovery (backup-restore + multi-core HA) + post-mortem (audit-log forensic trail). The manufacturer's IR runbook ties these primitives together with people + decisions. **Evidence** - derives from: hipaa-security.164.308(a)(6)(i), iso-27001.A.5.23 - primitives: audit, observability-provider, access ## General Data Protection Regulation (GDPR) - Scope id: `gdpr` (regulation) - Jurisdiction: EU + EEA (extraterritorial via Art. 3) - Version: Regulation (EU) 2016/679 (consolidated) (2016-04-27) - Official text: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02016R0679-20160504 - Requirements: 47 (6 implemented, 3 configurable, 31 facilitated, 7 out-of-scope) - Browse: https://pryv.github.io/compliance-matrix/#/scope/gdpr ### GDPR Art.1: Subject matter and objectives Coverage: facilitated · effort saved: low · mode: awareness · draft Requirement: Regulation lays down rules on the protection of natural persons with regard to the processing of personal data and rules relating to the free movement of personal data. **What Pryv does for you** GDPR's purpose is to protect natural persons in how their personal data is processed, while keeping that data freely movable. Pryv is designed for exactly that: your subjects own their data, and technical controls enforce the consent they granted, and the API is open so data can move without lock-in. The per-article rows below describe how each obligation maps to the primitives Pryv gives you. **Detail** Protection of natural persons (re: processing of their personal data): - Subject-centric storage, each of your users has dedicated storage; you host but don't commingle subjects. - Technical access control, permissions per stream are enforced at the API surface; processing only happens within the scope the subject granted. - Versioned consent record, access + clientData + consent events form a tamper-evident chain of what was authorised, when, with which contract text. - Accountability by construction, audit rows reference the specific access version used at processing time. Free movement of personal data: - Open HTTP API, events / streams / accesses consumable without vendor SDKs. - Canonical event-type schemas, structured JSON with stable class/format semantics; portable across deployments. - Cross-platform sharing, independent Pryv operators can exchange data + consent without shared trust, shared user namespace, or federation auth. - No vendor lock-in; you can move data + consent contracts between operators using the same primitives an end-user would use to read them. A Pryv deployment cannot, on its own, make you GDPR-compliant, but it gives you the technical substrate on which the per-article obligations below can be discharged. **Technical** Primitives carrying this row: - `access` (versioned, immutable per version), see `context/access-versioning.md` - `permissions` (per-stream, per-level, enforced in `open-pryv.io/components/api-server/src/methods/`) - `audit` (per-API-call rows tagged with `accessId` + `accessSerial`) - `data-types` (canonical class/format schemas at `https://raw.github.com/pryv/data-types/master/dist/event-types.json`) - `CMC` plugin (`open-pryv.io/components/cmc/`, shipped 2.0.0-pre.3) **Evidence** - primitives: access, permissions, stream, audit, data-types, CMC - context notes: access-versioning ### GDPR Art.2: Material scope Coverage: facilitated · effort saved: low · mode: awareness · draft Requirement: Applies to the processing of personal data wholly or partly by automated means and to the processing other than by automated means of personal data which form part of a filing system. **What Pryv does for you** Your Pryv deployment is fully inside Article 2's material scope. Every event you store and every API call your apps make is automated processing covered by GDPR. Pryv does not exempt you from any per-article obligation; it gives you the technical primitives that make those obligations addressable (see Art.5+). Branch 2 (non- automated processing inside a "filing system", structured paper records) doesn't surface at the Pryv layer; your own paper records, if any, are outside the software boundary. **Detail** GDPR Art.4(6) defines "filing system" as any structured set of personal data accessible by specific criteria, alphabetised customer cards, dated patient folders, indexed application forms. Random unstructured paper or spoken-only data is not in scope. Pryv is fully digital, so branch 1 always applies; branch 2 is moot. If you also keep paper records as part of the same business process, those fall under branch 2 but as a separate process you manage outside Pryv. **Evidence** - primitives: access, event, audit ### GDPR Art.3: Territorial scope Coverage: facilitated · effort saved: medium · mode: infrastructure · draft Requirement: Applies to processing in the context of an establishment in the Union, or where processing relates to data subjects in the Union. **What Pryv does for you** Whether GDPR applies to your Pryv deployment depends on where you're established and where your data subjects are, not on the software. Pryv is self-hosted, so you control data residency directly: the multi- hosting feature lets you choose which jurisdiction each core runs in, and either let end-users pick their hosting at registration or auto-route them by your policy. If any of your subjects are in the EU/EEA, GDPR applies to your deployment in full. **Detail** Pryv supports a single logical platform spanning multiple hostings (different countries / cloud regions / on-premise). Two routing policies you can apply: - **End-user choice**: your registration UI presents the available hostings (via `auth.hostings`); user picks. Useful for consumer apps where subjects assert their own residency preference. - **Operator / regulatory routing**: your app auto-routes based on the subject's jurisdiction or contract terms (e.g., EU subjects → EU hosting; French health data → HDS-certified French hosting). The chosen hosting binds the user's data to that core permanently. `system.users.get` exposes the per-user hosting so you can surface it in the app ("your data is stored in "). Note: even with EU-only hosting, if you have a non-EU establishment offering services to EU subjects, Art.3(2) still pulls you into GDPR. **Evidence** - primitives: data-residency ### GDPR Art.4: Definitions Coverage: facilitated · effort saved: medium · mode: awareness · draft Requirement: Defines key terms: personal data, processing, controller, processor, consent, profiling, pseudonymisation, etc. **What Pryv does for you** Article 4 defines GDPR vocabulary. Pryv's primitives map cleanly to most of these terms, easier for you to point auditors at concrete artefacts rather than abstract concepts. **Detail** Approximate mapping of key GDPR terms to Pryv primitives: | GDPR term | Pryv primitive | |---|---| | personal data | `event` content + attachments on a user's account | | data subject | the user (account owner) | | controller | typically you, the implementer | | processor | the Pryv operator (when distinct from you) | | recipient | a counterparty holding an `access` to the data | | third party | another deployment / app accessing via shared/app `access` | | consent | app/shared `access` with `permissions` + `clientData` carrying the contract (see Art.7) | | processing | any API call on `events.*` / `streams.*` / `accesses.*` (audit-recorded) | | filing system | N/A, Pryv is fully automated | | personal data breach | event/audit anomaly + post-mortem (see Art.33) | | pseudonymisation | `accesses.create {randomAlias:true}` (platform-unique routable alias hides the username per access from its holder; since 2.0.0-rc.69 the token is accepted under its alias only, so a holder who guesses the username cannot confirm it with the token, see Art.32) + external ids (a third-party record id held only as a value the caller blinds with its own key, open-pryv.io 2.0.0-rc.58) + system-streams + custom event-type design | | profiling | application-side concern (out for Pryv) | | restriction of processing | scope-down via `accesses.update` (see Art.18) | The controller/processor distinction is contractual; you assign the roles. Pryv lets you record the assignment explicitly in `access.clientData` if you want it traceable. **Evidence** - primitives: access, permissions, stream, event, system-streams, randomAlias, external-id-index ### GDPR Art.5: Principles relating to processing of personal data Coverage: implemented · effort saved: high Requirement: Lawfulness, fairness, transparency; purpose limitation; data minimisation; accuracy; storage limitation; integrity and confidentiality (security); accountability. **What Pryv does for you** Several Art.5 principles are technically enforced for you by Pryv rather than left to policy: purpose limitation (per-stream permissions), accountability (audit chain to the consent state), accuracy (schema validation at ingest; the prior value of a corrected event is kept when you turn on event history with `versioning.forceKeepHistory: true`, off by default). Lawfulness, fairness and transparency stay on your shoulders; Pryv stores the notice/consent text you present but doesn't generate it for you. **Detail** Per-principle breakdown, what Pryv does for you, what you do: - Lawfulness, fairness, transparency (§1(a)), DOCUMENTED. You write the notice and present it; Pryv carries the text in `access.clientData` or a `consent/request-cmc` event so the same text is recoverable later. - Purpose limitation (§1(b)), IMPLEMENTED. `permissions` per stream technically restrict reads/writes to the granted scope; an app cannot access streams outside its granted permissions. - Data minimisation (§1(c)), FACILITATED. Permissions + stream design let apps see only what's in their scope; the rest is invisible to them. - Accuracy (§1(d)), FACILITATED + IMPLEMENTER-OWNED. Pryv enforces **structural** accuracy at ingest: every `events.create` and `events.update` validates against the declared event-type's JSON Schema (ajv-draft-04 via `components/utils/src/jsonValidator.ts`), rejecting out-of-shape or out-of-range payloads with HTTP 400. Numerical bounds (`minimum`/`maximum`), string patterns, and length limits are expressible per type, the HDS data-model exemplar declares 28 `minimum`/23 `maximum` constraints across health-data types. The built-in catalogue uses bounds sparingly (operator opts into strictness by extending via `service.eventTypes` URL, Q14 pattern). **Semantic** accuracy, "is this medication right for THIS patient?", is out of scope by design; the implementer's app layer carries the clinical / domain context Pryv intentionally doesn't see. `events.update` rectifies events (Art.16). The prior value is kept, and returned by `GET /events/:id?includeHistory=true`, only on a deployment with `versioning.forceKeepHistory: true` (default `false`: the update overwrites it); set it if your accuracy trail must show the value before correction. The audit log records who rectified which event and when either way, not the prior value (see `context/event-history.md`). Full split in `context/data-accuracy-structural-vs-semantic.md`. - Storage limitation (§1(e)), CONFIGURABLE for whole accounts (account auto-deletion) + VOLUNTARILY MISSING and OPERATOR-OWNED for event-level and stream-level retention + CONFIGURABLE at the erasure-mechanics layer. Pryv exposes no TTL / auto-delete / scheduler primitive for events and streams (whole accounts are covered by account auto-deletion since 2.0.0-rc.66, below): event-level and stream-level automatic retention is the operator's external job, composing `events.get toTime=` + `events.delete` (two-stage) + `streams.delete` + `auth.delete` + the audit log as inactivity oracle. Every retention deletion is captured by the audit log automatically (Q9 audit-by-construction). Engine-dependent backup-tail considerations apply (see Art.17). Full pattern + cron-job recipe + audit-trace treatment + "why not built-in" rationale in `context/data-retention-operator-owned.md`. One narrow built-in purge exists since open-pryv.io 2.0.0-rc.56: the deletion records of accesses, opt-in with `accesses.deletionRecords.retentionDays` (default 0, kept until the account is deleted). Account auto-deletion, since open-pryv.io 2.0.0-rc.66 (`8521c8d5`): an account is deleted at a date its holder picks, or after a period without use of its personal accesses (a sign-in counts, `[LGLU3]`; a delegate's own token included, shared accesses never, `[ACAC1]`, `[ACAC2]`, `[ACAC7]`; since 2.0.0-rc.81 app accesses count only with `account.autoDeletion.inactivity.countAppUse`, default false, `[ACST20]`). Two sources: the holder's own schedule (their erasure request, see Art.17), or your inactivity preset (`account.autoDeletion.inactivity.defaultDays`, default none). A preset is your storage-limitation rule: state the period and what counts as use in your privacy notice (Art.13 §2(a)). Reminder mails before the deletion (60, 30, 7 and 1 days by default, `[ACXP3]`), no deletion less than 7 days after the first notice actually sent (`[ACXP8]`); a preset applies only to plain accounts with an email address on a core that sends mail (`[ACST14]`, `[ADSW9]`), and its clock starts the day it first applies, so turning one on never deletes dormant accounts by surprise (`[ACXP2]`, `[ACXP10]`); a dry run shows the numbers first (`[ADSW13]`). Inactivity needs `accessTracking.isActive`: a preset without it refuses the boot (`[CVAD3]`), and a holder's inactivity schedule is suspended, never erased, while tracking is off (`[ACXP19]`). The erasure is `auth.delete`'s, guards included (`[ADSW8]`). Event-level and stream-level retention stays your retention job. See `context/data-retention-operator-owned.md`, "Account-level auto-deletion", and the operator page `customer-resources/account-auto-deletion`. Leftovers of unfinished registrations (the release after open-pryv.io 2.0.0-rc.87; merged, unreleased at this walk). A registration that fails, or whose process dies midway, can leave personal data that no finished account owns: account fields (the email included) under an id the users index lacks, an indexed account with no password, or an email still reserved on the platform for a name that never got its account. From that release a failed registration's compensation removes its account fields on PostgreSQL too (earlier, a failed first registration in a freshly started worker kept them, email included, with no owner) `[URB2]`. For what an earlier failure or a crash left, run `bin/reconcile-user-cores.js --registrations` on each core. It only reports unless given `--apply`; it clears an orphan id (PostgreSQL) only when the id holds account fields alone, no erasure record, and is older than `--grace` (default 24 hours) `[RCRG1]`, `[RCRG2]`; it erases an indexed account with no password (both engines) only when you name it with `--user-id` and it still passes every check, through the account deletion's erasure, recorded in the erasure ledger and resumable `[RCRG3]`, `[RCRG5]`, keeping the platform rows of a name another core holds now `[MCUR2]`; an empty users index facing account rows is refused (exit 3) `[RCRG7]`. The default username pass of the same tool now releases the email and other unique values a stale name held, before its routing row `[RCRG6]`, `[MCUR1]`. Run both as a dry run first: a name whose account is missing for another reason (a partly lost users index) loses its reserved email too. The pass's own log lines carry ids and counts, never an email or field value; the account erasure it runs logs the account name, as every account erasure does. Procedure: open-pryv.io `INSTALL.md`, "Unfinished registrations". - Data minimisation, planned with the account transfer (the release after the deletion one; implemented, not released): a holder may name a beneficiary who receives control of the account at the deadline. Only the beneficiary's email is required; a name and date of birth are optional, kept encrypted, unreadable before the transfer starts, and erased with the transfer (§1(c)). - Integrity & confidentiality (§1(f)), covered separately at Art.32. - Accountability (§2), IMPLEMENTED. Every API call audited with the access reference + version; access carries the consent state at that version → end-to-end accountability chain you can point auditors at. **Technical** - Purpose limitation: enforcement in `open-pryv.io/components/api-server/src/methods/` permission-checks. - Accountability: audit row schema includes `(accessId, accessSerial)`; access-version snapshot includes `clientData` (consent state), see `context/access-versioning.md`. **Evidence** - tests: GLHP, UZEV, ACXP2, ACXP3, ACXP8, ACXP10, ACXP19, ACAC1, ACAC2, ACAC7, ADSW8, ADSW9, ADSW13, ACST14, LGLU3, CVAD3, URB2, RCRG1, RCRG2, RCRG3, RCRG5, RCRG6, RCRG7, MCUR1, MCUR2 - specs: EVENT.BASE, STREAM.BASE - docs: customer-resources/account-auto-deletion.md - config keys: account.autoDeletion.inactivity.defaultDays, account.autoDeletion.inactivity.countAppUse, account.autoDeletion.userOverride, account.autoDeletion.allowUserOptOut, account.autoDeletion.reminders.leadDays, account.autoDeletion.reminders.minNoticeDays, account.autoDeletion.dryRun, accessTracking.isActive - primitives: access, permissions, clientData, stream, audit, account-auto-deletion - samples: scheduled-retention-job - context notes: event-history, data-accuracy-structural-vs-semantic, data-retention-operator-owned, access-versioning **Planned changes** - feature: Account transfer to a beneficiary (release after the deletion one): §1(c) minimisation of the beneficiary's data (email required; name and date of birth optional, encrypted, erased with the transfer) ### GDPR Art.6: Lawfulness of processing Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: Processing lawful only if at least one of six bases applies (consent, contract, legal obligation, vital interests, public interest, legitimate interests). §4, further processing for a purpose other than the original is lawful only if compatible per the five-factor test OR a fresh lawful basis applies. **What Pryv does for you** You decide which Art.6 basis you're relying on for each processing activity. Pryv doesn't impose or check the basis. You can record your chosen basis in `access.clientData.lawful_basis` so it travels alongside the technical authorization and lives in the audit trail, handy when an auditor asks "under what basis was this access made?". For Art.6(4) further processing (purpose pivot), Pryv exposes four composable patterns + a clear decision rule for when the purpose pivot demands fresh consent vs. an in-place update, see detail. **Detail** Recording the basis on the access gives you a durable, versioned artefact tying the basis to the specific processing scope it justifies. Determination of which basis applies remains your responsibility, Pryv neither enforces nor refuses on the basis claim. **§4, further processing (purpose pivot).** Four composable patterns; choose per the compatibility-vs-fresh-consent decision rule below. **Pattern A, Mint a new access for the new purpose.** The cleanest fit when the new purpose is **outside** the original OR is not covered by a fresh override-by-law basis (Art.6(4)(a) compatibility test fails). The subject sees a fresh auth flow; `app-web-auth3` presents the new notice + new purpose explicitly; the new access carries `clientData.purpose: ` + `clientData.lawful_basis: `. Old access keeps operating for its original purpose (or is revoked separately if withdrawn). This pattern is the **mandatory** path when the compatibility test fails, fresh consent is required. **Pattern B, Update existing access** (`accesses.update`). Suitable when the purpose change is narrow / compatible (e.g., scope-down or compatible expansion). The pre-mutation `permissions` + `clientData` snapshot into a history row automatically (see `context/access-versioning.md`), preserving the purpose-history chain end-to-end. The bumped `accessSerial` threads through the audit log so post-pivot rows correctly attribute to the new purpose state. **Pattern C, Separate compatibility-assessment event.** When the operator wants the Art.6(4) 5-factor analysis itself recorded as a first-class artefact, write a `compliance/compatibility-assessments/` event on a dedicated stream (operator-authored format via Q14 custom catalogue) capturing the §6(4)(a)-(e) reasoning + the affected data scope + the decision outcome. The relevant access(es) then reference it via `clientData.compatibility_assessment_event_id`. This pattern composes with A or B (the assessment artefact justifies the pattern choice). **Pattern D, Sub-access derivation from an `app` access** (`createdBy` mechanism, see `context/workforce-access-patterns.md` Pattern 2). When the operator's app holds an `app`-type access with broad scope; it can mint per-purpose **sub-accesses**, each carrying its own narrower `permissions[]` + `clientData.purpose`: and the audit log records each sub-access's id independently, **feeding purpose-driven access matching into the audit trail at query time** (`audit.get` → group by `accessId` → distinct purposes touched). Especially clean when the same app legitimately operates under multiple compatible-purpose facets, each facet gets its own sub-access, so per-purpose disclosure accounting (Art.30 / §164.528) reconstructs from the audit log without operator-side bookkeeping. **Decision rule** (operator-side): 1. New purpose is **inside** the original purpose's scope (a compatible refinement / narrowing) → **Pattern B** update existing access. No fresh consent. Update notice if material. 2. New purpose is **alongside** the original (compatible expansion, same app, multiple facets) → **Pattern D** sub-access mint, OR **Pattern A** new access. No fresh consent required if compatibility test passes; transparency-notice update may be required under Art.13(3). 3. New purpose is **outside** the original AND not covered by a fresh override-by-law basis (Art.6(1)(c)/(d)/(e)) → **Pattern A** mint new access + force fresh consent. The subject's positive opt-in is mandatory under Art.6(4) when compatibility fails. App-web-auth3's grant flow IS the re-prompt mechanism. 4. In **any** case where the 5-factor compatibility analysis was non-trivial → **Pattern C** separate compatibility- assessment event for audit-defensibility. **Re-prompt surface (§4 fallback):** Pryv has no built-in "notice changed → automatically re-prompt subject" workflow. The operator's app layer triggers re-auth by minting a new access (Pattern A), `app-web-auth3` presents the updated notice; the subject's positive consent IS the fresh-basis capture. For revocation of the old access alongside the new mint, `accesses.delete` is the standard path (Q19 / Q28 mechanism family). **clientData convention extension** for §4 purpose pivots: `compatibility_assessment_event_id` + `purpose_change_basis` (`compatible_purpose` / `new_consent` / `new_legal_obligation` / `new_legitimate_interest`) + `previous_purpose` (the pivot record). See `context/client-data-conventions.md`. **Planned, implemented and not released: account transfer to a beneficiary** (the release after account auto-deletion). A holder may name one person who receives control of the account at its deadline; the platform then stores that person's email and, if the holder gives them, their name and date of birth. The beneficiary is not the one who gave the data, so the basis is yours to establish as operator. The reading recorded in `context/data-retention-operator-owned.md` ("Planned: transfer to a beneficiary") is Art.6(1)(f): the holder's legitimate interest in arranging what happens to their own account, and yours in carrying out that instruction, balanced by minimisation (only the email required), encryption at rest, no read path before the transfer starts, and erasure with the transfer. Unconfirmed: it needs your DPO's or counsel's reading before you offer the transfer. **Evidence** - primitives: access, clientData, audit, event - context notes: access-versioning, workforce-access-patterns, client-data-conventions, data-retention-operator-owned **Planned changes** - feature: Account transfer to a beneficiary (implemented, not released): the platform stores a third party's email, and optionally name and date of birth, on the holder's instruction; the operator needs a basis for that processing ### GDPR Art.7: Conditions for consent Coverage: implemented · effort saved: high Requirement: Where processing is based on consent, controller must be able to demonstrate consent. Request must be in intelligible form, withdrawable. **What Pryv does for you** The access Pryv mints when your user grants permission IS your durable consent record, versioned permissions + clientData together prove what was authorised, with what text, at what time. Withdrawal is a single API call. For cross-account sharing, the `consent/*` events carry the negotiation state transitions. The access keeps every previous version; an event keeps its previous versions only on a deployment with `versioning.forceKeepHistory: true` (off by default), and the server-written parts of the accept event (who approved, the withdrawal) cannot be changed by any client. **Detail** Demonstrability (§1), `accesses.get ?includeHistory=true` returns the full version chain; each version preserves the `permissions` granted and the `clientData` (which can carry the consent contract text) at that point in time. For cross-account flows, the original `consent/request-cmc` event on the requester's account holds the localised consent text presented. What a grant covers is a set of streams, and a release can widen what a stream carries. Since open-pryv.io 2.0.0-rc.44, an access holding a grant on the account email stream (`:system:email`, "Read Email") can also request, by type, a read-only, server-derived `verification/email` event (whether the primary address was proved, by which method, and when), including apps granted it before that release, without new consent. A read without that type returns the address only, as before. Other addresses of the account are never returned. If the consent text you present should name this, rename the email field's `name` in `custom.systemStreams`. Withdrawal (§3), `accesses.delete` (full revoke) or `accesses.update` with narrower `permissions` (scope-down). Both bump the access serial + snapshot the pre-mutation state. Cross-account: `consent/revoke-cmc` triggers symmetric teardown on both sides via the CMC plugin. Since open-pryv.io 2.0.0-rc.53 every CMC and delegation teardown (a `consent/revoke-cmc` revoke, a revocation received from the counterparty, an accept rolled back, a delegation detach, the teardown at account deletion) is the `accesses.delete` deletion: the data grant is marked deleted and stays readable by name (never by token) with `includeDeletions`, its webhooks are deleted and its alias released `[GA30]`. Before that release these paths removed the access row outright, so for a withdrawal made then the record you demonstrate is the `consent/*` events (the accept on the subject's account, the request on the requester's) plus the audit trail, not the access version chain. When the offer made the grant delegable (`request.accessType: 'app'`), every withdrawal path also deletes the accesses the requester derived from it, since open-pryv.io 2.0.0-rc.52 (`96af58ad`) `[MAAC]`, `[CMCHS-APPGRANT]`, `[GA24]`; on earlier releases they stayed valid until their own expiry, and `bin/access-scope-audit.js` lists any left behind. The withdrawal is effective on the withdrawing account at once; the notice to the counterparty, when it cannot be reached, is queued and re-sent by the retry loop since open-pryv.io 2.0.0-rc.53 (eight re-sends over about 27 hours, then marked failed for the operator, https://github.com/pryv/open-pryv.io/issues/157) `[HR25]`, `[DH25]`, `[RQ20]`, `[RQ21]`, `[RQ22]`, `[RQ23]`, and a late notice never tears down a relationship the parties re-established meanwhile `[CIR26]`, `[CIR27]`. Not re-sent: the notices of an account being deleted (no account is left to hold them), and any notice while `cmc.retryLoop.enabled` is `false`. Nor, since open-pryv.io 2.0.0-rc.56, a notice to an address Pryv refuses to call (loopback, private or reserved, unless listed in `cmc.allowedPrivateHosts`; see Art.32): it is tried once and marked failed at once `[HR41]`, `[RQ33]`. The same release has the retry loop act only on records the server wrote into its queue `[RQ32]`. The person's own accept event also records the end itself, whatever ended the consent: `content.withdrawal = { at, by, accessId, revokeEventId? }`, with `by: 'accesses.delete'` (the data grant deleted through the API) `[CN58]`, `[DH16]`, `'revoke-cmc'` (the person wrote a `consent/revoke-cmc`) `[CN59]`, `[HR32]` or `'peer-revoke'` (the requester withdrew) `[CN60]`, in open-pryv.io 2.0.0-rc.36 (`1420fe72`, https://github.com/pryv/open-pryv.io/issues/146); a delegation detach has recorded `by: 'delegation-detach'` since 2.0.0-rc.31 (see below). The marker is server-owned, written only once the grant is gone and never overwritten once set `[DCH25]`. It is an ordinary event update: with `versioning.forceKeepHistory: true` the accept event's history keeps the version before it ended; otherwise the events and audit trail above date the consent. Recording it is best-effort (a teardown never fails on it), so the events and audit trail stay the fallback record. A `consent/revoke-cmc` whose delete of the relationship access (on the person's side, the data grant) fails no longer reads completed: it ends `failed` (`cmc-revoke-delete-failed`) and is retried without telling the peer twice, and nothing is recorded as withdrawn until the delete succeeds `[HR34]`, `[CD26]`. If your app lists a person's consents, treat an accept event carrying `withdrawal` as ended; the `@pryv/cmc` client does so by default since 3.18.0. Since open-pryv.io 2.0.0-rc.38 (merge `461f3c4c`) these server-written records also survive a concurrent client write: a client updating or trashing the accept event while the server stamps it no longer erases the stamp, because the update is applied onto the event as stored at write time `[ESR1]`, `[ESR4]`, and a CMC event's dispatch `status` and `failure` are server-owned, so a client cannot make a failed delivery read completed `[ESR5]`, `[APB13]`. See `context/cmc-consent-primitives.md`. What a cross-account consent covers, and between whom (§1, open-pryv.io 2.0.0-rc.38, merge `7aab1e85`): the channels a relationship opens between the two parties (`features.chat`, `features.systemMessaging`) are resolved by Pryv from the requester's offer, which the person's accept may only narrow, and the resolved pair is recorded on the person's accept event and on both relationship accesses `[HA43]`, `[HA44]`, `[CD28]`; an update keeps it `[APB16]`, and an accept claiming more than the offer is cut back on the requester's side too `[IA18]`, `[IA22]` (https://github.com/pryv/open-pryv.io/issues/149). An account can no longer accept its own offer: the accept fails with `cmc-self-accept-forbidden` before any stream or access is created `[HA46]`, `[HA48]`, `[CN67]`, so every recorded consent is given by one account to another; a self-relationship created earlier records its withdrawal when its access is deleted `[CN69]`, `[DH23]` (https://github.com/pryv/open-pryv.io/issues/150). If your consent text describes chat or system messages, keep it consistent with the `features` your offer sets. Intelligible form (§2): you write the UX (app-web-auth3 template is a starting point). Pryv enforces the technical contract; your UI presents it. Granular consent (§4), different processing purposes can be expressed as separate accesses with different permissions, each independently withdrawable. Within ONE request, a requester also states what each permission means to the user: required, optional and offered pre-selected, or optional and offered unselected (`mandatory` / `optIn`, the consent-form annotations in `open-pryv.io/components/business/src/accesses/permissionSet.ts`). `optIn` is the Recital 32-aligned choice for an optional permission where consent is the lawful basis, because a pre-ticked box is not consent; the published guidance recommends it explicitly. The annotations are display-layer only and are stripped before an access is minted, so no stored permission carries one. The SAME granularity now reaches the ORIGINAL authorization path, not only OAuth2. An auth request (`POST {serviceInfo.access}`) may carry a `consent` object beside its plain permissions; the authentication page then presents each entry in the state the requester asked for and mints only what the user kept. Crucially the result is VERIFIED server-side: the accept (`open-pryv.io/components/api-server/src/routes/reg/consentCheck.ts`) reads the access actually created and refuses it unless it matches what was offered (`checkConsentGrant`, the same rule the OAuth2 and cross-account paths use, so there is one rule and three call sites). A check that cannot be performed is refused, never waved through. Requests that carry no `consent` object behave exactly as before, so this is additive for existing integrations. Consent invites in the same authorisation request (§2 "clearly distinguishable", open-pryv.io 2.0.0-rc.32, `6496ffbb`): an app may ask the user, in the one sign-in, to also answer the cross-account (CMC) consent invites it received, by adding `cmcInvites` (1 to 8 entries: the invite's capability URL, `mandatory`, and `for` the user's own account or an account the user manages through delegation) to the auth request. Pryv validates the list when the request is created, stores it normalised and echoes it on the 201 answer and on the poll the authentication page reads `[RCI1]`, `[RCI2]`, `[RCI6]`. An invite may also name the data grant the person mints by accepting it (`accessName`, 1 to 256 characters, open-pryv.io 2.0.0-rc.36, https://github.com/pryv/open-pryv.io/issues/147), so each consent carries a name you choose among the person's accesses; the authentication page passes it to the accept `[RCI10]`, `[RCI11]`. The reference account app (app-web-user-account 0.11.0) presents each invite as its own block with its own Approve and Decline, never implied by approving the app access; it decides, then accepts the approved invites (mandatory ones first), then grants the app access, and answers each declined invite to its requester with `consent/refuse-cmc`. A declined mandatory invite ends the request refused with `reasonId: 'REFUSED_MANDATORY_CONSENT'` before anything is written, and a mandatory invite that could not be accepted ends it with `reasonId: 'MANDATORY_CONSENT_FAILED'` (app-web-user-account tests `[ACI2]`, `[ACI14]`). The page posts one outcome per invite with the acceptance; Pryv checks their number and shape before any write, refuses them on any other status, stores them under a name the poster cannot write directly, and serves them back to the app in the accepted answer `[RCI3]`, `[RCI4]`, `[RCI5]`, `[RCI7]`, `[RCI8]`, `[RCI9]`. These outcomes are a hint to the app: the record of each consent is the accept event on the subject's account and the request event on the requester's, as for any CMC consent, and `mandatory` is enforced by the authentication page, not re-checked by the core. What stays on your plate: a deployment using its own auth UI must present the invites the same way, and whether making an invite `mandatory` for an app access is compatible with consent being freely given (Art.7(4)) is your determination. Second consent path, OAuth2 authorization (§1, §4), where your user authorises a delegated app through Pryv's OAuth2 authorization-code flow (`open-pryv.io/components/oauth2/`, open-pryv.io 2.0.0-rc.8), the granular consent screen presents the referenced offer's per-permission set and lets the user untick individual permissions to downgrade the grant before accepting; the accepted subset (`grantedPermissions`, validated ⊆ the signed offer) is what Pryv mints the app access from (`open-pryv.io/components/oauth2/src/routes/accept.ts`). The durable consent record is the same primitive as everywhere else, a cross-account CMC data-grant access, versioned and revocable; revoking it tears down the app's refresh chain. Withdrawal (§3) reaches the app at once since open-pryv.io 2.0.0-rc.64: deleting the grant also deletes the app's live sessions and the accesses they created `[OE31]` (earlier releases let a live access token run out its lifetime, up to `oauth.accessTokenTTL`, one hour by default). A partial withdrawal reaches it too: since rc.68 a narrowed grant re-cuts every live session at once, and since rc.70 the accesses a session created are narrowed with it, or deleted when nothing is left `[OSUB1]`, `[OSUB3]`. A re-consent shows what the app already holds and sets the grant to exactly what the user ticks, so it can narrow as well as widen; a change of subject (username to pseudonym or back) must be acknowledged and is recorded in `oauth.consent.granted` `[OCMP7]`, `[OCMP11]`. A consent the server refused for its permissions is final and is never completed later by a retry (rc.65) `[RQAS1]`. Only the account holder's personal token may accept (rc.68). For clients the operator registers through an OAuth extension (registry clients, rc.68), the durable record is an app access `oauth-grant:` on the user's own account instead of a CMC data-grant, with the same versioning and withdrawal (see `context/cmc-consent-primitives.md`). Since open-pryv.io 2.0.0-rc.80 that grant and every session of it also name the app in `clientData.oauth.client` (`{ name?, origin: "operator" }`, the name the operator registered, never one taken from a request; a client metadata document's stamp carries its host and URL with `origin: "metadata-document"`), written by the server and refused by `accesses.update`, so the record shows which app the consent went to. A grant made before rc.80 gains it at its next consent `[OCMP22]`, `[OREG12]`, `[OCMDE15]`. Demonstrability rests on that data-grant + the signed offer material (the access + its version history), not on a separate event log. Delegate-account authorization (withdrawability, §3): where a delegate holds an owner-equivalent token over an account (account delegation, `open-pryv.io/components/delegation/`), the account holder never surrenders control, a delegate can never remove a delegation, and the holder withdraws it by a genuine login on their own account and detaching (the authoritative teardown, gated on a personal token carrying no forge-protected delegation marker). Each delegate's actions are audited on the controlled account. See `context/delegation-model.md`. Consent given by a delegate for the account it controls (§1, §3): a delegate may grant an app access to the controlled account through the auth request. The resulting access is the consent record and it lives on the data subject's account, carrying a server-stamped, non-forgeable lineage attribute (`clientData.delegation.kind: 'delegated-child'`) that names the delegate; the grant is checked against the offer like any other `[DCH13]`. The subject can withdraw it like any access, and removing the delegate withdraws every grant made through it `[DCH12]`. In open-pryv.io 2.0.0-rc.23 (`91b06363`, `ef0a3f75`, `5943ca0b`). A delegate may also give a cross-account consent (CMC) for the account it manages, writing `consent/accept-cmc` with its delegate token (open-pryv.io 2.0.0-rc.30, `9ba9c78c`). Pryv records it on the subject's account, in two places. The data grant carries the same lineage attribute (`clientData.delegation`, naming the relationship and the delegate, taken from the authenticated token, never from the request), and `access-info` with the grant's token reports it, so your counterparty can tell a delegate gave the consent `[DCH15]`. The accept event records who approved in `content.approvedBy` (the delegate and the relationship), stamped by the server: a client cannot supply, change or remove it, and an accept the account holder writes carries none `[DCH16]`. The consent ends with the delegation unless the account holder keeps it at detach (below): detaching the delegate deletes the grant before the detach answers (since open-pryv.io 2.0.0-rc.53 as the `accesses.delete` deletion, leaving a deletion record; earlier releases removed the row outright) and the requester receives `consent/revoke-cmc` (never holding the detach; re-sent by the retry loop when the requester cannot be reached, since rc.53) `[DCH18]`. An accept still in progress when the delegation ends mints no grant (`cmc-handler-delegation-ended`). After a detach, the subject-side record of such a consent is the accept event (`approvedBy`, `dataGrantAccessId`, and the outcome of the review below) plus the audit row of `delegations.detachDelegate`. Withdrawability of a delegate's consents at detach (§3, open-pryv.io 2.0.0-rc.31, `b77320df`): before a delegate is detached, the account holder reviews each cross-account consent that delegate gave and keeps or withdraws it, with one call, `delegations.detachDelegate { username, keepAccessIds? }`. Nothing is kept by default: a detach without `keepAccessIds` withdraws every such consent. Every id in the list must be a consent grant given through the relationship being removed, otherwise the whole call is refused (`400`, `delegation-invalid-keep-list`) before anything is written `[DCH23]`. A kept consent loses its delegation lineage and becomes the account holder's own (`access-info` no longer reports a delegation, the requester is told nothing), and its accept event records `content.ownerConfirmedAt` `[DCH21]`. A consent not kept is deleted, its requester receives `consent/revoke-cmc`, and its accept event records `content.withdrawal = { at, by: 'delegation-detach', relId }`, so every consent a delegate gave carries its own end on the subject's account `[DCH22]`, `[DDK07]`. `approvedBy`, `ownerConfirmedAt` and `withdrawal` are written by the server only: no token, the account holder's included, can write, change or erase them through the API (dropped on create, kept as stored on update, never added by an update) `[DCH24]`, `[APB08]` to `[APB12]`. The reference account app opens this review with nothing preselected, and a consent whose delivery to the requester never completed is listed as not delivered and cannot be kept, so it is withdrawn; if the consents cannot be listed, nothing is removed (app-web-user-account tests `[DKP7]`, `[DKP8]`). A deployment using its own account UI must offer the same review. The paths that still cannot record the lineage refuse a delegation-derived token, so a delegate cannot make a grant that outlives the delegation: publishing an offer (`consent/request-cmc`) and widening a grant (`consent/scope-update-cmc`) answer `delegation-grant-requires-owner` `[DCH17]`, and OAuth2 consent answers `403 access_denied` `[OE27]`. Whether a given delegate may consent for the account it manages remains your determination. Consent to a group account (§1, §3, open-pryv.io 2.0.0-rc.53, release commit `61fb28dd`, https://github.com/pryv/open-pryv.io/issues/158). A cross-account offer can make the grant delegable (`request.accessType: 'app'`, open-pryv.io 2.0.0-rc.9), so the requester can derive further accesses on the person's account from it. With group accounts, a team sharing one account has its core derive one short-lived access per member from that grant: each member access sits on the person's account as a child of the grant, named by the server, with the member and the group in its `clientData.cmc`, stamped by the person's core from the authenticated grant, within the offer's stream permissions `[GA10]`, `[MB10]`; and withdrawing the consent, on any path, removes the grant and every access derived from it (2.0.0-rc.52 or later on the person's core) `[GA24]`. The reference account app's consent page tells the person, in one line, when an offer's grant is delegable ("This organisation can share this access with its team members. Each member's actions are recorded on your account."), from its first release after 0.21.0 (app-web-user-account); a deployment using its own consent UI writes that notice itself. Whether your consent text names the members' access is yours to write. See `context/cmc-consent-primitives.md`, "Group accounts". **Technical** - Snapshot semantics: `context/access-versioning.md` (full head clone into history row per update). - CMC consent state machine: `context/cmc-consent-primitives.md` (10 `consent/*` formats in the event-type catalogue 1.3.0 bundled with open-pryv.io 2.0.0-rc.53). - `accesses.update` composite-id wire format requires `lib-js@3.1.0+`. **Evidence** - tests: AA01, ACCP, USAD, RA71, RA72, PS11, PS13, DCH12, DCH13, DCH15, DCH16, DCH17, DCH18, DCH21, DCH22, DCH23, DCH24, DCH25, DDK07, APB08, APB09, APB10, APB11, APB12, RCI1, RCI2, RCI3, RCI4, RCI5, RCI6, RCI7, RCI8, RCI9, RCI10, RCI11, CN58, CN59, CN60, DH16, HR32, HR34, CD26, OE27, HA43, HA44, IA18, IA22, CD28, APB16, HA46, HA48, CN67, CN69, DH23, ESR1, ESR4, ESR5, APB13, SIB01, SIB11, MAAC, GA10, GA24, GA30, MB10, HR25, DH25, RQ20, RQ21, RQ22, RQ23, CIR26, CIR27, HR41, RQ33, RQ32, OE31, OSUB1, OSUB3, OCMP7, OCMP11, RQAS1, OCMP22, OREG12, OCMDE15 - docs: guides/consent.md, customer-resources/auth-oauth2.md - config keys: cmc.retryLoop.enabled, cmc.allowedPrivateHosts - primitives: access, permissions, clientData, CMC, event, delegation - samples: who-has-access-to-my-data, cross-account-share - context notes: cmc-consent-primitives, delegation-model, access-versioning ### GDPR Art.9: Processing of special categories of personal data Coverage: facilitated · effort saved: medium · mode: primitive · draft Requirement: Processing of special-category data (racial / ethnic origin, political opinions, religious / philosophical beliefs, trade-union membership, genetic data, biometric data uniquely identifying a person, health data, sex life or sexual orientation) is prohibited unless one of ten conditions in Art.9(2) applies. **What Pryv does for you** Pryv is content-agnostic at the platform layer, no `sensitivity:` flag on event-type schemas, no server-side hook that refuses writes to "health" streams without a recorded Art.9(2) basis. **Classification is voluntarily missing at the platform.** But for **vertically-integrated operators** (you run the core AND ship the clients AND design the stream tree AND curate the event-type catalogue, typical for health deployments), Pryv exposes enough composable primitives that you build a strong Art.9 enforcement layer without platform-imposed assumptions. The Art.9(2) condition relied on lives in `access.clientData.special_category_basis` next to the technical grant. Full operator-toolkit treatment + two-deployment-topologies framing in `context/special-categories-operator-facilitated.md`. **Detail** Recommended stream-layout pattern for special-category-heavy deployments: - Reserve top-level subtrees per Art.9(1) category (`health/`, `biometrics/`, `genetics/`, `political-opinions/`, etc.). - Mint apps' / counterparties' accesses with explicit `permissions[]` listing the subtree they may touch; default-deny everything else. - Record the Art.9(2) lit-letter in `access.clientData.special_category_basis` ("(a) explicit consent", "(h) preventive / occupational medicine", etc.). - Audit log automatically captures every read / write under the access. **Operator-toolkit composition** (vertically-integrated deployments, operator controls both ends): 1. **Stream-tree design**: operator's client code routes sensitive writes exclusively to reserved subtrees; Pryv enforces the per-stream permission boundary (`AccessLogic`). 2. **clientData.special_category_basis**: Art.9(2) lit-letter recorded on every access touching a sensitive subtree; access-versioning preserves the basis over edits. 3. **Custom event-type catalogue annotations**: operator extends `service.eventTypes` URL with `x-art9-category` / `x-swiss-nlpd-sensitive` / etc. fields the client code reads to gate writes; Pryv passes the annotations through unchanged (Q14 / Q21 pattern). 4. **Custom dataStore (`@pryv/datastore`)**: sensitive subtree owned by a dedicated store with stricter at-rest encryption + access controls (Q16 pattern; `context/audit-archival-via-custom-datastore.md`). 5. **Per-engine isolation**: sensitive tier on a separate PostgreSQL instance / WAL / replicas (storage-engine plugins). 6. **`customExtensions.customAuthStepFn`**: operator-side gate that demands the Art.9(2) basis claim at access-grant time before minting the access. 7. **Audit log**: automatic capture of every read/write under any access; audit-minimality (Q9: no request body) is a feature for sensitive data, not a limitation. 8. **Backup tiering (Q15)**: operator encrypts sensitive-tier backups with a separate recipient key (`bin/backup.js --recipient-pubkey`, built in since open-pryv.io 2.0.0-rc.5) and applies stricter retention than ordinary tiers. The toolkit's reach varies by deployment topology, full strength for vertically-integrated operators, partial for open Pryv platforms hosting third-party apps the operator doesn't author. The two-topology framing is canonical in `context/special-categories-operator-facilitated.md`. Caveat: Pryv's permission model is per-stream, not per-field within an event. If an event mixes ordinary and special-category fields, you must split it or design your event types so the special-category subset is its own event-type. **Evidence** - primitives: stream, system-streams, access, clientData, permissions - context notes: special-categories-operator-facilitated, audit-archival-via-custom-datastore ### GDPR Art.8: Conditions applicable to child's consent in relation to information society services Coverage: facilitated · effort saved: medium · mode: primitive Requirement: Where Art. 6(1)(a) consent applies in relation to the offer of information-society services directly to a child, processing shall be lawful only where the child is at least 16 years old (Member States may lower to no less than 13); below that age, parental holder of responsibility must consent. **What Pryv does for you** Pryv still neither knows nor validates a subject's age, age + parental-authority verification happens at your app's registration / consent UX, and the platform is age-blind by design (verified: default `custom.systemStreams.account` ships only `email`; no `birthDate` / `dateOfBirth` / `minor` field in the catalogue). What Pryv now DOES give you is a technical control for the "parental holder of responsibility" case itself: **account delegation**. A parent or guardian holds an owner-equivalent delegate token over the child's account, every action is audited per delegate on the child's account, and the child reclaims sole control at the age of majority through a genuine login (which is what lets them detach the guardian). Age is still verified by you; delegation is the control mechanism, not the age check. The consent artefacts you keep travel alongside the access via the `clientData` convention family (see `context/client-data-conventions.md`). **Detail** **Parental holder of responsibility, as a technical control (delegation).** Pryv's account-delegation primitive (`open-pryv.io/components/delegation/`) lets a parent / guardian account hold an **owner-equivalent delegate token** over the child's account: full owner authority over the child's data, EXCEPT the delegate can never remove the delegation. Every delegate action is attributable on the child's account (per-delegate audit stamping), which gives you the "who acted for the child, and when" record Art.8 implies once parental consent is in force. Multi-holder cases (both parents / joint guardians) are expressed as multiple delegates, each independently audited; no delegate can unilaterally shed a co-holder's oversight. **Owner reclaim at majority** is intrinsic: because detach is gated on a *genuine login on the child's account* (a personal token with no forge-protected delegation marker, not any delegate token), the young person regains sole control simply by logging in and detaching the guardian(s) — no operator intervention required. `create-from-delegate` (with an optional email/password seed) covers the "guardian sets up the account first" flow while still leaving the child a genuine login for later reclaim. See `context/delegation-model.md`. **The parent consents to an app for the child.** Through the auth request, a delegate can grant a third-party app access to the child's account (the app never receives the delegate's owner-equivalent token). The consent record, the app access, lives on the **child's** account and carries a server-stamped lineage attribute naming the consenting delegate (`clientData.delegation.kind: 'delegated-child'`, reported by `accessInfo` as `grantedVia: 'app'`) `[DCH01]`, `[DCH02]`; the app's actions are audited on the child's account with the delegate named `[DCH05]`. The young person sees the app among their own and can revoke it; when the guardian is detached, every access granted through that delegation is revoked with it `[DCH12]`, so no parental consent outlives parental control. Whether a given parent may consent for a given app remains your determination. In open-pryv.io 2.0.0-rc.23. An app meant only for the managed account (for example a parent-facing app that should only ever hold the child's data) can require that the access be granted for an account the user manages, never for the user's own (`actAsManagedOnly: true` on the auth request, open-pryv.io 2.0.0-rc.36, https://github.com/pryv/open-pryv.io/issues/148). Pryv validates, stores and echoes the field `[RAM01]`, `[RAM02]`, `[RAM03]`, but the authentication page enforces it, not the core: a deployment using its own auth UI must honour it. **The parent accepts a cross-account consent for the child.** When a study or another account asks the child's account to share data through cross-account messaging (CMC), the parent can give that consent with their delegate token, without signing in as the child (open-pryv.io 2.0.0-rc.30). The record is on the child's account: the data grant carries the lineage attribute naming the parent, and the requester's `access-info` reports it `[DCH15]`; the accept event names the parent in `content.approvedBy`, stamped by the server and impossible for a client to forge `[DCH16]`. An app's authorisation request can carry such consent invites for the child's account (`cmcInvites` with `for: 'target'`, open-pryv.io 2.0.0-rc.32) `[RCI1]`: the reference account app accepts them with the parent's delegate token on the child's account, so they are recorded exactly the same way, each decided on its own. **Owner reclaim at majority covers the parent's consents.** When the young person detaches the guardian, they review, consent by consent, the cross-account consents the guardian gave, and keep only the ones they choose (`delegations.detachDelegate` with `keepAccessIds`, open-pryv.io 2.0.0-rc.31). Nothing is kept by default, and a keep list naming anything but a consent this guardian gave is refused whole, before any change `[DCH23]`. A kept consent becomes the young person's own: the lineage is removed and the accept event records `ownerConfirmedAt`, with `approvedBy` kept as history `[DCH21]`. Every other consent is deleted at once, the requester is told (`consent/revoke-cmc`, re-sent by the retry loop when the requester cannot be reached, since open-pryv.io 2.0.0-rc.53) `[DCH18]`, `[DCH22]`, and its accept event records the withdrawal (`content.withdrawal`, naming the detach) `[DDK07]`. These markers are server-written and cannot be forged or erased through the API by the parent or anyone else `[DCH24]`. The accept events and the audit row of the detach stay on the child's account as the record of each consent, of who gave it, and of how it ended. App accesses the guardian granted are not part of the review: they end with the delegation, as above. Publishing offers and widening a grant stay with the account holder. **Consent-artefact conventions (operator-side editorial discipline; no Pryv enforcement) still apply on top of the delegation control:** - `account.clientData.age_verification_method`, free-text or structured record of HOW age was verified (self-declaration / ID upload / parental-attestation / government-eID-flow). Travels with the account; reachable via the system-stream account event. - `clientData.parental_holder_consent_event_id` (singular, single-holder case) or `clientData. parental_holder_consent_event_ids` (array, dual / multi-holder case, divorced parents, jurisdictions requiring both biological parents, foster care, etc.), pointer(s) to the actual `consent/parental-*` event(s) recording the parental consent text + the holder's identity / verification trail. **The `consent/parental-cmc` event format does NOT ship in the built-in `data-types` catalogue.** Operators needing this format author it themselves and publish via `service.eventTypes` URL (the Q14 custom-catalogue extension pattern). HDS-style data-model repos that target paediatric / adolescent use-cases are the natural home for this format. Backlog candidate: if a critical mass of health deployments converges on a common shape, upstream it into `data-types` proper. **Re-verification on age-of-majority transitions**, voluntarily missing at platform layer. Pryv has no cron / scheduler primitive. Operator runs an external job that watches `birthDate` (extended-account-field) + access `created` timestamp + chosen jurisdiction's age of majority (typically 16 EU / 13 US under COPPA / etc.) and triggers a re-consent prompt at the crossing date. **Multi-holder consent**: supported by the array form above; the operator's app code at access-mint time enforces "both parents must accept" (or whichever jurisdiction-specific rule applies) before calling `accesses.create`. Each parental-holder consent event independently satisfies the access-history record; revocation of any one of them is the operator's signal to revoke or scope-down the access (per Q19 + Q28 mechanisms). **Evidence** - tests: DCH01, DCH02, DCH05, DCH12, DCH15, DCH16, DCH18, DCH21, DCH22, DCH23, DCH24, DDK07, RCI1, RAM01, RAM02, RAM03 - primitives: access, permissions, delegation, clientData, event - context notes: client-data-conventions, delegation-model ### GDPR Art.10: Processing of personal data relating to criminal convictions and offences Coverage: facilitated · effort saved: medium · mode: primitive · draft Requirement: Processing of personal data relating to criminal convictions / offences shall be carried out only under control of official authority or when authorised by Union / Member State law providing appropriate safeguards. **What Pryv does for you** Same pattern as Art. 9 special-category data: dedicate a `criminal-records/*` stream subtree, scope every access tightly, record the Art. 10 legal- basis-by-law citation in `access.clientData.art10_basis`. Pryv has no role in deciding whether a given processing instance falls under "official authority", that's your legal judgement. **Evidence** - primitives: stream, system-streams, access, clientData ### GDPR Art.12: Transparent information, communication and modalities Coverage: facilitated · effort saved: medium · mode: storage · draft Requirement: Controller shall provide concise, transparent, intelligible information and respond to data subject requests within one month. **What Pryv does for you** Pryv keeps the notice / consent text you presented to the subject, retrievable later: versioned on every change when it lives on the access, and on an event only with `versioning.forceKeepHistory: true`. The response operations (Art.15-22) execute in sub-second; the 1-month rule is your process target, not a software limit. **Detail** Information artefacts (notice, consent text, lawful-basis explanation) can live in `access.clientData` and/or in `consent/request-cmc` events. The access keeps every previous version of its `clientData`; a `consent/request-cmc` event keeps its previous versions only on a deployment with `versioning.forceKeepHistory: true` (off by default), so if your app may edit the request after it is sent, turn it on or never edit it. That way the subject can be shown the text that was originally presented, addressing the "concise, transparent, intelligible" requirement at the artefact level. Whether the artefact itself is concise + intelligible is your editorial responsibility. An operator action on the account is communicated by Pryv itself in this case: from 2.0.0-rc.60, when your administrator releases an external id the account held (`external-id-index` primitive), the account gets the `external-id-released` mail with the namespace label and the reason your administrator gave, never the id, when mail is configured (`services.email.enabled.externalIdReleased`, default on; template `services.email.externalIdReleasedTemplate`), and an `account.externalIds.adminRelease` entry in its own audit trail `[XIDAR1]`, `[XIDAR3]`. The subject reads the reason as written: the wording is yours, keep it factual and free of anyone else's data. A failed send does not undo the release (the answer then says `audit-only`), so follow up by your own channel when the mail did not go out. **Evidence** - tests: XIDAR1, XIDAR3 - docs: guides/consent.md, customer-resources/audit-setup.md - config keys: services.email.enabled.externalIdReleased, services.email.externalIdReleasedTemplate - primitives: access, clientData, event, external-id-index ### GDPR Art.13: Information to be provided where data are collected from the data subject Coverage: facilitated · effort saved: medium · mode: storage · draft Requirement: Identity of controller, purposes, legal basis, recipients, retention, rights, must be provided at the time of collection. **What Pryv does for you** The information items split across two operator-controlled surfaces: - **Deployment-wide** (controller identity, DPO contact, Terms of Service): the `serviceInfo` fields `home`, `support`, `terms`, propagated to every client app via `GET /service/info`; `app-web-auth3` renders them in its consent UI by default. Full convention treatment in `context/service-info-conventions.md`. - **Per-access** (purposes, lawful basis, recipients, retention, the specific rights notice): `access.clientData` per the convention family in `context/client-data-conventions.md`, `lawful_basis`, `purpose`, `transfer_basis`, `retention`, `consent`, `consent_event_id`, etc. (or a `consent/request-cmc` event when using CMC). Pryv keeps them with their version chain (`?includeHistory=true`): every version on an access, and on an event only with `versioning.forceKeepHistory: true`; your app surfaces them at the right moment. **Detail** **Account auto-deletion (open-pryv.io 2.0.0-rc.66, `8521c8d5`).** If you set an inactivity preset (`account.autoDeletion.inactivity.defaultDays`), it is a retention period of your platform: your privacy notice states it, with what counts as use of an account (sign-ins and the use of personal accesses, a delegate's own token included; app accesses only where you set `account.autoDeletion.inactivity.countAppUse`, since 2.0.0-rc.81; shared accesses never), as §2(a) requires. Pryv does not write that notice. What Pryv tells the account holder directly: a confirmation mail on every change of their schedule, clearing included (the deadline, or that nothing is scheduled, `[ACST15A]`, `[ACST15B]`), and reminder mails before the deletion (`[ACRM1]`), with links to change the schedule and to download the data. `account.getAutoDeletion` shows the holder the live schedule, its source and their last activity (`[ACST1]`, `[ACST2]`). See `context/data-retention-operator-owned.md` and the operator page `customer-resources/account-auto-deletion`. **Planned, implemented and not released: account transfer to a beneficiary.** Where the holder names a beneficiary with an optional name and date of birth, the reference account app and the setup confirmation are designed to tell the holder that those two fields are used only to identify a beneficiary the email cannot reach, are stored encrypted, can be read by the operator only after the transfer has started (each reading logged and reported to the holder's address), and are deleted with the transfer. The operator read method itself is deferred; whoever builds it must honour that notice as published. **Evidence** - tests: ACST1, ACST2, ACST15A, ACST15B, ACRM1 - docs: guides/consent.md, guides/privacy-by-design.md, customer-resources/account-auto-deletion.md - config keys: account.autoDeletion.inactivity.defaultDays, account.autoDeletion.inactivity.countAppUse, services.email.enabled.accountDeletionScheduled, services.email.enabled.accountDeletionReminder - primitives: access, clientData, event, account-auto-deletion - context notes: service-info-conventions, client-data-conventions, data-retention-operator-owned **Planned changes** - feature: Account transfer (implemented, not released): the holder is told, at entry and in the confirmation, when and how the operator may read a beneficiary's name and date of birth ### GDPR Art.14: Information to be provided where data have not been obtained from the data subject Coverage: facilitated · effort saved: medium · mode: storage · draft Requirement: Same disclosures as Art.13, provided within reasonable period (≤1 month, or at first communication / first disclosure if sooner). **What Pryv does for you** When you ingest data into Pryv from third parties (not directly from the subject), you still owe the same disclosures as Art.13. Pryv lets you record the disclosure artefact alongside the data, same as direct collection (`access.clientData` or a `consent/*` event), and the audit log proves when disclosure happened, useful when the 1-month / first-contact deadlines come into question. **Detail** Where the data came from (the source) is an Art.14(2)(f) disclosure item, record it in `event.clientData.source` or in a dedicated provenance stream. Together with the access carrying the disclosure-notice text, you have the full Art.14 artefact set retrievable per subject. **Planned, implemented and not released: account transfer to a beneficiary** (the release after account auto-deletion). The account holder, not the beneficiary, enters the beneficiary's email and, optionally, name and date of birth: data not obtained from the data subject. The holder chooses when the beneficiary is told: - `notifyBeneficiary: atSetup`: an email when named, saying who named them, what it means, the name / date-of-birth conditions if given, with a single-use decline link. This is the first-communication route of §3(b). - `notifyBeneficiary: atTrigger`: the first contact is the claim email at the deadline, which carries the same information. Kept as an option by product decision, it rests on §5(b) (informing earlier would defeat the holder's wish to keep the arrangement private while they use the account), with the safeguards that paragraph asks for: only the email required, the rest optional, encrypted and unreadable before the trigger, erased on cancellation, and the feature described publicly in your privacy notice. **Unconfirmed**: §5(b) is read narrowly by supervisory authorities; have your DPO or counsel confirm it for the jurisdictions you serve before your platform offers the transfer. The design has no switch restricting holders to `atSetup`; ask for one before the transfer release if you need it. Full analysis: `context/data-retention-operator-owned.md`, "Planned: transfer to a beneficiary". **Evidence** - primitives: access, clientData, event, audit - context notes: data-retention-operator-owned **Planned changes** - feature: Account transfer to a beneficiary (implemented, not released): the beneficiary is informed when named (atSetup) or at the claim (atTrigger, resting on an Art.14(5)(b) analysis that is not yet confirmed) ### GDPR Art.15: Right of access by the data subject Coverage: implemented · effort saved: high · draft Requirement: Right to obtain confirmation, access, copy of personal data + supplementary information (purposes, recipients, retention, rights, source, automated decisions). **What Pryv does for you** Your subject, holding a personal token, reads everything via the standard Pryv API, events, streams, accesses (with full history), audit records. The supplementary information (purposes, recipients) is in `access.clientData` when you recorded it there. For ready-made bundling, the `pryv-account-backup` npm tool walks the subject's API endpoints and produces a downloadable folder, operator-independent (the subject runs it with their own credentials). **Detail** Subject-side reads via standard endpoints (all reachable on v2): - `events.get`: all events - `streams.get`: all streams - `accesses.get ?includeHistory=true`: accesses + version chain (deleted accesses with `includeDeletions`, kept until the account is deleted unless the operator sets `accesses.deletionRecords.retentionDays`, opt-in since open-pryv.io 2.0.0-rc.56) - `events.get ?streams=[':_audit:*']`: audit log (the dedicated `/audit/logs` route was removed 2026-06-15; audit is a regular datastore mounted on the `:_audit:*` streams) - `webhooks.get`: webhook subscriptions - `GET /events//series`: HF data points per series-event Attachments downloadable via the events API. Recipients that are OAuth2 apps are named by Pryv itself: the grant and sessions of an operator-registered client carry `clientData.oauth.client` (`name`, `origin: "operator"`, since open-pryv.io 2.0.0-rc.80), as those of a client metadata document do (`name`, `host`, `url`, since rc.74), written by the server and not changeable by any client, so the subject's `accesses.get` names the app, not only its `oauth-grant:` access name `[OCMP22]`, `[OCMDE15]`. How much each recipient used its grant: since open-pryv.io 2.0.0-rc.84 the subject's `accesses.get` and `accesses.getOne` return, on each access and each deletion record, a `usage` object: approximate lifetime call counts per API method, also summed as reads, writes, session and other calls `[AUG1]`, `[AUG2]`, `[AUG4]`. Only the account owner's personal token (or a delegate's personal access) receives it; an app or shared access never sees the counts of other accesses `[AUG3]`. The counts need `accessTracking.isActive` (on by default) `[AUG6]`. They summarise; the audit log stays the record of each call. The reference account app (app-web-user-account 0.34.0) shows them on each access's Activity card, with a link to an Audit trail tab filtered by app, access, date or kind of call. Over time: since open-pryv.io 2.0.0-rc.86 the same personal callers can call `audit.getSummary`, which counts the audited calls per hour, day or week over a period (reads, writes, session, other calls, errors), for the whole account or for chosen accesses `[ASM1]`, `[ASM2]`, `[ASM3]`; app and shared callers are refused `[ASM4]`. It is computed from the audit log, which stays the record. `pryv-account-backup` v0.6.0 (shipped 2026-06-15; preceded by v0.4.0 2026-05-27 + v0.5.0 2026-06-13) covers, via its CLI flavour, every read-side resource: account, profiles, app profiles, streams, accesses (current + revoked/expired + opt-in per-access version history), events (monthly-chunked initial + incremental via `modifiedSince`), audit-as-events, HF series data points, webhooks, attachments, plus a per-file sha256 integrity manifest. The Art.15(1)(c) disclosure-history elements are in the raw export by default. The DSAR-completeness work is fully shipped, `proposals/account-backup-dsar-completeness.md` is `Status: SHIPPED`, all chips discharged. (The browser-webapp flavour omits attachments / HF series / webhooks / manifest, route subjects needing those to the CLI.) **Technical** Personal-token scope is the user's full namespace; no special endpoint. Implementers typically wrap this with a small subject- portal app (see `samples/get-a-copy-of-my-data/` proposal in `samples/README.md`). For ad-hoc DSARs the `pryv-account-backup` tool is the no-code path. Coverage matrix + operational-guidance-for-today live at `context/account-backup-coverage.md`. **Evidence** - tests: AA01, EGSQ, UZEV, OCMP22, OCMDE15, AUG1, AUG3, AUG4, ASM1, ASM2, ASM3, ASM4 - specs: EVENT.BASE, STREAM.BASE - config keys: accesses.deletionRecords.retentionDays, accessTracking.isActive - primitives: access, stream, event, audit, account-backup-tool - samples: who-has-access-to-my-data - context notes: account-backup-coverage ### GDPR Art.16: Right to rectification Coverage: implemented · effort saved: high Requirement: Right to have inaccurate personal data rectified without undue delay. **What Pryv does for you** `events.update` rectifies an event, and the audit log records who rectified which event and when. The prior (inaccurate) value is kept for traceability only if your deployment sets `versioning.forceKeepHistory: true`; by default the update overwrites it. Set it if you must be able to show what was corrected. **Detail** Rectification mechanics: - **API**: `events.update` (PUT /events/:id) writes the new value; with `versioning.forceKeepHistory: true` it first keeps the previous version as a history row (both built-in stores, PostgreSQL and SQLite; default `false`). The route validates the updated payload through the same ajv-draft-04 pipeline as `events.create` (`components/api-server/src/methods/ events.ts:564` middleware chain), so a "rectification" that itself fails schema validation is rejected, you can't replace one inaccurate value with another that violates the type's structural constraints. - **History retrieval**: `GET /events/:id?includeHistory=true` returns the version chain the store kept: the prior versions on a deployment with `versioning.forceKeepHistory: true`, an empty `history` otherwise. The history is queried via `mall.events.getHistory(userId, eventId)` and exposed at the implementer's API surface when requested. - **Audit trail**: every `events.update` call is in the audited methods set (`components/audit/src/ApiMethods.ts`). The audit row records the access, the time and the method, plus the event's key (id and new modification time) and the integrity hash of the event as written; per the audit-minimality posture (Q9), the request body is NOT captured. So who rectified which event and when is on record on every deployment, but the prior value exists only in the event history, which is opt-in. Where the value before correction must be demonstrable, set `versioning.forceKeepHistory: true`, or have your app record the correction as a new event that references the old one. See `context/event-history.md`. - **Detection of inaccuracy**: out of scope at the platform layer. Pryv enforces structural validity at ingest (ajv schema validation); semantic inaccuracy detection is the implementer's app responsibility. See `context/data-accuracy-structural-vs-semantic.md`. **Evidence** - tests: PTU1 - specs: EVENT.BASE - primitives: event, audit - context notes: event-history, data-accuracy-structural-vs-semantic ### GDPR Art.17: Right to erasure ("right to be forgotten") Coverage: configurable · effort saved: medium · draft Requirement: Right to obtain erasure without undue delay where one of six conditions applies (no longer necessary, withdrawn consent, no legal basis, etc.). **What Pryv does for you** Per-user erasure is a single API call (`system.users.delete`). Whether erasure extends to your backups depends on the storage engine you chose, SQLite per-user folders are deletable from filesystem backups; PostgreSQL requires a backup-rotation policy to complete erasure. **Detail** Per-engine behaviour for the live data: - SQLite, each user is a separate file under the user-data directory. File deletion removes the user from filesystem backups (depending on your backup tool's per-file semantics). - PostgreSQL, row-level erasure only. Backups are DB-engine-level snapshots; per-user erasure within a backup file requires either backup rotation (oldest pruned per policy) or a backup-rewriting procedure you build yourself. Event attachments follow your `storages.file.engine` choice (filesystem / s3 / postgresql, the latter two since open-pryv.io 2.0.0-rc.2). Account deletion routes attachment removal through the fileStorage interface, so live copies are erased on all three engines. Backup residue differs per engine: filesystem attachment directories follow your file-backup tool's semantics; S3 buckets may retain deleted-object versions (disable versioning or add a lifecycle rule if erasure must extend there); PostgreSQL-stored attachments live in the same `pg_dump` artefacts as user rows, so the backup-rotation policy above covers them with no extra step. Erasure here is **caller-triggered**, the subject (or operator on their behalf) issues the DELETE call, or **scheduled** by the subject or by your inactivity preset (account auto-deletion, below). Event-level and stream-level scheduled erasure under Art.5(1)(e) "storage limitation" stays operator-owned by design, see Art.5 detail + `context/data-retention-operator-owned.md` for the retention-job pattern that composes `events.delete` + `auth.delete` + the audit log. Account auto-deletion, since open-pryv.io 2.0.0-rc.66 (`8521c8d5`). The data subject schedules the erasure of their own account (`account.setAutoDeletion`, from the reference account app): at a date, or after a period without use. That is their own erasure request (§1(a): they judge the account no longer necessary; §1(b): where your processing rests on consent, the schedule is a withdrawal that takes effect at a date), not a retention rule of yours. Arming or bringing a deletion nearer needs the account password (`[ACST3]`, `[ACST4]`); a delegate can read the schedule but not set it (`[ACST5]`); a holder can schedule only what they could do directly (the `delete` action is offered where `user-account.delete` lists `personalToken`, `[ACST10]`; a deletion the holder chose waits if self-deletion was withdrawn since, `[ADSW27]`); every change is confirmed by mail (`[ACST15A]`) and reminders precede the deletion. At the deadline the core's sweep re-reads the account's use (a use between evaluation and erasure wins, `[ADSW16]`), runs the same deletion guards (a refusal holds the erasure and is mailed once, `[ADSW8]`) and the same erasure as `auth.delete` (relationships torn down, audit per `audit.onUserDelete`), logs it before and after, and with `audit.onUserDelete: keep` writes an `account.autoDeletion.erase` row in the account's trail first (`[ADSW17]`). An erasure interrupted halfway, by the sweep or by a direct `auth.delete`, is completed at a later pass (`[ADSW19]`); `account.autoDeletion.maxDeletionsPerPass` (20) caps a pass (`[ADSW12]`). An operator preset (Art.5 §1(e)) uses the same path. See `context/data-retention-operator-owned.md`, "Account-level auto-deletion", and the operator page `customer-resources/account-auto-deletion`. `bin/backup.js` supports per-user backup files alongside DB-engine backups; using per-user backups improves erasure semantics regardless of engine. Incremental `bin/backup.js` chains (open-pryv.io 2.0.0-rc.51): a run made without `--user` records that it covers the whole core, and a restore drops any account such a run no longer lists, so an account erased between two runs is not re-created by restoring the chain (the dropped names are logged) `[BKCU1]`, `[BKIC4]`. The earlier runs still hold its data: `--through-run ` of a run that held it restores it as of then, and `--inspect` lists the accounts deleted along the chain. Erasure reaches the chain only when you retire the runs that hold the account, so put chain retention in the same rotation policy as the rest of your backups. Since 2.0.0-rc.86 an account erased while a full backup runs is left out of that run (earlier releases backed it up empty and created its directory and empty databases again on disk) `[BKDU1]`. Audit-log erasure converges across engines (since 2026-05-27, open-pryv.io master `891090d` + `853e1cb`). `auth.delete` now includes an explicit `deleteAuditDataStorage` middleware that calls `auditStorage.deleteUser(userId)` regardless of the configured audit engine. SQLite + PostgreSQL audit deployments converge on the same end-state: zero audit rows for the deleted subject. The `[USAD]` test suite asserts engine-agnostically via `auditStorage.forUser(userId).countEvents() === 0`. Operator setting `audit.onUserDelete` (shipped in `405b3a1`) gates the behaviour: - `erase` (default), runs the audit erasure (GDPR Art.17 / CCPA §1798.105 / PIPEDA Principle 4.5 default). - `keep`: skips the wipe with an info-log. For HIPAA §164.316(b)(2)(i) (6-year audit retention), MDR Art.10(8) (10-year device-history retention), or any regime keeping the audit under a separate lawful basis (GDPR Art.17(3)(b)). The operator documents the retention in their DPIA. - `pseudonymise`: REFUSED AT BOOT by `config/plugins/config- validation.js`. The `auth.randomAlias` primitive it builds on has now shipped (`accesses.create {randomAlias:true}`); the audit-row PII null-out mode itself (composing the alias into audit records while preserving forensic value) is still the outstanding piece before this mode can be enabled. `keep` holds on both audit engines since open-pryv.io 2.0.0-rc.46: on the SQLite audit engine the per-user audit database file stays at its path in the user directory, readable by user id, and everything else in the directory is removed `[DKP1]` (before 2.0.0-rc.46 the directory wipe erased it, so `keep` behaved like `erase` there; open-pryv.io#154). What an account deletion reaches, as of open-pryv.io 2.0.0-rc.50 (fixes from the 2026 code-level security review, `context/code-security-review-2026.md`): - **High-frequency series under every name of the account**: its username, each alias and every former username (a username change keeps the former name as an alias), whichever name the deletion is addressed by (2.0.0-rc.47) `[DLN1]`, `[DLN4]`; the series are dropped again as the last step, so points written during the deletion do not survive it (2.0.0-rc.50) `[DLLW1]`. Before 2.0.0-rc.47 a deletion addressed by an alias, or made after a username change, left series behind. - **Relationships with other accounts** (2.0.0-rc.47): as a delegate, its tokens, control accesses and what it granted through the delegation are removed on each controlled account `[DADL02]`; each CMC counterparty receives the revocation a consent withdrawal sends and deletes the access it held `[CN82]`. Never holding the deletion; an account on another core needs that core to run 2.0.0-rc.47 or later. Unlike a consent withdrawal's notice, which the retry loop re-sends since open-pryv.io 2.0.0-rc.53 (https://github.com/pryv/open-pryv.io/issues/157), these notices are sent once and not queued (no account is left to hold them): a counterparty that could not be reached keeps the access it held (whose token the erased account held) until it expires or is deleted there. A deleted group account (group accounts over CMC, 2.0.0-rc.53) first has its members' accesses on patient accounts deleted through the patients' grants, with no record kept `[GA40]`, `[MR28]`. - **Webhooks stop at once** (2.0.0-rc.50) `[DLWH1]`, and pending password-reset requests of every name are destroyed (2.0.0-rc.47) `[RPLC13]`. - **One refusal** (2.0.0-rc.50): `DELETE /users/:username` with the account's personal token is refused while the account is the delegate of an account that has no email (that account would be left with no way in); setting an email on it lifts the refusal, and a deletion with the admin key goes through and is logged `[DADL08]`. - **External ids are released** (2.0.0-rc.58, `external-id-index` primitive): the account's links to third-party record ids are removed from its home core and from the platform index at once, so the same record id can be linked to another account, and the erasure keeps no trace of them `[XIDD2]`. A failure at that step does not stop the deletion: the rows it leaves point at an account that no longer exists, and `bin/reconcile-user-cores.js --ext-ids` releases them. The index never held the record id itself. From 2.0.0-rc.60 the per-user backup carries the account's ids (namespace, blinded value, claim date): restoring an erased account from such a backup links them again, unless another account has claimed one since, which keeps it `[XIDBK1]`, `[XIDBK2]`. Erasure reaches those ids in your backups when you retire the backups that hold the account, as for the rest of its data. If you erased accounts on earlier releases after a username change or through an alias, check the series storage for leftovers under the former names. Personal data left by a failed or interrupted registration can sit under no finished account, out of reach of `system.users.delete`. From the release after open-pryv.io 2.0.0-rc.87, `bin/reconcile-user-cores.js --registrations` clears such account fields and, when you name it, erases an indexed account left without a password through the account deletion's erasure `[RCRG1]`, `[RCRG3]`; use it when such a person asks for erasure. Details and safeguards under Art.5 §1(e). **Technical** Tested via `[USAD]` (`open-pryv.io/components/api-server/test/deletion-seq.test.js`, exercises the `user-account.delete` config-dependent path). Pipeline source: `components/business/src/auth/deletion.ts` (`deleteAuditData` step) + `components/api-server/src/methods/ auth/delete.ts` (middleware registration). **Evidence** - tests: USAD, DKP1, DLN1, DLN4, DLLW1, DADL02, CN82, DLWH1, RPLC13, DADL08, BKCU1, BKIC4, GA40, MR28, XIDD2, XIDBK1, XIDBK2, ACST3, ACST4, ACST5, ACST10, ACST15A, ADSW8, ADSW12, ADSW16, ADSW17, ADSW19, ADSW27, BKDU1, RCRG1, RCRG3 - docs: customer-resources/account-auto-deletion.md - config keys: storages.userAccountStorage.engine, user-account.delete, audit.onUserDelete, account.autoDeletion.enabled, account.autoDeletion.maxDeletionsPerPass - primitives: event, stream, backup-restore, external-id-index, account-auto-deletion - samples: scheduled-retention-job - context notes: data-retention-operator-owned, code-security-review-2026 ### GDPR Art.18: Right to restriction of processing Coverage: configurable · effort saved: medium · draft Requirement: Right to obtain restriction (data stored but not processed) in defined circumstances. **What Pryv does for you** Restriction is achieved by mutating the access, scope-down via `accesses.update` (narrower permissions) or full revoke via `accesses.delete`. Versioning preserves the pre-restriction state so the change is auditable. No dedicated "restriction flag", the access mutation IS the restriction primitive. **Detail** Article 18 envisions restriction as a temporary state where data is stored but not processed. With Pryv: - Data continues to live in events / streams (unchanged). - Processing (= API access through an access token) is restricted by lowering the relevant access's `permissions` to `none` on affected streams or by deleting the access. - The access-version chain proves when the restriction took effect and what state was in force before. You may also surface a restriction flag in `access.clientData.restriction_reason` for record-keeping (Art.30 register entry). **Evidence** - tests: AA02, ACCP - config keys: access.permissions - primitives: access, permissions ### GDPR Art.20: Right to data portability Coverage: implemented · effort saved: high · draft Requirement: Right to receive personal data concerning subject in structured, commonly used, machine-readable format; right to transmit to another controller. **What Pryv does for you** `events.get` + `streams.get` return canonical JSON validated against the data-types schemas, structured, commonly used, machine-readable. Attachments downloadable. No proprietary lock-in: another Pryv operator can import the data into a new account via standard write APIs. **Detail** Export shape is the same JSON the data subject (or their delegated app) would see at any time via the API. You can wrap this in a "download my data" UI; the underlying primitive needs no special export endpoint. Account fields export as typed events too. Since open-pryv.io 2.0.0-rc.44 the account email stream returns the address as `email/string` and, when requested by type, a read-only `verification/email` event that the server derives at read time (never stored, cannot be written). The latter is not portable: a write of it is refused, and the receiving deployment derives its own from how the address is proved there. Account events also carry the time their value was set (they carried the read time), so an incremental export with `modifiedSince` fetches them only when they changed. Direct controller-to-controller transmission (§2) is supported via the CMC capability flow: a single-event-scoped capability access mints a URL the receiving controller can read once. **Portability of custom event types**: deployments using a custom event-type catalogue (via `service.eventTypes`, see `context/custom-event-type-catalogues.md`) export the same canonical JSON shape for custom types as for upstream `pryv/data-types` types, they're first-class in the validation + serialisation pipeline. Receiving Pryv.io deployments that ship the same catalogue (or a superset) can import the events without loss. A receiving deployment without the custom catalogue would reject unknown types at write-time validation, the implementer ensures schema alignment between transmitting + receiving operators when relying on §2 controller-to-controller transmission. **Calendar interoperability (adapter):** beyond raw JSON, Pryv data can be exposed in a ubiquitous interchange standard. The calendar adapter serves selected events as an iCalendar (RFC 5545) subscription feed any calendar client can read, and ingests an external iCalendar feed back into Pryv as `calendar/ical-event` events (well-known fields in structured `content`, the verbatim VEVENT in `clientData._raw`). Adapters are discoverable via the `/service/info` `adapters` field. This widens portability from machine-readable JSON to a standard the subject's existing tools already consume, lowering the implementer's integration burden. **Evidence** - tests: EGSQ, ATM03, SIB08, SIB10 - specs: EVENT.BASE, STREAM.BASE - primitives: event, stream, data-types, account-backup-tool - samples: cross-account-share - context notes: custom-event-type-catalogues ### GDPR Art.21: Right to object Coverage: facilitated · effort saved: medium · mode: primitive · draft Requirement: Right to object to processing based on legitimate interests or public interest; absolute right to object to direct marketing. **What Pryv does for you** Pryv doesn't do profiling or marketing itself, but if your app does either using Pryv-stored data, your subjects have the right to object. **The mechanism is the same as Art.7(3) withdrawal (Q19)**, `DELETE /accesses/:id` or `accesses.update` to narrow permissions; Pryv's primitives are basis-agnostic. The legal distinction between Art.21 objection (legitimate-interests / public-interest basis) and Art.7(3) withdrawal (consent basis) is semantic, not technical. Record the objection on the access's `clientData` per the consolidated convention catalogue at `context/client-data-conventions.md`. **Detail** For direct marketing (absolute right per §2), the typical pattern is: - Subject submits objection (via your app's UI). - You record the objection event (e.g., a custom `consent/object-marketing` event or a flag in `account.clientData.marketing_objection`). - You revoke or narrow the access used by the marketing process → versioned, auditable. - Subsequent marketing-process runs see the access is gone / narrowed → no processing happens. For Art.21(1) objections (legitimate interests / public interest), same pattern; you also need a "compelling legitimate grounds" review process before deciding to override the objection. Record the operator-side review outcome on the access's `clientData.objection_outcome` (one of `"honoured"`, `"overridden_compelling_grounds"`, `"out_of_scope"`) plus a free-text `clientData.objection_rationale` pointing at the legal-basis document, both versioned + audit-traceable via access-versioning (`context/access-versioning.md`). For Art.21(5) transparency ("right to object presented clearly and separately from any other information at the time of the first communication"), same convention family as Art.7 consent text: persist the notice on `clientData.objection_notice` so the version chain proves what the subject was told when the access was minted. See `context/client-data-conventions.md` for the full catalogue. **Evidence** - primitives: access, permissions, clientData, event - context notes: client-data-conventions, access-versioning ### GDPR Art.19: Notification obligation regarding rectification / erasure / restriction Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Controller shall communicate any rectification, erasure or restriction of processing carried out per Art. 16-18 to each recipient to whom the personal data have been disclosed, unless impossible or disproportionate effort. **What Pryv does for you** The recipients are derivable from Pryv data, the accesses the controller has minted to third parties. When you exercise an Art. 16-18 action that affects events held by those recipients, iterate the active accesses and notify each holder out-of-band. For CMC-paired counterparties, the `consent/revoke-cmc` or a custom `notification/rectification` event provides a structured notification channel. **Evidence** - derives from: gdpr.Art.16, gdpr.Art.17, gdpr.Art.18 - primitives: access, audit, CMC ### GDPR Art.22: Automated individual decision-making, including profiling Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Data subject has the right not to be subject to a decision based solely on automated processing (including profiling) which produces legal effects concerning them or similarly significantly affects them. Three exceptions in §2 (contract, EU/MS law, explicit consent); §3 + §4 add safeguards (human intervention, special- category restrictions). **What Pryv does for you** Pryv doesn't run automated decisions, that's your application logic. What Pryv contributes when Art.22 applies: (1) the audit log proves which inputs were read for the decision; (2) the decision output can be written as a Pryv event with the input reference + the decision logic version captured in `clientData`, making "human intervention" requests tractable (the subject can locate the specific decision record); (3) the consent basis for §2(c) lives on the access's clientData like every other consent record. **Detail** Recommended pattern when you run Art.22 processing: - Mint a dedicated access for the automated-decision app with `clientData.processing_purpose = "automated_decision_making"` + `clientData.art22_basis = "(a) contract" | "(b) law" | "(c) consent"`. - Write the decision output as an event on a designated `decisions/*` stream with `clientData.input_audit_ref` pointing back to the audit-row range that fed it + `decision_logic_version`. - When a subject requests human intervention, your portal looks up that event and presents the trail to the human reviewer. **Evidence** - primitives: audit, event, access, clientData ### GDPR Art.24: Responsibility of the controller Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Taking into account the nature, scope, context, purposes of processing + risks for rights and freedoms of natural persons, controller shall implement appropriate technical + organisational measures to ensure and demonstrate processing is performed in accordance with the Regulation. **What Pryv does for you** Art. 24 is the umbrella controller-accountability obligation that ties every other Chapter-IV row together. Pryv contributes the technical- measures substrate (this matrix enumerates it explicitly) + the technical-measures demonstrability (audit log + access version chain are the evidence layer). The organisational- measures programme is yours. **Evidence** - derives from: gdpr.Art.5, gdpr.Art.25, gdpr.Art.32, gdpr.Art.30 - primitives: access, permissions, audit, encryption-at-rest-secrets, letsEncrypt-integration, MFA, backup-restore ### GDPR Art.26: Joint controllers Coverage: facilitated · effort saved: low · mode: awareness · draft Requirement: Where two or more controllers jointly determine purposes and means of processing, they are joint controllers. They shall, in a transparent manner, determine their respective responsibilities for compliance with the Regulation by means of an arrangement. **What Pryv does for you** **CMC is NOT a joint-controller pattern by default.** Pryv's CMC primitive requires **subject validation**, User A's `consent/accept-cmc` event is what authorises any cross-account data flow to User B's operator. Each operator remains the **sole controller** for their respective user's data; the lawful basis for B's processing of A's data is A's CMC consent record (Art.6(1)(a)), not a controller-to-controller agreement. This is controller-to-controller transmission *via subject consent* (Art.20(2) lineage), not Art.26 joint controllership. Real Art.26 fires only if Operator-X + Operator-Y separately decide to jointly process a category of subjects' data, outside the CMC primitive. **Detail** **Art.26 test**: "two or more controllers JOINTLY determine purposes and means". In a CMC share: - The **purpose** is declared in A's `consent/request-cmc` event (or accepted from B's request), A determines whether to consent. - The **means** are A's access permissions + B's access scope, both anchored to A's accept event. - Neither operator decides on behalf of both; subject A is the determiner. So a CMC share does NOT trigger Art.26. It's covered by: - **Art.6(1)(a)** (consent), A's consent is the lawful basis for B's operator to process A's data. - **Art.20(2)** (data portability, transmit to another controller), the act of CMC delivery is "transmission to another controller" with subject's consent. - **Art.13/14** (transparency), each operator carries their own transparency obligation to their respective user; A's operator informs A about who receives the data; B's operator informs B about what data they received + the lawful basis (A's consent). **Where Art.26 actually applies**: when two operators run a joint research programme, joint health platform, or shared-purpose service where both decide on processing independently of subjects' individual choices. In that case, the arrangement IS the operator-side contract; Pryv's contribution is `clientData.joint_controller_arrangement` on the relevant accesses (point to the written agreement) + the "essence" of the arrangement in `clientData.privacy_notice` for Art.26(2). This is operator-edited metadata, no Pryv primitive enforces it. Full CMC-vs-Art.26 reasoning in `context/cmc-consent-primitives.md`. **Evidence** - primitives: access, clientData, CMC - context notes: cmc-consent-primitives ### GDPR Art.27: Representative of controllers / processors not established in the Union Coverage: out-of-scope · draft Requirement: Where Art. 3(2) applies, controller or processor not established in the Union shall designate in writing a representative in the Union, except where processing is occasional, doesn't include large-scale special-category data, etc. **What Pryv does for you** Representative designation is a contractual + regulatory registration step. No software role. ### GDPR Art.29: Processing under the authority of the controller or processor Coverage: facilitated · effort saved: high · mode: primitive · draft Requirement: Processor and any person acting under the authority of the controller or processor, who has access to personal data, shall not process those data except on instructions from the controller. **What Pryv does for you** "Only on instructions" is enforced operationally through the access primitive, workforce / contractor / app accesses are scoped to specific streams + levels per the controller's instructions, and the audit log proves what was actually done. Violations show as out-of-scope access attempts or unauthorized method calls in the audit data. **Detail** Where a workforce shares one access, the audit log ties an action to a person through the `callerId` your app forwards; see `context/workforce-access-patterns.md`, Pattern 1. **Group accounts over CMC** (open-pryv.io 2.0.0-rc.53, release commit `61fb28dd`, https://github.com/pryv/open-pryv.io/issues/158). For a team sharing one account (the controller's or its processor's) that reaches data subjects through cross-account consent, each member processes a subject's data under an access of their own: issued only through a membership the group's administrator approved `[GA01]`, limited to the member's team streams and to the stream permissions of the subject's consent `[GA12]`, `[GA15]`, named on the subject's account (the member and the group stamped by the subject's core) and audited under its own id `[GA10]`, and deleted when the membership ends `[GA20]`. The instructions themselves (who may join, which teams they get) stay the controller's. See `context/workforce-access-patterns.md`, Pattern 3. **Evidence** - tests: CMCGA, GA01, GA10, GA12, GA15, GA20 - derives from: gdpr.Art.28 - primitives: access, permissions, audit, CMC - context notes: workforce-access-patterns ### GDPR Art.25: Data protection by design and by default Coverage: facilitated · effort saved: high · mode: infrastructure · draft Requirement: Controller shall implement technical + organisational measures designed to integrate data-protection principles; default settings shall be privacy-protective. **What Pryv does for you** Pryv's whole architecture leans privacy-by-design, per-user storage isolation, stream-scoped permissions, separate personal/app/ shared access types, privileged data on system streams. Your defaults (token scopes, audit-on, retention) are the part still in your hands. **Detail** Pryv's architecture is privacy-by-design **by founding pattern**, not retrofitted. Canonical treatment + the 12-default catalogue: `context/privacy-by-design-and-default.md` (matrix-internal); customer-facing surface [`pryv.github.io/guides/privacy-by-design.html`](https://pryv.github.io/guides/privacy-by-design.html). **Architectural commitment (§1)**: the topology: Data Governance + Access Control + Audit-per-Subject as separate layers that every process traverses; not direct personal-data access with after-the-fact audit (the PbD anti-pattern). Process registry is self-documented via `GET /accesses` + audit log (= the Art.30 records-of- processing register, derivable on demand). **Data-model commitment**: streams + events segregated by data-subject AND context. Granular consent (each access targets a specific stream subtree, not a wall of tables); adapt data collection per subject without schema migration. Substrate for Art.5(1)(c) minimisation + Art.7 granular consent + Art.17 erasure + Art.20 portability. **By-default catalogue (§2)**: 12 platform defaults that satisfy "by default, only data necessary for each specific purpose are processed": 1. **Default-deny on permissions** (empty `permissions: []`). 2. **Audit-on by default** (invariant, no opt-out). 3. **TLS enforced** (optional Let's Encrypt integration). 4. **Hosting region pinned per user** (Q12 architectural residency). 5. **Stream-permission granularity** (Q22, no "public" tier exists). 6. **Data-minimal audit** (Q9, never captures request body). 7. **Schema validation at ingest** (Q21, ajv-draft-04 rejects out-of-shape payloads by default). 8. **Zero mandatory subprocessors** (Q23, every integration opt-in). 9. **Audit-minimal logger** (Q23, `inspectAndHide` credential redaction invariant, `[BIH1-6]` tests). 10. **CMC requires explicit subject consent** (`consent/accept-cmc` blocking). Since open-pryv.io 2.0.0-rc.38 the channels it opens are bounded by that consent too: the person's accept may narrow the offer's `features` but never widen them, and a relationship without chat gets no chat stream or chat permission on either side `[HA43]`, `[HA44]`, `[CN62]`, `[CN63]`. Chat and system messaging are on unless your offer turns them off, so leaving out a channel your purpose does not need is your offer-design choice. 11. **PlatformDB encrypted secrets** (LE + observability patterns). 12. **Withdrawal API exists by default** (Q19, `DELETE /accesses/:id` always available). **Still in your hands (Art.25 §2, operator's by-default settings)**: - Are app tokens minted with the smallest possible scope? - Is your subject's notice-of-collection on by default? - Is data retention set to the shortest necessary period? One retention Pryv applies for you on request: since open-pryv.io 2.0.0-rc.56 the deletion records of accesses (kept by default until the account is deleted) are purged once a day past `accesses.deletionRecords.retentionDays` `[ADP1]`, `[ADR5]`; past it an audit row names such an access by id only, so weigh minimisation against attribution. Since open-pryv.io 2.0.0-rc.66 (`8521c8d5`), account auto-deletion makes the retention of accounts a setting. Its default deletes nothing (no operator preset, `[ACCF1]`; accounts without a policy get no schedule, `[ACXP13]`); you may set an inactivity preset (`account.autoDeletion.inactivity.defaultDays`) as your retention rule, and each holder may schedule their own account's deletion. A preset's clock starts the day it first applies to an account (`[ACXP2]`), reminders and a 7-day minimum notice precede every deletion (`[ACXP8]`), `dryRun: true` shows what a preset would do before you arm it (`[ADSW13]`), and `maxDeletionsPerPass` caps the deletions of one pass (`[ADSW12]`). - Is your auth UI surface using the opt-in pattern (privacy-by-default UX from the dev-site reference) rather than the standard "by continuing you agree" anti-pattern? Cross-service identity by design (open-pryv.io 2.0.0-rc.58, `external-id-index` primitive, https://github.com/pryv/open-pryv.io/issues/161): when several of your services know a person by the same third-party record id (an EHR patient id), they can find the one account linked to it without the platform ever holding the id. Each service sends a value it blinds with its own namespace key; the replicated index maps that value to a core, never to an account; only the account's personal token can link or unlink it, and no response, log line or audit record carries the value `[XIDC1]`, `[XIDC2]`, `[XIDG1]`. The lookup is unauthenticated and budgeted per address `[XIDLU1]`, `[XIDLU2]`. Since open-pryv.io 2.0.0-rc.59 an invitation can be record-bound (forced mode): the app receives a credential only for the account that holds the id, checked by the server when the sign-in is accepted, and the sign-in never links an id by itself `[XIDFF1]`, `[XIDFF3]`, `[XIDFF4]`. Whoever holds a blinded value before the person claims it can claim it first with another account (a denial, never a data flow); from 2.0.0-rc.60 your administrator can remove such a link with the admin key, and the account that held it is told by mail and in its own audit trail `[XIDAR1]`, `[XIDAR3]`. What stays yours: who holds the namespace key (every holder can look up and claim ids of that namespace), the decision to release an id and the reason you give the holder, and, if you need the plaintext record id, keeping it as ordinary data in the person's own account. Public boundary statement: [External ids](https://pryv.github.io/customer-resources/external-ids/). Privacy-enhancing technologies (PETs) catalogued in the dev-site guide: pseudonymisation (partial, `ALIASES` backlog upgrades), proxy re-encryption (`E2E-ENCRYPTION` backlog + the github.com/perki/test-proxy-re-encrypt PoC), homomorphic encryption + differential privacy + MPC (out-of-scope at platform layer; implementer's enrichment path). **Evidence** - tests: ADP1, ADR5, XIDC1, XIDC2, XIDG1, XIDLU1, XIDLU2, XIDFF1, XIDFF3, XIDFF4, XIDAR1, XIDAR3, ACCF1, ACXP2, ACXP13, ADSW12, ADSW13, ACXP8 - docs: customer-resources/account-auto-deletion.md - config keys: accesses.deletionRecords.retentionDays, account.autoDeletion.inactivity.defaultDays, account.autoDeletion.dryRun, account.autoDeletion.maxDeletionsPerPass - primitives: access, permissions, stream, system-streams, external-id-index, account-auto-deletion - context notes: privacy-by-design-and-default ### GDPR Art.28: Processor Coverage: facilitated · effort saved: medium · mode: storage · draft Requirement: Where processing is to be carried out on behalf of a controller, the controller shall use only processors providing sufficient guarantees to implement appropriate technical + organisational measures. Processing by a processor shall be governed by a contract setting out subject matter, duration, nature + purpose, type of data, obligations and rights of the controller. **What Pryv does for you** When the Pryv operator and the controller are distinct legal entities (typical SaaS arrangement), the operator is the Art.28 processor. Pryv-the- software provides the technical substrate the §1 "sufficient guarantees" evaluation rests on (this matrix enumerates it); the data-processing-agreement (DPA) under §3 is the operator's contract. Audit log + access primitives carry "documented controller instructions" (§3(a)) and the records that demonstrate compliance (§3(h)). **Detail** **Zero mandatory subprocessors.** Pryv-the-software ships with no required third-party-service relationships. The default deployment (operator's chosen cloud provider only, opaque to Pryv) has no sub-processors from the platform's perspective. Every external integration is opt-in through config. **Opt-in integration inventory (§2 + §4 sub-processor list when activated)**, see `context/subprocessor-posture-and-data-flow.md` for code anchors + per-integration data-flow analysis: | Config gate | Subprocessor | What flows out | |---|---|---| | `letsEncrypt.enabled: true` | LE (or any `letsEncrypt.directoryUrl` ACME CA) | hostnames only for ACME challenges; **no user data** | | `services.email.smtp.*` | operator's SMTP relay | email + name + one-time tokens (templated bodies), PII. **Pryv recommends per-core SMTP configuration**, the `services.email.smtp.*` config block is per-core, so an EU core routes mail through an EU SMTP relay independently of a US core's relay. Use this when residency is a hard requirement (e.g., EU subjects' password-reset emails never touching a US-jurisdiction relay) | | `services.mfa.mode: enabled` + `sms.endpoints[*]` | operator's SMS provider | phone number + MFA code, PII | | `observability.enabled: true` + an OTLP endpoint | Whichever backend that endpoint belongs to, any OTLP-ingesting service, or none at all if it points at a collector the operator hosts | per-method metrics + sanitized error stack traces, built from a fixed allow-list before egress (see Layer 3 below) | | `service.eventTypes: https://...` | upstream catalogue host | **no personal data flows out**, fetch-only of JSON Schema fragments | **Let's Encrypt posture (operator clarification)**: ships as a **dev-platform facilitator**: the easy on-ramp for `*.pryv.me`- style dev clusters. **Production deployments should treat CA choice as an operator decision.** Keep LE if its compliance posture matches yours, swap to a commercial CA / internal CA / air-gapped issuance pipeline if not. The ACME orchestrator reads `letsEncrypt.directoryUrl`, so any ACME-compatible CA drops in without code changes. **Data-flow guarantees that limit subprocessor exposure**, three real layers, each tested: 1. **Audit-by-construction (Q9)**: audit captures method + access ref + URL query (incl. content-query search values on the GET path, see `context/content-query-audit-semantics.md`) + integrity hash; **never the request body**; `auth=` query-string params stripped. `components/audit/src/Audit.ts:151-166`. 2. **Logger sanitization**: every `logger.{info,warn,error, debug}` call passes args through `inspectAndHide` (`components/boiler/src/logging.ts:253-298`): object keys `password`/`passwordHash`/`newPassword` → `'(hidden password)'`; string regex `auth=c[a-z0-9-]*` → `'auth= (hidden)'`; serialised JSON password fields → `'$1=(hidden)'`. Tested by `[BIH1]`-`[BIH6]` in `components/api-server/test/boiler-inspectAndHide.test.js` + `system-seq.test.js:533`. Honest scope: redacts credentials, not PII broadly, emails / usernames / event payloads only leak if a caller explicitly logs them. 3. **Observability allow-list** (when observability is opted into), telemetry is constructed by the platform from a compile-time allow-list at `components/business/src/observability/schema.ts` and shipped over OTLP/HTTP. No vendor or OpenTelemetry SDK runs in the process and nothing is auto-instrumented, so the emitted surface is fixed in source rather than filtered out of an agent's collection. Emitted: per-API-method call counts, duration histograms and error counts, labelled only with a method id from the platform's own API registry, a status class and an error code from the published error id list; service name and version, core FQDN and worker index; and, for server-side faults, the error class plus a stack trace with frames rewritten repository-relative. Request URLs, query and route parameters, bodies, headers, usernames, record identifiers, log records and error **message** text have no key in the schema and therefore no code path to the backend; datapoints outside the vocabulary are dropped and counted. Error reports are aggregated by fault and stamped at the reporting interval rather than the instant of failure, and the instance id is the machine hostname and never derived from the service URL, so the two correlation handles that would otherwise re-identify activity are removed. The destination is a URL plus an auth header, so an operator pointing it at a collector they host themselves has no third-party processor here at all. Claim to rely on: **anonymous by construction, with a residual correlation risk at very low traffic volumes** (where one error in an interval may be the only active user's). Where that residual applies, treat the telemetry as personal data and keep Art.28 in scope for an external destination. ⚑ **Correction of record:** before 2026-07-27 this layer was an in-process vendor agent whose scrubbing config lived in a file the agent does not discover, so it was inert and enabled deployments ran on vendor defaults (request URLs, `Host`, route parameters carrying the username, forwarded log records). That was fixed on 2026-07-27 and the agent was then removed entirely, because a control that works by enumerating what must not escape a collector that sees everything is only as strong as that collector's defaults. Full account: `context/subprocessor-posture-and-data-flow.md`. **§3(g) deletion / return of personal data at the end of provision**, `bin/backup.js` + `system.users.delete` cover both directions. **§3(h) auditability**: the operator demonstrates compliance partly via Pryv's audit log + this compliance matrix (evidence-backed assertion structure). **Future: machine-readable subprocessor inventory**: the planned `GET /system/admin/config/effective` admin route (`CONFIG-EFFECTIVE-EXPOSURE` per `UPDATE-TRIGGERS.md`) will expose the merged effective config per core as a single JSON artefact the operator's DPA register + Art.30 records-of-processing pipeline can consume directly. Until then, the operator reads `override-config.yml` + per-host overlays + identifies non-default integrations by hand. **Evidence** - primitives: audit, access, clientData, encryption-at-rest-secrets, letsEncrypt-integration, observability-provider - context notes: subprocessor-posture-and-data-flow, content-query-audit-semantics ### GDPR Art.30: Records of processing activities Coverage: implemented · effort saved: high Requirement: Each controller + processor shall maintain a record of processing activities under its responsibility (purposes, categories, recipients, transfers, retention, security). **What Pryv does for you** The combination of access + clientData + audit + (cross-account) CMC + data-residency IS your Article 30 register: who, what, why, when, recipients, transfers, retention, all derivable per-subject and per-time-window from primitives Pryv records continuously. **Detail** Register field → Pryv data source: | Article 30 field | Pryv source | |---|---| | Controller / processor identity | your operator metadata + audit user identity | | Purpose | `access.clientData.purpose` (by convention) | | Categories of data subjects | derived from user-account metadata | | Categories of personal data | event `class/format` from data-types | | Categories of recipients | counterparty `access` (CMC pair) | | Transfers to third countries | CMC counterparty `apiEndpoint` host + chosen hosting | | Retention | `access.clientData.retention` + `access.expires` | | Security measures | covered in Art.32 | Audit row → access ref (with serial) → consent state at that moment. Recoverable per data-subject + per-time-window + per-purpose. **Technical** Audit data lives in per-user SQLite (`open-pryv.io/components/audit/`); `audit.get` API method exposes it with access-time + method + access reference. Since open-pryv.io `07b6d3b6`, OAuth2 authorization-server activity (`oauth.*`: consent granted, code exchanged, token issued / refreshed / revoked) is recorded in the same per-user trail, so the register's "recipients" derivation covers how a delegated app's access came to exist, not only its subsequent reads. The audit row content is data-minimal by construction, it carries action + source (transport + ip) + URL query + access ref + integrity hash, never the request body. So the Article 30 register derived from audit doesn't itself raise Art.5(1)(c) data- minimisation concerns + survives Art.17 erasure of the underlying events with no residual personal data attached to the audit rows themselves (only opaque method names + access ids remain). One caveat: content-query search values submitted over HTTP GET are part of the recorded URL query and survive erasure of the matching events; they are the caller's request, not the subject's data. See `context/content-query-audit-semantics.md`. **Evidence** - tests: UZEV, TJ8S, AA01 - docs: customer-resources/audit-setup.md, guides/audit-logs.md - primitives: access, clientData, audit, CMC, data-residency - context notes: content-query-audit-semantics **Planned changes** - feature: Chained / signed audit log makes the Article 30 register tamper-evident - feature: Read-only effective-configuration endpoint turns the §1(g) description of technical security measures into emitable evidence ### GDPR Art.32: Security of processing Coverage: facilitated · effort saved: high · mode: infrastructure · draft Requirement: Controller + processor shall implement appropriate technical + organisational measures: pseudonymisation, encryption, ongoing CIA, restoration, regular testing. **What Pryv does for you** Multi-aspect article, Pryv implements several aspects for you (access control, restoration) and provides configurable controls for others (encryption-in-transit, encryption-at-rest, pseudonymisation, data residency). Organizational measures (regular testing, incident response procedures) stay in your court. **Detail** Per-aspect: - Encryption in transit: CONFIGURABLE, the core terminates TLS when `http.ssl.*` is configured (certificates issued and renewed by the built-in Let's Encrypt integration when `letsEncrypt.enabled` is set), otherwise it serves plain HTTP and your reverse proxy terminates TLS; the core sets no TLS version of its own (Node.js defaults, a TLS 1.2 floor on Node 24). Between cores, Raft runs over mTLS once `bin/bootstrap.js` has written `storages.engines.rqlite.tls` (default plain TCP). Behind a proxy that terminates TLS, set `hostedSites..hsts: always` so the sites the core hosts (e.g. the account web app) still send `Strict-Transport-Security` (open-pryv.io 2.0.0-rc.34; by default the header is sent only when the core terminates TLS). - Encryption at rest: CONFIGURABLE, the `container-encrypted-volume` companion (opt-in `CEV_ENABLED`) provisions an encrypted volume covering the full user-data surface (events, attachments, series, audit, and PlatformDB) with a pluggable LUKS/gocryptfs backend and env/file/exec/clevis/aws-kms key provider; operator secrets in PlatformDB are additionally AES-256-GCM encrypted at the application layer. CEV protects data on the storage medium (stolen / decommissioned disks, off-host backups, snapshots); it does not defend a running container, and a core running rqlite outside a CEV container, or an external PostgreSQL, falls back to operator-side full-disk encryption. Event attachments inherit the at-rest controls of your `storages.file.engine` choice: filesystem encryption, S3 server-side encryption (SSE), or, with attachments stored in PostgreSQL, the same DB-level encryption that covers user rows. - Pseudonymisation: FACILITATED, system streams + custom event-type design; pseudonyms live in `clientData` or dedicated streams. Since open-pryv.io 2.0.0-rc.58 a third-party record id (an EHR patient id) can be linked to one account platform-wide as a value your service blinds with its own key (`HMAC(K_namespace, id)`); the platform index stores a token of that value (keyed by the platform pepper in hashed PII mode, the default) mapped to a core, never to an account, and never the id or the key (`external-id-index` primitive) `[XIDN4]`, `[XIDG1]`. A core alone learns only how many ids each core holds; a core that also holds your namespace key can test whether an id is on the platform and on which core. Keep that key in your services, never on the cores. For the account name itself, an access created with `randomAlias:true` carries a platform-unique `r-XXXXXXXX` alias in place of the username (`randomAlias` primitive): nothing returned to that access names the account. Since open-pryv.io `4547b32a` (2.0.0-rc.66) the alias routes on every topology, a single core answering DNS included (`[ALRT1]`), and survives a backup and restore (manifest `aliases`, `[BKAL1]`); an account holds at most `accesses.maxAliasesPerAccount` aliases (default 1000, `[AL12]`), and a custom account field named `username` or `usernameChangeCount` is refused at boot so no account stream can expose the stored username to an aliased access (`[SDB3]`, `[AL08]`). Since open-pryv.io 2.0.0-rc.69 (`784a9a47`) an aliased access is accepted under its own alias only (alias-bound addressing): presented under the username, a former username or another alias of the account it answers like an unknown token, on HTTP and socket.io, and a sign-in or password reset at an alias gets one fixed answer before any password check `[AL13]`, `[AL03]`, `[OPSE5]`, `[OPSE16]`, `[OPSE17]`. So a holder who suspects which account it is can no longer confirm the guess with the token, and two aliases of one account cannot be tested against each other. Earlier releases accepted the token under every name of the account; accesses an aliased app created before rc.69 kept an endpoint naming the username. OAuth2 clients registered with pairwise subjects get such an alias per user and client (see the delegated-app bullet). - Record-bound sign-in: IMPLEMENTED, since open-pryv.io 2.0.0-rc.59 (release commit `927919ba`) an auth request that carries an external id in forced mode delivers the app's credential only to the account holding that id. When the page accepts, the server checks that the posted token is an app access of the posted username, on that account's own core, and that this account holds the id; otherwise `400 external-id-mismatch` and the request stays open for the holder `[XIDFF1]`, `[XIDFF2]`, `[XIDFF3]`, `[XIDFF4]`. A shared access the holder handed out does not complete it `[XIDFFS]`; a grant for a controlled account is checked on that account `[XIDFF7]`; a check that cannot run answers `503 external-id-check-unavailable`, never a pass `[XIDFF9]`. When the account lives on another core, the cores ask each other with the admin key (`POST /system/ext-id/holds`, a yes or no, not audited), over https unless `cluster.allowInsecurePeerUrl` `[XIDH1]`, `[XIDFC1]`, `[XIDFC4]`; tested end to end across two running cores (holder accepted, non-holder refused) `[2C56]`, `[2C57]` (tests added after 2.0.0-rc.61; the behaviour is that of 2.0.0-rc.59). A forced registration refuses an id another account holds before anything is reserved `[XIDFR7]`. The guarantee binds the credential to the account holding the id, which is whoever claimed it first: who receives a blinded value before the person stays yours to protect (see Art.25 for the residual and the administrator's release). - Access control: IMPLEMENTED, `permissions` enforce stream- level scope at every API call (technical control, not policy). Expiry is enforced down the chain: a `shared` access managed by an app access can no longer outlive it (it inherits the app access's expiry at creation, clearing that expiry is refused, and authentication refuses a never-expiring shared access once its app access has expired, `5d609bfa`), and a webhook stops firing and becomes `inactive` once its access has expired (`3394b95f`), both in open-pryv.io 2.0.0-rc.23. A cross-account (CMC) relationship whose consent excludes chat gives neither side a chat stream or chat permission, and a counterparty writing a chat (or, without system messaging, an alert) directly with its relationship token is refused `403` (`cmc-chat-disabled`, `cmc-system-messaging-disabled`) (open-pryv.io 2.0.0-rc.38, merge `7aab1e85`) `[CN63]`, `[CN65]`, `[CH07]`, `[CH10]`. Since open-pryv.io 2.0.0-rc.53 (release commit `61fb28dd`, https://github.com/pryv/open-pryv.io/issues/158), members of a group account get, from the group's core, their own short-lived access on a patient account, bounded by their membership, the patient's offer and the grant, stamped with their identity by the patient's core, and deleted when the membership ends `[GA10]`, `[GA12]`, `[GA14]`, `[GA20]` (see `context/workforce-access-patterns.md`, Pattern 3). The same release refuses a cross-account offer that asks a stream the consent plugin manages on the accepter's account (its inbox, which holds every grant endpoint the account received, or its internal streams), at write and again at accept `[CN71]`, `[MB35]`, `[VC09]`, and closes an invite link only from the invite's own scope `[CN72]`. Since open-pryv.io 2.0.0-rc.56 the app that created a single-use invite can also withdraw it while nobody has accepted it, so a link sent to the wrong person stops working before its expiry (a withdrawal that races an accept wins) `[CN100]`, `[CN102]` (https://github.com/pryv/open-pryv.io/issues/160); earlier releases accepted the withdrawal of an open link only. Moving a stream (a new `parentId`) with an app or shared access needs manage rights on every stream of the moved subtree, since the same release `[SMV1]`, `[SMV10]`: before it, a child granted to that access at a lower level moved along under the target parent and took on the permissions other accesses held there. The account-field guards (the primary email, written only through `account.update`; the non-editable and hidden fields; the level caps on account-stream permissions) judge the canonical stream id whatever spelling a request uses, on events and on access creation and update `[ASA1]`, `[ASA6]`; before 2.0.0-rc.56 a store-prefixed spelling of an account field was not recognised by them, so an access holding `contribute` on the email field could change the primary email (the password-reset address) through the events API. - Integrity of stored records: IMPLEMENTED for the built-in stores, an `events.update`, a trash (a shared-secret event excepted, trashed by compare-and-set) or an attachment deletion is applied onto the event as stored at write time (atomically on the PostgreSQL and SQLite stores: a row lock on PostgreSQL, an immediate transaction on SQLite, its lock-wait pinned by `[UEA1]`), so a concurrent client write no longer erases a top-level field written meanwhile, by the server or another client, that the request did not change (a request that sends `content` replaces it whole, CMC server-owned content fields excepted) (open-pryv.io 2.0.0-rc.38, merge `461f3c4c`) `[ESR1]`, `[ESR4]`, `[ESR6A]`. A custom data store that does not implement the atomic merge gets a read then an update. - Authentication strength: IMPLEMENTED, `mfa.*` API methods, opt-in per `services.mfa.mode`. - Delegated-app authorization: IMPLEMENTED, the OAuth2 authorization-code + PKCE flow (`open-pryv.io/components/oauth2/`, open-pryv.io 2.0.0-rc.8) hardens third-party access with mandatory PKCE (S256 only), exact-match redirect-URI validation (single loopback-port carve-out; fragment URIs rejected), curated-only client registration, and short-TTL access tokens paired with single-use rotating refresh tokens. Since open-pryv.io 2.0.0-rc.64 to 2.0.0-rc.77: withdrawing or narrowing a consent reaches the app's live tokens and the accesses it created at once `[OE31]`, `[OSUB3]`; operator-registered clients declare `public` or `pairwise` subjects, and a pairwise app sees each user only as an alias, never the username, in its tokens, its OpenID Connect id token and introspection `[OPSE1]`, `[OXD08]`; apps and resource servers can revoke and introspect tokens; a resource server can exchange a user's token for its own, no wider, only for a token issued for it `[OTX05]` (since open-pryv.io 2.0.0-rc.82 the replaced token is refused at the API by default, `oauth.audienceBoundSessions: true` `[OTXE02]`; an operator may set `false` on a core whose resource servers do not exchange yet); client authentication by key is pinned to the key's type and algorithm `[OCAK7]`; the consent flow's state is signed with a per-core `oauth.stateKey`; and an authorization for an account address, or at a per-user issuer (`oauth.perUserIssuer`, opt-in), is bound to the account the address names `[OPUE2]`, `[OPIU3]`. "Curated-only" holds while `oauth.clientMetadataDocuments.mode` is `off` (the default): with it on, a client may identify itself by a URL whose reach your template sets (see `soc2.CC6.2`). - Delegate-account control: IMPLEMENTED, account delegation (`open-pryv.io/components/delegation/`) issues a delegate an owner-equivalent personal token over another account while keeping teardown authoritative and non-forgeable: a delegate can never remove a delegation, and detach is gated on a genuine login of the controlled account (a personal token carrying no forge-protected delegation marker). The whole `:_delegation:*` namespace is plugin-owned and guarded (no user create/write/delete; internal subtree read-guarded and excluded from wildcard reads). Since open-pryv.io 2.0.0-rc.56 that holds for every token, the owner's included, whatever spelling of the stream id a request uses, and also refuses creating a stream under, or moving one into, the namespace `[CNRP6]`, `[DSC05]`, `[DSU02]`; before it a store-prefixed spelling (`:local:`) was not recognised by these guards and a stream could be placed under a namespace parent. The plugin-managed regions of the cross-account (CMC) namespace are closed the same way (`:_cmc:`, its inbox and internal streams; `:_cmc:apps` stays open to apps) `[CNRP1]`, `[CNRP7]`, and the CMC retry worker now acts only on records the server wrote `[CNM2A]`, `[CNM2B]`, `[RQ32]`. Each delegate's actions are audited on the controlled account (same-core + cross-core). Apps a delegate grants access to the controlled account receive an ordinary app access, never the owner-equivalent token; that access carries a non-forgeable lineage attribute and is revoked with the delegation, and the grant paths that cannot record the lineage (OAuth2 consent, CMC scope-update / offer) refuse delegation-derived tokens (open-pryv.io 2.0.0-rc.23). Since open-pryv.io 2.0.0-rc.30 a delegate may accept a CMC consent for the controlled account: the data grant carries the same lineage and is deleted with the delegation, unless the account holder, reviewing the delegate's consents at detach, keeps it as their own (open-pryv.io 2.0.0-rc.31). See `context/delegation-model.md`. Account auto-deletion (open-pryv.io 2.0.0-rc.66, `8521c8d5`): a delegate can read the controlled account's deletion schedule but cannot set it (`[ACST5]`), and arming a schedule or bringing a deletion nearer needs the account password even with the owner's token (`[ACST3]`, `[ACST4]`), counted on the sign-in tally like a login (`[ACST18]`), so a stolen session alone cannot schedule an account's deletion; every change is confirmed to the account's email (`[ACST15A]`). - Planned, implemented and not released (account transfer to a beneficiary): a beneficiary's optional name and date of birth are stored AES-256-GCM encrypted in a field of their own (key `account.autoDeletion.transfer.identitySecretsKey`, or derived from the admin key; rotating the admin key without a dedicated key makes stored values unreadable), unreadable by any API before the transfer starts, and erased with every version on claim, cancellation, decline or account deletion. The claim and decline links are HMACs of (kind, account id, salt) under the core's link key: only the salt is stored, so a database dump holds no usable link. A claim binds the transfer to the first account that claims it; failed links count on the caller's per-address budget of failed secrets. The operator's audited read of those fields is deferred. - Credential hand-off: IMPLEMENTED, the shared-secrets endpoints (`open-pryv.io/components/shared-secrets/`) hand a credential to a third party by a one-time random key instead of a URL-embedded token, which would persist in browser history, referrer headers, and server access logs. The key is redeemable exactly once, expires on a mandatory TTL, and Pryv stores only the SHA-256 of its random half, so a database dump cannot reconstruct a live credential. The payload is scrubbed (including from event history) when the secret leaves the pending state: on redemption, on a signature mismatch, and on the first retrieval attempt after the TTL has passed. Expiry is enforced when someone reaches for the secret rather than by a background sweeper, so an expired secret nobody touches again keeps its stored payload until something reaches it or you delete it; schedule that deletion yourself if your retention policy needs a deadline. An optional signature (passphrase or client-computed HMAC whose verifier secret never reaches the server) adds a second factor to the redemption. - Data residency: CONFIGURABLE, multi-hosting puts data where your subjects (or your policy) require, bounding exposure surface. - Ability to ensure ongoing availability + resilience (§1(b)): FACILITATED, a multi-core rqlite cluster in which joining cores register as non-voters by default, so adding or losing a core can never cost the cluster its quorum or take an existing core's control plane offline. Leader-failover HA is an explicit operator topology choice (run ≥3 voters; two voters are rejected as a fragile 2-of-2 quorum); health-checks + audit log round out the ongoing-CIA evidence. Platform DB integrity: since open-pryv.io 2.0.0-rc.34 the bundled rqlite (10.5.1) keeps its snapshot store crash-safe, checksums its snapshot files and stops a node on a node-local SQLite error rather than letting its copy diverge; the master also re-checks this node's copy every `storages.platform.integrityCheckIntervalMs` (default 1 h, 2.0.0-rc.33) and logs an error on a failed check. The 9.x to 10.x upgrade is one-way for the rqlite data directory: follow `open-pryv.io/INSTALL.md`, "Upgrading the bundled rqlite (9.x to 10.x)", and keep rqlite's HTTP port (4001) closed to the outside, as it is unauthenticated. - Restoration (§1(c)): IMPLEMENTED, `bin/backup.js --restore` per-user; single-node `peers.json` recovery restores cluster availability after a quorum loss. Operator backups carry high-frequency series data only since open-pryv.io 2.0.0-rc.34 (earlier backups silently held none, on every series engine): take a new backup after upgrading. From 2.0.0-rc.60 the per-user backup also carries the account's external ids and a restore links them again `[XIDBK1]`; each blinded value in it can claim the id, so protect the backup as a credential store (encrypt it). Since 2.0.0-rc.86 a restore checks every file of a run against the run's manifest (size and hash) and refuses a run with a file added, removed, changed, cut short or swapped between accounts; an optional Ed25519 signature per run (`--signing-key`, `--signing-pubkey`) authenticates a recipient-key backup, which encryption alone does not `[BKSM2]`, `[BKSM4]`; and an account whose restore fails while its data is written is cleared instead of left half-restored `[RSFC1]`. - Stored active content: IMPLEMENTED, an attachment whose declared type a browser executes or renders as a document (HTML, SVG and other XML, JavaScript) is served with `Content-Security-Policy: sandbox; default-src 'none'` next to `Content-Disposition: attachment`, so a file uploaded into an account cannot run script on the API origin with the viewer's session (open-pryv.io 2.0.0-rc.34, `components/api-server/src/middleware/attachment-access.ts`). Uploads are not refused for their type; an app that displays HTML or SVG attachments renders them in its own sandbox. - Calls to a counterparty: IMPLEMENTED, since open-pryv.io 2.0.0-rc.56 the calls Pryv makes to URLs the other side supplies (cross-account consent deliveries, chat, revocations, scope updates, the read of an offer, delegation notices, OAuth revocation notices) are refused, before any connection, when the host is or resolves to a loopback, private, link-local or otherwise reserved address (the address rules of webhooks, checked again at connect time), when the URL uses `http:` (unless `cluster.allowInsecurePeerUrl`, for development and test clusters) or carries credentials, and when the answer is a redirect or larger than 1 MiB `[PFR1]`, `[PFR2]`, `[PFR4]`, `[PFR5]`, `[PFR6]`, `[CO22]`. The platform's own host names are always allowed; a peer on a private network, or a private `core.url` given as an IP, is listed in `cmc.allowedPrivateHosts` (host names, IPs or CIDR ranges, same grammar as `webhooks.allowedPrivateHosts`). A refused delivery is permanent: the trigger reports `cmc-handler-destination-refused` and it is not retried. The OAuth2 key sets (`jwks_uri`, rc.70) and client metadata documents (rc.74) Pryv fetches go through the same guard, https only, size, time and per-host bounded `[OCMD03B]`, `[OCMD03G]`; a host listed in `cmc.allowedPrivateHosts` is allowed for them too. Keeping your own network's egress filtering stays yours. - Adapter routes: CONFIGURABLE, off by default. With `adapterRoutes` set (open-pryv.io 2.0.0-rc.73) the core forwards `/adapter//…` to a sidecar you run without authenticating the request, so the sidecar must authenticate every request and check the token's audience; the core refuses traversal paths, caps bodies and idle time, and since rc.75 names the addressed account in headers it sets itself (client copies removed) `[ADRI09]`, `[ADRU3]`. See `iso-27001.A.8.26`. - Regular testing (§1(d)): FILLED BY EXISTING PRIMITIVES. **Existing evidence (citable today)**: - **Multi-engine CI test matrix**: ~2351 tests on PostgreSQL and SQLite (matched baseline), ~175 test files across `components/*/test/`; runs on every commit + every PR. - **Lint + typecheck gates** (`just lint` + `just typecheck`), neostandard with `{ semi: true }`, `noUnused*` strict. - **Deploy-validation matrix** (an internal release-validation artefact), 8-row scenario matrix exercised on every release. - **Conformance suite** (`lib-js` 168/169 baseline against deployed core), runnable per-deployment for operator-side verification (sample-app proposal queued to package this as a customer- facing "verify your deployment" runbook). - **Supply-chain pipeline** (shipped, open-pryv.io merge `9e2ee7ff`): a CI gate fails the build on high or critical advisories in the runtime npm tree (accepted advisories live in a documented allowlist, not silenced), a CycloneDX SBOM is emitted and Grype-scanned on every CI run, the base image is digest-pinned with the rqlite download checksum-verified, and release images carry a keyless cosign signature plus a SLSA build-provenance attestation. The pinned base image still shows OS-level CVEs in scans (a slimmer-base migration is a tracked follow-up); the claim is detection, gating and attestation, not a CVE-free image. - **Vulnerability disclosure program**: a coordinated disclosure policy ships in `SECURITY.md`: private reporting via GitHub Security Advisories + a `security-dev@` mailbox, a published scope, response-time SLA, safe-harbor language, a 90-day coordinated-disclosure timeline, and GHSA/CVE issuance for confirmed reports. Private vulnerability reporting is enabled on the published repositories, so operators can cite Pryv's VDP + GHSA advisory history as part of their Art.32(1)(d) evidence file. - **Code-level security review** (2026-06 to 2026-10): a systematic review of the open-pryv.io source by its maintainers (authentication, authorisation and isolation, input handling, secrets in logs, the admin / multi-core plane, the network daemons, resource limits, deletion), each finding confirmed by a second review and fixed with regression tests; the fixes shipped in open-pryv.io 2.0.0-rc.40 to 2.0.0-rc.51, described in each release note. Public report: `SECURITY-AUDIT.md` (https://github.com/pryv/open-pryv.io/blob/master/SECURITY-AUDIT.md), published 2026-10-14, revised with every release that carries a security fix. It evaluates the code, not your deployment: run a release carrying the fixes and keep testing your own configuration and integrations. See `context/code-security-review-2026.md`. **Evidence** - tests: HSHT, ACTY, BKSR, CN63, CN65, CH07, CH10, ESR1, ESR4, ESR6A, GA10, GA12, GA14, GA20, CN71, CN72, MB35, VC09, CN100, CN102, CNRP1, CNRP6, CNRP7, DSC05, DSU02, CNM2A, CNM2B, RQ32, ASA1, ASA6, SMV1, SMV10, PFR1, PFR2, PFR4, PFR5, PFR6, CO22, XIDN4, XIDG1, XIDFF1, XIDFF2, XIDFF3, XIDFF4, XIDFFS, XIDFF7, XIDFF9, XIDH1, XIDFC1, XIDFC4, XIDFR7, XIDBK1, ALRT1, BKAL1, AL12, SDB3, AL08, ACST3, ACST4, ACST5, ACST18, ACST15A, AL13, AL03, OPSE5, OPSE16, OPSE17, OE31, OSUB3, OPSE1, OXD08, OTX05, OCAK7, OPUE2, OPIU3, OCMD03B, OCMD03G, ADRI09, ADRU3, BKSM2, BKSM4, RSFC1 - docs: customer-resources/auth-oauth2.md, customer-resources/adapter-routes.md - config keys: hostedSites..hsts, storages.platform.integrityCheckIntervalMs, cmc.allowedPrivateHosts, cluster.allowInsecurePeerUrl, accesses.maxAliasesPerAccount, oauth.audienceBoundSessions, oauth.stateKey, oauth.perUserIssuer, oauth.clientMetadataDocuments.mode, adapterRoutes - primitives: permissions, system-streams, randomAlias, letsEncrypt-integration, multi-core-mTLS, encryption-at-rest-user-data, encryption-at-rest-secrets, shared-secrets, backup-restore, MFA, data-residency, delegation, CMC, external-id-index, account-auto-deletion - context notes: workforce-access-patterns, delegation-model, code-security-review-2026 **Planned changes** - feature: End-to-end encryption shifts encryption from Configurable infrastructure to a Pryv-managed primitive - feature: Read-only effective-configuration endpoint strengthens the evidence narrative around operator-visible safeguards - feature: Account transfer to a beneficiary (implemented, not released): a beneficiary's name and date of birth encrypted at rest, unreadable before the transfer starts ### GDPR Art.33: Notification of personal data breach to the supervisory authority Coverage: facilitated · effort saved: high · mode: evidence · draft Requirement: Controller shall notify supervisory authority within 72 hours of becoming aware of a breach (unless unlikely to result in risk). **What Pryv does for you** Pryv ships a breach-scoping toolchain: `bin/breach-scope.js` turns a compromised accessId + time window into an Art.33 §1(b)-(d) input artefact (subject, methods invoked, streams in scope, record counts, integrity hashes) in one command on the subject's home core. Encryption-at-rest may scope the "unsecured personal data" definition relevant to the notification decision. The risk assessment and the 72-hour process itself are yours to run. **Detail** Breach scoping is single-command (shipped in open-pryv.io `0b2874e0`): - `GET /system/accesses/:accessId` admin lookup (PlatformDB reverse-index) resolves a compromised accessId to its user + home core in O(1), revoked accesses included (unless their deletion records were purged after `accesses.deletionRecords.retentionDays`, an opt-in setting since open-pryv.io 2.0.0-rc.56: choose it with breach scoping in mind). Existing deployments index pre-existing accesses once per core with `bin/backfill-access-index.js`. - Read audit rows carry `content.recordCount` and `content.scopedStreamIds` (plus `scopedStreamCount` and `recordCountIncomplete`). `scopedStreamIds` is the query's resolved SCOPE: an upper bound on what the access could have exposed, not the streams of the events actually returned. State that nuance in the notification. - `bin/breach-scope.js --access --since [--until ]` walks the audit window on the subject's home core and renders the scoping report (JSON or Markdown): methods histogram, streams in scope, read/mutated/destroyed record counts, time window, integrity hashes. Since open-pryv.io 2.0.0-rc.49 an `--output` report file is written readable by its owner only (`0600`) `[BRSC6]`: it names the subject and the streams in scope, so keep it with your incident records, not on a shared volume. - access version chain → consent state at the moment of access (was processing within authorised scope?). - encryption-at-rest → if the leaked artefact is encrypted operator backup, the data may qualify as "secured" and notification may not be required per Art.33 §1. Honest bounds: the report classifies by stream + method and quantifies by record count; it does not derive event-type data categories (event bodies never enter the audit log); HF/series reads and audit-filter-excluded methods are not visible; the reverse-index is advisory (home-core storage is authoritative). Detection-of-breach itself depends on monitoring + log review you run around the audit data. **Evidence** - tests: BRSC6, ADP1 - docs: customer-resources/audit-setup.md - config keys: accesses.deletionRecords.retentionDays - primitives: audit, encryption-at-rest-secrets ### GDPR Art.34: Communication of a personal data breach to the data subject Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Where breach likely to result in high risk, controller shall communicate to data subjects without undue delay. **What Pryv does for you** Two-surface split. **Identification** is filled by the audit log + the shipped `bin/breach-scope.js` scoping tool (per-subject roster derivable from the breached access's read/write history); **delivery** is voluntarily missing + operator-owned (Pryv's mail surface is transactional per-recipient, not bulk-send; operators compose with their existing CRM / SMS / push pipeline). The audit-trace bridge that lands per-recipient send-receipts inside Pryv's event chain (satisfying §164.414-equivalent burden-of-proof) uses an operator- authored `compliance/breach-notification/sent-cmc` event pattern. Full treatment in `context/breach-notification-delivery-operator-owned.md`. Encryption-at-rest may scope the high-risk determination (Art.34 §3(a) exemption). **Detail** **Identification surface**: derive the affected-subject list from `audit.get` filtered by (`breachedAccessId`, time window). The shipped `bin/breach-scope.js` (open-pryv.io `0b2874e0`) packages this into one command + adds the §164.404(c) content elements (`recordCount` + the `scopedStreamIds` resolved query scope, an upper bound on exposure rather than the streams actually returned) via audit-row extensions. Identification is single-command + audit-defensible. **Delivery surface**: operator-owned by design. Pryv's transactional mail (`mail.send` / `email-templates`) is designed for welcome / password-reset / MFA-code emails, not bulk breach broadcasts. Operators compose: - Identification → the `bin/breach-scope.js` report (JSON output). - Operator's CRM / mail provider (SendGrid / Mailgun / AWS SES / Mandrill) renders Art.34 §2 content elements per recipient + sends with retries + rate-limiting. - Send-receipts captured back into Pryv as `compliance/breach-notification/sent-cmc` events (recipient.userId + email_hash + channel + provider.message_id + notice_version + time) on a dedicated compliance system stream, these become the §164.414-equivalent burden-of-proof artefact. - Operator's incident-response record on `compliance/incidents//*` cross-references the affected.json input + the per-recipient send-receipt event tree. **Why voluntarily missing**: most regulated-market operators already run a CRM / mail / SMS pipeline with established rate-limiting + retry + send-receipt tracking + legal-comms escalation; a Pryv-shipped breach-comm would be redundant. Operators without one need legal/ comms expertise to use Art.34 §2 content + timing well anyway, beyond what a platform-side template can pre- fab. The Art.34 §3 exemptions (encryption-renders- unintelligible / subsequent-measures-eliminate-high-risk / disproportionate-effort) are legal judgements operator- counsel makes. **Multi-jurisdiction nuance**: subjects in different jurisdictions face different timing regimes (GDPR "undue delay" / HIPAA ≤60d / PIPEDA "as soon as feasible" / California ≤45d / Swiss nLPD Art.24 conditional). Operator's runbook derives per-subject timing from `clientData.jurisdiction` on the account. **Evidence** - docs: customer-resources/audit-setup.md - primitives: audit, access, encryption-at-rest-secrets, event, system-streams - context notes: breach-notification-delivery-operator-owned ### GDPR Art.35: Data protection impact assessment Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Where processing is likely to result in a high risk to the rights and freedoms of natural persons, the controller shall, prior to the processing, carry out a data protection impact assessment. **What Pryv does for you** The DPIA is a written assessment artefact; Pryv has no role in producing it. What Pryv supplies as inputs: data-residency primitive lets you state where each subject's data lives; audit + access-version primitives describe the processing-flow technical layer concretely; system-streams isolation gives a defensible "scope of sensitive data" boundary; this matrix itself enumerates the technical-organisational-measures (Art.35 §7(d)) for the deployment. **Detail** §7 prescribed content → Pryv-side artefacts feeding each item: - (a) systematic description of processing → audit-log method/path coverage + access purposes from clientData. - (b) necessity / proportionality assessment → the minimum-necessary stream + permission design (cross-link to Art.5 §1(c)). - (c) risk assessment → operator-side artefact; this matrix contributes the technical-control inventory. - (d) measures envisaged to address the risks → see the Art.32 row of this matrix + cross-scope ISO 27001 A.8 control rows. **Evidence** - primitives: audit, data-residency, access, system-streams **Planned changes** - feature: Read-only effective-configuration endpoint feeds the DPIA safeguards inventory from live per-core data instead of a hand-written list ### GDPR Art.36: Prior consultation Coverage: out-of-scope · draft Requirement: Controller shall consult the supervisory authority prior to processing where the DPIA under Art. 35 indicates the processing would result in a high risk in the absence of measures taken by the controller to mitigate the risk. **What Pryv does for you** Prior consultation is the controller's procedural interaction with a supervisory authority. No software role; the DPIA artefact under Art. 35 carries the technical evidence the authority may request; Pryv contributes inputs there but not to the consultation itself. ### GDPR Art.37: Designation of the data protection officer Coverage: out-of-scope · draft Requirement: Controller and processor shall designate a DPO where (a) processing is by a public authority, (b) core activities require regular and systematic monitoring on a large scale, or (c) core activities consist of large-scale processing of special categories or criminal-conviction data. **What Pryv does for you** DPO designation is an HR / organizational decision. No software role. Where the deployment processes Art. 9 special-category or Art. 10 criminal data on a large scale (likely for healthcare Pryv deployments), the Art. 37(1)(c) trigger applies and a DPO designation is required. ### GDPR Art.38: Position of the data protection officer Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: DPO shall be involved properly + in a timely manner in all issues relating to protection of personal data; given necessary resources; shall directly report to the highest management level; shall not receive any instructions regarding exercise of those tasks; cannot be dismissed or penalised for performing tasks. Data subjects may contact the DPO with regard to all issues related to processing (§4). **What Pryv does for you** DPO independence + reporting structure (§1-§3) is an organizational arrangement; no software role. **§4 DPO contact-point for data subjects IS facilitated** by the existing `serviceInfo.support` URL (returned by `GET /service/info` on every core). Operators publish DPO contact details on the page that `support` points at, the same surface that `app-web-auth3` already renders in its consent UI. Zero extra platform code required. Full convention treatment in `context/service-info-conventions.md`. **Evidence** - context notes: service-info-conventions ### GDPR Art.39: Tasks of the data protection officer Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: DPO shall have, at minimum: informing + advising the controller + processor + employees; monitoring compliance; providing advice on the DPIA + monitoring its performance; cooperating with the supervisory authority; acting as contact point for the supervisory authority. **What Pryv does for you** DPO duties are organizational. Pryv contributes the data sources the DPO uses for "monitoring compliance", the audit log, observability metrics, this matrix's evidence trail. The DPO contact-point obligation per Art.38(4) is covered separately via the `serviceInfo.support` URL convention (see `context/service-info-conventions.md`). Pryv equips the DPO; it doesn't replace them. **Detail** Practical DPO-monitoring patterns: - **Audit-log access** for the DPO is currently bound to per-user-scoped permissions; no built-in "cross-account audit reader" personal-token tier exists. Operators granting DPOs platform-wide audit visibility typically use `auth.adminAccessKey` style admin auth, OR run a side-process that exports audit events into the DPO's observability / SIEM stack (Q23 observability-provider primitive, pluggable façade). - **Compliance matrix as evidence trail**: this compliance-matrix repository itself is the structured artefact the DPO references for "what does the platform contribute to each regulatory control?", see how scopes / requirements / pryv_primitives / planned chips / context notes interlink for the auditable claim graph. - **DPIA / breach-scope tooling** the DPO consumes when active: `bin/breach-scope.js` for the breach scoping artefact (shipped), and the future `CONFIG-EFFECTIVE-EXPOSURE` effective-config endpoint for DPIA Section (d). **Evidence** - primitives: audit, observability-provider - context notes: service-info-conventions ### GDPR Art.40: Codes of conduct Coverage: facilitated · effort saved: low · mode: awareness · draft Requirement: Member States, supervisory authorities, the Board and the Commission shall encourage the drawing up of codes of conduct intended to contribute to the proper application of the Regulation. **What Pryv does for you** Codes of conduct are sector- level instruments (drafted by associations of controllers / processors, approved by competent supervisory authority). No software role at the code-drafting layer. When a code applies to your sector, adherence is recorded as one of the Art. 24 / Art. 32 "appropriate measures"; the audit log + this matrix demonstrate the technical-control side of code adherence. **Evidence** - primitives: audit, access ### GDPR Art.42: Certification Coverage: facilitated · effort saved: low · mode: awareness · draft Requirement: Member States, supervisory authorities, the Board and the Commission shall encourage the establishment of data-protection certification mechanisms, seals and marks. **What Pryv does for you** Certification (e.g., EuroPrivacy seal, GDPR-certified processor schemes) is sector- and jurisdiction-specific. Pryv operators pursuing certification consume this matrix as the technical-control inventory. ISO 27701 + (where applicable) HDS are adjacent certifications already represented in this matrix. **Evidence** - derives from: iso-27701.5 - primitives: audit, access ### GDPR Art.82: Right to compensation and liability Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Any person who has suffered material or non-material damage as a result of an infringement of the Regulation shall have the right to receive compensation from the controller or processor for the damage suffered. **What Pryv does for you** Liability + compensation are legal proceedings. Pryv contributes defense evidence: the audit log + access-version chain support the controller / processor in demonstrating compliance with the relevant obligations (or, where compliance failed, in scoping the actual damage). The legal outcome is fact-specific. **Evidence** - primitives: audit, access ### GDPR Art.83: General conditions for imposing administrative fines Coverage: out-of-scope · draft Requirement: Each supervisory authority shall ensure that the imposition of administrative fines is in each case effective, proportionate and dissuasive. Fines up to €20 million or 4% of total worldwide annual turnover, whichever is higher. **What Pryv does for you** Fines are regulator-side. Pryv has no role in fine calculation or imposition. Pryv-side data + this matrix help the controller argue for mitigation under Art. 83(2) factors (degree of cooperation, technical + organisational measures implemented, etc.). ### GDPR Art.44: General principle for transfers Coverage: facilitated · effort saved: medium · mode: infrastructure · draft Requirement: Any transfer of personal data which are undergoing processing or are intended for processing after transfer to a third country or international organisation shall take place only if the controller and processor comply with the conditions in Chapter V. **What Pryv does for you** The Art.44 framework is operational, every Art.45-49 path is conditional. Pryv's data-residency primitive is the technical enforcement layer: when you bind a subject's data to a hosting inside the EU/EEA, no Chapter-V analysis is needed (no transfer happens). When transfer is intentional, the CMC capability flow records the recipient hosting + the legal basis on the originating access's clientData, making Chapter V compliance auditable per transfer rather than per system. **Detail** The residency guarantee is **two-tiered**: **Tier 2, Content + audit layer (residency-pinned).** Cores share no event / stream / audit / attachment / access- metadata data with each other. A subject assigned to an EU core has ALL their Tier-2 data exclusively on that EU core's storage. "Transfer" would require a deliberate operator backup-restore between cores (not a runtime primitive). See `context/core-affinity-architecture.md`. **Tier 1, Identification + routing layer (cluster- replicated).** PlatformDB rows (`user-core/`, `user-unique-fields/email`, `dns/`, `access-state/` (hashed OAuth2 rows, no credentials), see `context/cross-border-platformdb-implications.md` for the verified keyspace inventory) replicate cluster-wide via rqlite Raft. In a multi-region cluster, this **is** a continuous cross-border transfer of personal data, an Art.46 mechanism (SCCs / BCRs / etc.) is legally required even though Tier-2 stays put. Mitigation options (filed as backlog or shipped): at-rest encryption of PlatformDB (`PLATFORMDB-AT-REST-ENCRYPTION`), HMAC-pseudonymisation of PII at the PlatformDB layer (`PLATFORMDB-PII-HASHING`, shipped, opt-in via `platform.piiMode: hashed`), tokenisation with per-region mapping table (option C, brainstorm-tier, not yet backlogged). **CMC counterparty nuance**: when an EU subject's stream is shared with a US-based counterparty via CMC, the US client connects directly to the EU core's `apiEndpoint`. The EU Tier-2 data does not replicate to the US core, it's fetched on-demand. From the EU subject's Art.44 perspective this fetch IS a transfer (data crosses borders to reach the reader), so the operator records the recipient + lawful basis on the access's `clientData.transfer_basis` per `context/transfer-basis-convention.md`. The data-at-rest residency is preserved (no Tier-2 copy in the US); only the access path + Tier-1 routing-state crosses. **Evidence** - primitives: data-residency, CMC, access - context notes: core-affinity-architecture, cross-border-platformdb-implications, transfer-basis-convention ### GDPR Art.45: Transfers on the basis of an adequacy decision Coverage: configurable · effort saved: high · draft Requirement: A transfer may take place where the European Commission has decided that the third country (or a territory / specified sector within it) ensures an adequate level of protection. **What Pryv does for you** Configure your `auth.hostings` to declare only hostings that match adequate-protection regimes; route subjects to them as per your transfer policy. The per-user `hosting` exposed via `system.users.get` proves residency for auditor questions. Maintenance of which countries currently hold adequacy (EU-US DPF, Switzerland, UK, etc.) is operator-side regulatory tracking. **Evidence** - tests: REGC, RC01, RC03 - config keys: auth.hostings - primitives: data-residency, CMC ### GDPR Art.46: Transfers subject to appropriate safeguards Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: In the absence of an adequacy decision, a controller or processor may transfer personal data to a third country only if appropriate safeguards are provided (BCRs, SCCs, approved codes / certifications, ad-hoc clauses authorised by supervisory authority, etc.). **What Pryv does for you** Pryv-side artefact: record the §2 mechanism on the transferring access's `clientData.transfer_basis` (structured object per `context/transfer-basis-convention.md`, same pattern as `clientData.lawful_basis` from Art.6 + `clientData. special_category_basis` from Art.9). The Art.30(1)(e) transfers register is then derivable in a single `jq` query against `GET /accesses`. The SCCs / BCRs / approved-code documents themselves remain operator/legal artefacts; Pryv persists the references + the metadata travels with the access version chain. **Detail** Three cross-border surfaces in a typical Pryv deployment: 1. **Access-bound transfers** (CMC counterparty fetches, third-party-app reads across jurisdictions). Convention: `access.clientData.transfer_basis` per `context/transfer-basis-convention.md`. Existing primitives carry persistence + versioning + audit trail for free (zero Pryv code change). 2. **Multi-region cluster replication** (Tier 1 of the two-tier residency model, PlatformDB rows for usernames, emails, DNS subdomains, user-core mappings). See `context/cross-border-platformdb-implications.md` for the verified keyspace inventory + the A/B/C mitigation options (at-rest encryption / PII hashing / tokenisation). The strongest compliance posture combines an Art.46 mechanism (SCCs, BCRs, etc.) WITH at-rest encryption (`PLATFORMDB-AT-REST-ENCRYPTION` backlog) AND PII pseudonymisation at the PlatformDB layer (`PLATFORMDB-PII-HASHING`, shipped, opt-in via `platform.piiMode: hashed`). 3. **Subprocessor outbound** (SMTP / SMS / observability vendors). See `context/subprocessor-posture-and-data- flow.md`. **Pryv recommends configuring per-core SMTP endpoints** so the relay can match the core's region / country when residency is a hard requirement, the `services.email.smtp.*` config is per-core, so an EU core routes mail through an EU SMTP relay independently of a US core's relay. Same pattern applies to SMS endpoints. For the §2 mechanism field convention: `mechanism: "art.46.2.c"` for SCCs, `"art.46.2.a"` for legally-binding-instrument-between-public-authorities, `"art.46.2.f"` for approved certification, etc. Or `"art.45"` with an `adequacy_decision` field if relying on an adequacy decision. Full field reference in the convention note. **Evidence** - primitives: access, clientData, data-residency - context notes: transfer-basis-convention, cross-border-platformdb-implications ### GDPR Art.47: Binding corporate rules Coverage: out-of-scope · draft Requirement: Competent supervisory authority shall approve binding corporate rules (BCRs) provided they meet specified content + safeguarding requirements. **What Pryv does for you** BCRs are organizational rules approved by a supervisory authority after a formal process. No software contribution, when BCRs are the chosen Art.46 safeguard, the operator records the BCR reference on the transferring access's clientData (per Art.46 pattern); the BCR document itself is the operator's legal artefact. ### GDPR Art.48: Transfers or disclosures not authorised by Union law Coverage: out-of-scope · draft Requirement: Any judgment of a court / tribunal and any decision of an administrative authority of a third country requiring a controller or processor to transfer or disclose personal data may only be recognised or enforceable if based on an international agreement. **What Pryv does for you** Resistance to extraterritorial subpoenas is a legal posture, not a software control. Pryv's audit log will record any forced disclosure executed under the access primitive (which is the only way data leaves the system), making the disclosure documentable after the fact. The decision of whether to comply / contest is legal counsel's, not Pryv's. ### GDPR Art.49: Derogations for specific situations Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: In the absence of an adequacy decision or appropriate safeguards, a transfer may take place only on the basis of one of nine enumerated derogations (explicit consent, contract performance, important public interest, vital interests, legal claims, register access, etc.). **What Pryv does for you** Each Art.49 derogation requires per-instance recording. Pryv pattern: mint a purpose- specific access per derogation invocation with `clientData.transfer_derogation = "art_49_1_a_consent"` etc.; execute the transfer; revoke. The audit trail then anchors the derogation rationale to the specific data movement. **Evidence** - primitives: access, clientData, audit ### GDPR Art.50: International cooperation for the protection of personal data Coverage: out-of-scope · draft Requirement: Commission and supervisory authorities shall take appropriate steps to develop international cooperation mechanisms for the effective enforcement of personal-data protection legislation. **What Pryv does for you** International-cooperation development is a regulator-level activity. No software contribution; no implementer obligation arises from this Article alone. ## Hébergement de Données de Santé (Health Data Hosting Certification) (HDS) - Scope id: `hds` (hosting-cert) - Jurisdiction: France - Version: HDS Référentiel, current consolidated edition (2018-06-19) - Official text: https://esante.gouv.fr/produits-services/hds - Requirements: 13 (2 implemented, 2 configurable, 5 facilitated, 4 out-of-scope) - Browse: https://pryv.github.io/compliance-matrix/#/scope/hds ### HDS Activity.1: Activity 1, Provision of physical infrastructure Coverage: out-of-scope · draft Requirement: Provision of physical computing infrastructure (servers, storage, network equipment) used to host health data. **What Pryv does for you** Physical infrastructure provisioning is the data-centre operator's certification scope, not Pryv's. Pryv-as-software doesn't ship a data centre, when an HDS-certified hoster deploys Pryv on their certified infrastructure, this activity is covered by their cert, not by anything Pryv contributes. ### HDS Activity.2: Activity 2, Provision of virtual infrastructure Coverage: out-of-scope · draft Requirement: Provision of virtual computing infrastructure (VMs, container hosts, virtual storage) used to host health data. **What Pryv does for you** Virtual infrastructure is the cloud / virtualisation provider's certification scope. Pryv runs on whatever virtual infrastructure the operator chooses; the cert for the virtual layer is the hoster's (typically a CSP that itself holds HDS Activity 2). ### HDS Activity.3: Activity 3, Platform-as-a-service for health data Coverage: facilitated · effort saved: high · mode: infrastructure · draft Requirement: Provision of a software platform on which health-data applications are deployed and operated (runtime, libraries, middleware, databases). **What Pryv does for you** This is the activity where Pryv-as-software substantively contributes. An HDS-certified hoster running Pryv covers Activity 3 by inheriting Pryv's primitive set: per-user storage isolation (system-streams + per-user files when SQLite engine), stream-scoped permissions, TLS in the core or at your proxy (configured, not default), mTLS between cores once bootstrapped, AES-256-GCM at-rest secrets, MFA, audit log, backup-restore, observability adapter. The operator still does the operational + organizational work the HDS audit checks (governance, incident response, ISMS). **Detail** The HDS audit verifies the platform's actual operational state, audit logs available, vulnerability management, change control, etc. Pryv-side artefacts feeding the audit: CHANGELOG-v2 + CHANGELOG-v2-back (change control evidence); audit-log per-user SQLite (forensic evidence); observability metrics (operational monitoring evidence); release tags + Docker image SHAs (configuration management evidence). For vulnerability management on the software side: the 2026 code-level security review of open-pryv.io and its fix releases (2.0.0-rc.40 to 2.0.0-rc.51; public report `SECURITY-AUDIT.md`, published 2026-10-14, https://github.com/pryv/open-pryv.io/blob/master/SECURITY-AUDIT.md; `context/code-security-review-2026.md`). Running a release that carries the fixes, and the vulnerability management of your own hosting, stay yours. **Evidence** - primitives: access, permissions, audit, system-streams, letsEncrypt-integration, multi-core-mTLS, encryption-at-rest-secrets, MFA, data-residency, backup-restore, observability-provider - context notes: code-security-review-2026 ### HDS Activity.4: Activity 4, Sysadmin and operations of the information system Coverage: out-of-scope · draft Requirement: Administration of the platform: patching, configuration, change management, incident response, operational monitoring. **What Pryv does for you** Sysadmin is the certified operator's role. Pryv ships the software; the operator runs it, monitors it, patches it, responds to incidents. The HDS Activity 4 audit verifies the operator's ITSM practices (typically ISO 20000-1 aligned). ### HDS Activity.5: Activity 5, Outsourced backup Coverage: facilitated · effort saved: medium · mode: infrastructure · draft Requirement: Outsourced backup of health data: backup planning, execution, retention, restoration. **What Pryv does for you** Pryv contributes the backup primitive (`bin/backup.js` per-user backups + `--restore`). Multi-core cluster topology gives in-line Raft replication of platform data. The backup tool can **encrypt its output on demand** so plaintext PHI never touches the destination disk: a recipient public key (RSA-OAEP-wrapped per-backup data key, the backup host holds no decryption secret) or a passphrase, with per-file authenticated AES-256-GCM. This covers backup-archive at-rest encryption directly; the operator may still layer LUKS / GPG / KMS at the volume level, and remains responsible for key management, transport, retention, and the "outsourced" (separate physical location) element. Pryv provides the backup-generation, payload-encryption, and restoration primitives. **Detail** **Backups taken before open-pryv.io 2.0.0-rc.34 are incomplete:** they carry no high-frequency series data, on every series engine, and nothing warned. Take a new backup after upgrading, and do not count older archives as a full copy of series data. Since 2.0.0-rc.34 the series are exported and restored (series move between any two series engines, InfluxDB included), and the manifest's `coreVersion` reports the core's release, which you can record in your backup register. Backup and restore round trips are tested in open-pryv.io (`[BKSR]`, `[BKEV]`, `[BKVR]`). **Incremental backups (open-pryv.io 2.0.0-rc.51).** Before 2.0.0-rc.51 an `--incremental` run overwrote the full backup it continued, leaving a directory that restores only the last delta; `node bin/backup.js --inspect ` reports such a directory `DAMAGED` and a restore refuses it `[BKIC2]`: remove it from your backup register and take a new full backup. Since 2.0.0-rc.51 each run is written next to the full backup (`incrementals//`, indexed by `chain.json`), each encrypted run with its own envelope and decrypt script, and a restore replays the chain, or stops at a given run with `--through-run` `[BKC1]`, `[BKC2]`, `[BKC5]`, `[BKIC1]`. Your retention schedule applies per chain: a run is only restorable with the full backup and every run before it. **Outsourced copies you can check (open-pryv.io 2.0.0-rc.86).** Each run's manifest lists every file with its size and hash, and a restore refuses a run whose files were added, removed, changed, cut short or swapped between accounts `[BKSM1]`, `[BKSM2]`. With a recipient public key, sign the runs (`--signing-key` at backup, `--signing-pubkey` at restore): whoever can write to the outsourced destination and holds the public key can otherwise replace a run `[BKSM4]`, `[BKSM5]`. `--inspect --verify-files` checks every file of a backup without restoring it, a check you can schedule after each transfer to the backup host `[BKIS3]`. Keep the destination directory for the backup only: a file the backup did not write is refused at restore, while files that storage appliances create by themselves (`@eaDir`, `.snapshot`, `.zfs`, ...) are ignored with a notice `[BKSM7]`. A backup written by 2.0.0-rc.86 or later restores with that release or later; runs written earlier restore as before, reported as "file list not verified". **Evidence** - tests: BKSR, BKEV, BKVR, BKC1, BKC2, BKC5, BKIC1, BKIC2, BKSM1, BKSM2, BKSM4, BKSM5, BKSM7, BKIS3 - docs: customer-resources/backup.md - primitives: backup-restore, backup-payload-encryption, encryption-at-rest-secrets, multi-core-mTLS ### HDS Activity.6: Activity 6, Archival of health data Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: Long-term archival of health data with verifiable integrity over the archival period (typically 20+ years for medical records). **What Pryv does for you** Pryv stores events with retained `class/format` semantics (data-types schemas), and keeps per-event version history when you set `versioning.forceKeepHistory: true` (off by default; with `versioning.deletionMode: keep-nothing`, the default, a deleted event's history is removed with it). For long-term archival, the operator typically combines Pryv's event store with an external archival system (WORM storage, blockchain-anchored hashes etc.), Pryv is not an archival product itself but feeds it. Integrity verification across long timescales is a separate certified archival service. **Evidence** - primitives: event, stream, backup-restore ### HDS cross.data-residency: Cross-cutting, data residency in France Coverage: configurable · effort saved: high · draft Requirement: Health data subject to HDS must remain on infrastructure located in France (or in a country offering equivalent protection per Article L.1111-8 CSP). **What Pryv does for you** Pryv's data-residency primitive is the technical control: bind each French-health-data subject to a French hosting (declared in `auth.hostings`). Cross-core forwarding inside a multi- hosting Pryv platform respects the per-user hosting binding, so a user's data physically stays where assigned. **Detail** Configuration pattern for HDS-targeting deployment: - `auth.hostings` declares the French hosting(s), each backed by a core or core-cluster running on HDS-certified infrastructure. - At registration, the implementer routes French-health-data subjects to a French hosting (operator/regulatory routing, not end-user choice). - `system.users.get` exposes the per-user `hosting` field so you can prove residency in audit responses. **Evidence** - tests: REGC, RC01, RC03, RC07 - config keys: auth.hostings - primitives: data-residency ### HDS cross.iso-references: Cross-cutting, ISO 27001 + 27018 + 20000-1 baseline Coverage: facilitated · effort saved: medium · mode: awareness · draft Requirement: HDS certification requires the hoster to demonstrate alignment with ISO/IEC 27001 (ISMS), ISO/IEC 27018 (PII in public clouds), and ISO/IEC 20000-1 (IT service management). These ISO certs may be held independently and presented as part of the HDS audit pack. **What Pryv does for you** Pryv's primitive set carries a substantial share of the ISO 27001 Annex A technical controls (A.5 information security policies derives_from operator, A.8 asset management is operational, A.9 access control = permissions, A.10 cryptography = TLS + at-rest secrets, A.12 operations security = audit + monitoring, A.13 communications security = TLS + mTLS, A.17 BCM = backup + multi-core HA). See the `iso-27001.*` rows of this matrix for the detailed per-control mapping; the per-Activity-3 sub-control rows below name the specific A.5/A.8 controls. **Detail** The detailed control-by-control mapping will land in the `iso-27001` scope. HDS audit pack references the ISO 27001 certificate(s) the hoster holds; the Pryv-side contribution is the same set of primitive evidence either way. **Evidence** - primitives: access, permissions, audit, letsEncrypt-integration, encryption-at-rest-secrets, MFA, data-residency, backup-restore, observability-provider ### HDS cross.hds-vs-gdpr: Cross-cutting, HDS ≠ GDPR compliance Coverage: facilitated · effort saved: low · mode: awareness · draft Requirement: HDS certifies the hosting infrastructure; GDPR compliance for consent, data-subject rights, breach notification, lawful basis, and the records of processing remains the data controller's separate responsibility. **What Pryv does for you** A common misconception in French health-tech: holding an HDS certificate is sometimes mistaken for GDPR-compliance. It isn't. The HDS scope above covers infrastructure security; the GDPR scope (see this matrix's `gdpr.*` rows) covers the controller's obligations toward data subjects. Pryv carries the technical substrate for both, but they're distinct compliance burdens. **Detail** Reference content for this point: Pryv published "pourquoi-la-certification-hds-ne-garantit-pas-votre-conformite-au-rgpd" in `www`. The matrix expresses the same point structurally, separate scopes, no scope is the other's proxy. **Evidence** - primitives: access, audit, CMC ### HDS cross.subcontracting: Cross-cutting, subcontracting chain Coverage: out-of-scope · draft Requirement: Where the HDS-certified hoster subcontracts any HDS activity, the subcontractor must also be HDS-certified for that activity (or operate under the hoster's own certificate per the Référentiel's subcontracting clauses). **What Pryv does for you** Subcontracting + certification chain are organizational. Pryv as a software supplier sits below the hoster's certification scope, the hoster's contract with the Pryv operator (often the same entity) declares the scope, but Pryv-the-software isn't itself certified. ### HDS Activity.3.access: Activity 3, Access control (sub-control) Coverage: implemented · effort saved: high · draft Requirement: Logical access to ePHI shall be restricted to authorized users via authentication + authorization controls; access shall be managed across the user lifecycle. **What Pryv does for you** HDS Activity 3 sub-control aligning with ISO 27001 A.5.15 + A.5.18: the Pryv access + permissions primitive enforces per-stream access control across the access lifecycle (create / read / update / delete). Cross-link to ISO 27001 + HIPAA-Security for the parallel control rows. **Evidence** - tests: AA01, AA02, ACCP - derives from: iso-27001.A.5.15, iso-27001.A.5.18, hipaa-security.164.312(a)(1) - primitives: access, permissions, system-streams ### HDS Activity.3.audit: Activity 3, Audit logging (sub-control) Coverage: implemented · effort saved: high · draft Requirement: All access to ePHI shall be logged with sufficient detail for forensic investigation; logs shall be retained per the applicable retention policy. **What Pryv does for you** HDS Activity 3 audit sub-control inherits the Pryv audit primitive (per-user SQLite, every API method captured with access reference + timestamp). The retention period + log- review cadence are operator policy per the HDS audit pack. **Evidence** - tests: AT01, AT02, AT51, AT61 - derives from: iso-27001.A.8.15, hipaa-security.164.312(b) - primitives: audit, audit-event-stream ### HDS Activity.3.cryptography: Activity 3, Use of cryptography (sub-control) Coverage: configurable · effort saved: medium · draft Requirement: ePHI in transit shall be protected via TLS; cryptographic key management shall follow the operator's documented procedures. **What Pryv does for you** HDS Activity 3 cryptography sub-control: TLS in transit once you configure it, in the core (`http.ssl.*`, certificates from the built-in ACME integration when `letsEncrypt.enabled` is set) or at your reverse proxy (the core then serves plain HTTP behind it); the core sets no TLS version of its own (Node.js defaults, TLS 1.2 floor on Node 24). mTLS between cores once `bin/bootstrap.js` has written `storages.engines.rqlite.tls`, AES-256-GCM at-rest for operator secrets. Cross-link to ISO 27001 A.8.24 + HIPAA-Security §164.312(e)(1) for the parallel control rows. **Evidence** - tests: ACMEINT, ACMEORCH, CERTUTILS, BUNDLEENC, ATRENC - config keys: http.ssl.keyFile, http.ssl.certFile, letsEncrypt.enabled, letsEncrypt.atRestKey, storages.engines.rqlite.tls - derives from: iso-27001.A.8.24, hipaa-security.164.312(e)(1) - primitives: letsEncrypt-integration, multi-core-mTLS, encryption-at-rest-secrets ## HIPAA Breach Notification Rule (HIPAA-Breach) - Scope id: `hipaa-breach` (regulation) - Jurisdiction: US - Version: 45 CFR Part 164 Subpart D (HITECH 2013 Omnibus Final Rule) (2013-01-25) - Official text: https://www.ecfr.gov/current/title-45/subtitle-A/subchapter-C/part-164/subpart-D - Requirements: 13 (9 facilitated, 4 out-of-scope) - Browse: https://pryv.github.io/compliance-matrix/#/scope/hipaa-breach ### HIPAA-Breach 164.400: Applicability Coverage: facilitated · effort saved: low · mode: infrastructure · draft Requirement: Subpart D applies to covered entities, business associates, subcontractors and affiliated entities with respect to unsecured protected health information. **What Pryv does for you** Subpart D applies only to "unsecured" PHI, PHI that has not been rendered unusable through encryption or destruction per HHS guidance (NIST SP 800-111 / SP 800-88). Pryv's posture (TLS in transit in the core or at your proxy, as you configure it; operator-side encryption-at-rest; per-user backup files that `bin/backup.js` can encrypt itself) lets you put PHI inside the safe-harbor where you choose to, narrowing what §400 actually reaches in your deployment. **Evidence** - primitives: encryption-at-rest-secrets, letsEncrypt-integration ### HIPAA-Breach 164.402: Definitions, breach and unsecured PHI Coverage: facilitated · effort saved: medium · mode: evidence · draft Requirement: Defines "breach" (acquisition / access / use / disclosure not permitted under Subpart E + four risk-assessment factors) and "unsecured PHI" (not rendered unusable per HHS guidance). **What Pryv does for you** Two Pryv contributions to applying the §164.402 definitions: (1) the audit log is the data source for the §402 risk-assessment factors, nature of PHI involved, unauthorized person, whether PHI was actually acquired, mitigation extent; and (2) Pryv's access + permission model makes "acquisition / access / use / disclosure not permitted under Subpart E" a queryable property (was the access within its granted scope?) rather than an after-the-fact narrative. **Detail** §402(2) safe-harbor, "unsecured" excludes PHI made unusable through encryption guidance. In transit: TLS once configured, in the core (`http.ssl.*` / `letsEncrypt.*`) or at your proxy (the core serves plain HTTP without that configuration); at rest: operator-side encryption (when configured). AES-256-GCM is the at-rest cipher for the Pryv-managed secrets (platform DB), aligning with the NIST SP 800-111 AES guidance, though for ePHI content at rest, the operator-side encryption (LUKS / PG TDE / dm-crypt) is what governs the §402(2) status. §402(1) risk-assessment factors → Pryv data sources: - Nature + extent of PHI involved → audit row → API method + key request fields → infer streams + event types touched. - Unauthorized person → audit row → accessId → access holder. - Whether PHI was actually acquired or merely accessed → audit row → method (read vs. download attachments etc.). - Extent to which risk was mitigated → access version chain (was access revoked? when?), audit on revocation timestamp. **Evidence** - primitives: audit, encryption-at-rest-secrets, access, permissions ### HIPAA-Breach 164.404: Notification to individuals Coverage: facilitated · effort saved: medium · mode: evidence · draft Requirement: Following discovery of a breach of unsecured PHI, covered entity must notify each individual whose PHI has been breached without unreasonable delay and in no case later than 60 calendar days after discovery. **What Pryv does for you** The notification process splits into **identification** (Pryv-shipped, audit-log-driven per-subject roster, packaged into the one-command `bin/breach-scope.js` report) and **delivery** (voluntarily missing + operator-owned, Pryv's transactional mail surface isn't bulk-send; operators compose with their existing CRM / mail / SMS pipeline). The per-recipient audit-trace bridge uses operator-authored `compliance/breach-notification/sent-cmc` events on a compliance system stream, satisfying the §164.414 burden- of-proof obligation. Full delivery-side treatment in `context/breach-notification-delivery-operator-owned.md`. **Detail** Per-subject impact query: filter audit rows by (breachedAccessId, timeWindow) → distinct user ids. That's your §164.404 notification list, with evidence. The shipped `bin/breach-scope.js` (open-pryv.io `0b2874e0`) packages this into one command + adds §164.404(c)(1) (`recordCount` per read audit row) + the `scopedStreamIds` resolved query scope. Note: `scopedStreamIds` is an upper bound on exposure (the streams the query could reach), not the streams of the events actually returned, and the report does not derive PHI data categories from it; mapping streams to "types of PHI" stays editorial. §404(c) content elements (description of breach, types of PHI, steps individual should take, what entity is doing, contact info) are editorial; Pryv has no opinion on the wording. Delivery, including rate-limiting + retries + send-receipt tracking, uses the operator's existing notification stack (`context/breach-notification-delivery-operator-owned.md`). **Evidence** - primitives: audit, access - context notes: breach-notification-delivery-operator-owned ### HIPAA-Breach 164.406: Notification to media Coverage: out-of-scope · draft Requirement: Breach affecting more than 500 residents of a State or jurisdiction requires notification to prominent media outlets in that State or jurisdiction. **What Pryv does for you** Media notification is an organizational / communications procedure. No software contribution; the threshold determination (500 residents) is derivable from the §164.404 per-subject list, but the notification itself is operational. ### HIPAA-Breach 164.408: Notification to Secretary Coverage: out-of-scope · draft Requirement: Covered entity must notify the Secretary of HHS following the discovery of a breach of unsecured PHI; timing depends on whether ≥500 individuals are affected. **What Pryv does for you** HHS notification (via the OCR online portal) is procedural and organizational. Pryv's audit + access-version data inform the content (subjects affected, dates, root cause) but the submission itself is operator-side. ### HIPAA-Breach 164.410: Notification by a business associate Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Business associate must notify the covered entity of a breach without unreasonable delay and in no case later than 60 days after discovery. **What Pryv does for you** When you (the implementer) act as a business associate to a covered entity and store their PHI on your Pryv deployment, your BA-to-CE notification chain is operational. The CMC plugin's cross-platform consent + revocation flow gives you the technical substrate for inter-organization handshakes; audit data lets you meet the "without unreasonable delay" element on the data-gathering side. **Evidence** - primitives: CMC, audit ### HIPAA-Breach 164.412: Law enforcement delay Coverage: out-of-scope · draft Requirement: A delay of notification (to individuals, media, or HHS) is permitted when a law-enforcement official states that notification would impede investigation or cause national- security damage. **What Pryv does for you** Procedural, depends on receipt of the law-enforcement statement (oral with 30-day cap, or written with the official's time-limit). No software role beyond preserving the audit log across the delay period (which happens by default). ### HIPAA-Breach 164.414: Administrative requirements and burden of proof Coverage: facilitated · effort saved: medium · mode: evidence · draft Requirement: Covered entity / business associate must maintain documentation sufficient to demonstrate that all notifications were made or that the impermissible use / disclosure did not constitute a breach. **What Pryv does for you** "Burden of proof" is met with evidence; Pryv's audit + access-version chain is the technical evidence layer ("we know exactly what was accessed by which credential at what time"), and the shipped `bin/breach-scope.js` bundles the audit walk + integrity hashes for the affected window into one artefact. The organizational documentation (incident response records, notification records, decisions to not notify with rationale) sits on top of that data. **Evidence** - primitives: audit, access **Planned changes** - feature: Chained audit log IS the burden-of-proof artefact (row could shift F:Evidence|Med → F:Evidence|High) ### HIPAA-Breach 164.404(b): Implementation specification, timeliness of notification Coverage: facilitated · effort saved: medium · mode: evidence · draft Requirement: Covered entity shall provide the required notification without unreasonable delay and in no case later than 60 calendar days after discovery of a breach. **What Pryv does for you** The 60-day clock is procedural, the covered entity owns the incident-response cadence. The shipped `bin/breach-scope.js` compresses the "discovery" + "scoping" steps that dominate the timeline: one command on the subject's home core answers "what was accessed, by whom, when, how many records", so the clock is dominated by editorial work, not data-gathering. The discipline of acting on that data within the 60-day window is the operator's process. **Evidence** - derives from: hipaa-breach.164.404 - primitives: audit, observability-provider ### HIPAA-Breach 164.404(c): Implementation specification, content of notification Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Notification to individuals shall include a brief description of what happened (date of breach + date of discovery), description of PHI involved, steps individuals should take, what the entity is doing, and contact procedures. **What Pryv does for you** Content of the notification is the covered entity's editorial artefact; Pryv has no opinion on the wording. The shipped `bin/breach-scope.js` report machine-derives inputs to two of the five §404(c) content elements: the what-happened description (time window, methods invoked, record counts) and raw material for the PHI-involved description (streams in the compromised access's query scope). The stream list is an upper bound on exposure, mapping streams to "types of PHI" is editorial, and the remaining elements (steps individuals should take, what the entity is doing, contact procedures) stay operator-side. **Evidence** - derives from: hipaa-breach.164.404 - primitives: audit, access ### HIPAA-Breach 164.404(d): Implementation specification, methods of individual notification Coverage: out-of-scope · draft Requirement: Written notice by first-class mail (or email if requested by individual); telephone or in-person where urgent due to imminent misuse; substitute notice where contact information insufficient / out-of-date (with web-posting + media-notice variants per threshold). **What Pryv does for you** Notification method choice is operational. Pryv has no software role in actually delivering the notice (Pryv is not a mailer). When the entity uses Pryv events to record the notice-delivery attempt (e.g., a `breach-notice/sent` event per affected individual), the audit chain proves the delivery attempt. **Evidence** - derives from: hipaa-breach.164.404 ### HIPAA-Breach 164.402(1): Definition of "breach", four-factor risk assessment Coverage: facilitated · effort saved: high · mode: evidence · draft Requirement: "Breach" means the acquisition, access, use or disclosure of PHI in a manner not permitted under Subpart E, which compromises the security or privacy of the PHI. Compromise is determined via a four-factor risk assessment: (i) nature + extent of PHI involved, (ii) unauthorized person, (iii) whether PHI was acquired or viewed, (iv) extent risk has been mitigated. **What Pryv does for you** The four risk-assessment factors all draw on Pryv data: (i) nature + extent: audit-row method + key request fields + derived event-type set from the touched streams. (ii) unauthorized person: audit-row accessId → access holder with clientData.role + clientData.purpose. (iii) actually acquired vs merely accessed: method-level distinction in audit (events.get vs attachments.get, success vs unauthorized error). (iv) mitigation extent: access-version chain showing revoke / scope-down timestamps relative to the incident. The risk-assessment write-up is the operator's analytical artefact; Pryv supplies the structured inputs. **Evidence** - derives from: hipaa-breach.164.402 - primitives: audit, access ### HIPAA-Breach 164.402(2): Definition of "unsecured protected health information", safe-harbor Coverage: facilitated · effort saved: medium · mode: infrastructure · draft Requirement: "Unsecured PHI" means PHI not rendered unusable, unreadable or indecipherable to unauthorized persons through use of a technology or methodology specified in HHS guidance (NIST SP 800-111 for at-rest encryption; NIST SP 800-52 / SP 800-77 / SP 800-113 / FIPS 140-2 for in-transit encryption; NIST SP 800-88 for destruction). **What Pryv does for you** The safe-harbor narrows what triggers Subpart D notification: PHI that's actually secured per HHS guidance is outside §164.402's "unsecured PHI" definition and a leak of it doesn't compel notification. With TLS configured (in the core via `http.ssl.*` and the built-in ACME integration, or at your proxy), plus AES-256-GCM for platform secrets at rest, the in-transit half sits inside the safe-harbor; without that configuration the core serves plain HTTP, so make sure no hop carries it. The at-rest half for ePHI content itself depends on the operator's chosen at-rest encryption (operator-side LUKS / PG TDE / dm-crypt). **Detail** Practical guidance: pair `letsEncrypt.enabled: true` with operator- side full-disk encryption on every node + encrypted backup archives to maximize §402(2) safe-harbor reach. NIST SP 800-111-equivalent at-rest encryption applies whether the PHI is in the primary engine, an attachment file, or a `bin/backup.js` output. **Evidence** - derives from: hipaa-breach.164.402, hipaa-security.164.312(a)(2)(iv), hipaa-security.164.312(e)(1) - primitives: letsEncrypt-integration, encryption-at-rest-secrets, multi-core-mTLS **Planned changes** - feature: End-to-end encryption broadens safe-harbor coverage to bulk event data ## HIPAA Privacy Rule (HIPAA-Privacy) - Scope id: `hipaa-privacy` (regulation) - Jurisdiction: US - Version: 45 CFR Part 160 + Part 164 Subparts A + E (as amended through the HITECH 2013 Omnibus Final Rule) (2013-01-25) - Official text: https://www.ecfr.gov/current/title-45/subtitle-A/subchapter-C/part-164/subpart-E - Requirements: 35 (7 implemented, 2 configurable, 21 facilitated, 5 out-of-scope) - Browse: https://pryv.github.io/compliance-matrix/#/scope/hipaa-privacy ### HIPAA-Privacy 164.502: Uses and disclosures of PHI, general rules Coverage: facilitated · effort saved: medium · mode: primitive · draft Requirement: A covered entity may not use or disclose protected health information, except as permitted or required by the Privacy Rule. **What Pryv does for you** Pryv's permission model is the technical enforcement layer for Article 502: an app or counterparty can only read or write streams its access permits. The "permitted or required by the Privacy Rule" determination, which use cases are TPO, when authorization is required, what minimum-necessary means in your workflow, is your programmatic decision; Pryv enforces whatever scope you grant. **Detail** Workforce, apps, and counterparties act on PHI only by holding an access whose `permissions[]` allows the specific stream + level. Disclosures to third parties (via shared accesses or CMC capability flows) inherit the same enforcement model. The audit log makes every use / disclosure attributable to a specific access at a specific time, which is the substrate for §164.528 accounting. **Evidence** - primitives: access, permissions, audit ### HIPAA-Privacy 164.506: Uses and disclosures for treatment, payment, healthcare operations (TPO) Coverage: facilitated · effort saved: medium · mode: storage · draft Requirement: Permits use and disclosure of PHI for the entity's own TPO, and under defined conditions for another entity's TPO. **What Pryv does for you** TPO is the largest category of permitted uses. Pryv lets you mint accesses tagged with the TPO purpose in `clientData` (e.g., `purpose: "treatment"`); the permission model enforces the scope. The TPO-vs-not classification of any specific workflow is your programmatic judgement; Pryv carries it forward into the audit trail. **Detail** A common pattern: separate accesses per purpose (one "treatment-app" access; one "billing-app" access; one "ops-analytics" access), each independently revocable and auditable. `access.clientData.purpose` makes the classification an artefact rather than a verbal claim. **Evidence** - primitives: access, permissions, clientData ### HIPAA-Privacy 164.508: Uses and disclosures requiring authorization Coverage: implemented · effort saved: high · draft Requirement: Uses and disclosures not otherwise permitted require a written authorization from the individual that meets defined content requirements. **What Pryv does for you** The authorization Pryv mints when your subject grants an access IS the §164.508 authorization record, versioned, immutable per version, with the granted scope (permissions) and the authorization text (clientData or a `consent/request-cmc` event) inseparable. The access keeps every previous version; a request event keeps its previous versions only with `versioning.forceKeepHistory: true` (off by default), so do not edit it after sending unless that is on. Withdrawal is a single API call. For cross-account / cross-entity authorizations, the CMC plugin carries the negotiation state. **Detail** Section 508(c) elements (description, identification, signature equivalent, expiration, right to revoke, etc.) map naturally to access + clientData fields: - description of information disclosed → `permissions[]` - description of authorized recipients → access type + counterparty (CMC pair) - signature equivalent → the act of granting the access through the auth flow (auditable) - expiration → `access.expires` - right to revoke → `accesses.delete` + audit row at revocation; for a cross-account (CMC) authorization, the individual's own accept event also records the revocation, whichever party ended it (`content.withdrawal`, open-pryv.io 2.0.0-rc.36) `[CN58]`, `[CN59]`, `[CN60]` - re-disclosure statement → `clientData.redisclosure_notice` Implementer responsibility: ensure the consent UX presents the §508(c) elements at the grant moment. **Evidence** - tests: AA01, ACCP, CN58, CN59, CN60 - primitives: access, clientData, CMC, event ### HIPAA-Privacy 164.510: Uses and disclosures requiring opportunity to agree or object Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: Disclosures to family / friends or for facility-directory purposes may proceed if the individual is given the opportunity to agree or object, and the entity reasonably infers no objection. **What Pryv does for you** The opportunity-to-agree-or- object construct is operational. Pryv lets you record the offered choice and the individual's response as durable artefacts (clientData on the relevant access, or a `consent/notice-cmc` / custom event), so the §164.510 reasonable-inference becomes a record rather than recollection. **Evidence** - primitives: access, clientData, event ### HIPAA-Privacy 164.512: Uses and disclosures for which authorization or opportunity not required Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: Twelve categories of permitted disclosures without authorization (public health, law enforcement, etc.), each with specific conditions. **What Pryv does for you** Section 512 disclosures are operationally driven by the circumstances (subpoena, public- health request, etc.). Pryv's contribution is durability: every such disclosure must still go through an access, and the audit log captures it. Recording the §512 category and rationale in `access.clientData.legal_basis` makes the disclosure justification recoverable later. **Detail** Recommended pattern: mint a purpose-specific access per §512 invocation (`clientData.disclosure_category: "law_enforcement"`, `clientData.statute: "..."` etc.), execute the disclosure, and revoke the access. The audit trail then shows the full lifecycle attached to the legal-basis claim. **Evidence** - primitives: access, clientData, audit ### HIPAA-Privacy 164.514(a): De-identification of PHI Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: PHI that has been de-identified (Safe Harbor method or Expert Determination) is no longer subject to the Privacy Rule. **What Pryv does for you** Pryv stores whatever event content you write; de-identification is a transformation you perform on the data before storage (or before disclosure). Custom event types + the per-stream design let you keep an identified and a de-identified copy under separate permission scopes, simplifying §514(a) workflows. **Detail** A typical pattern: identified events on a `clinical/*` stream tree with restricted access; a parallel `research/*` stream tree holding de-identified projections, accessible to a broader analyst group. The de-identification logic itself (e.g., Safe Harbor's 18-identifier list) is your application code; Pryv stores the output. **Evidence** - primitives: stream, event, data-types ### HIPAA-Privacy 164.514(d): Minimum necessary use, disclosure, and requests Coverage: implemented · effort saved: high · draft Requirement: Covered entity must make reasonable efforts to limit PHI to the minimum necessary to accomplish the intended purpose. **What Pryv does for you** Per-stream permissions are the minimum-necessary primitive: each access carries only the streams + levels needed for its purpose, so by construction the holder cannot see more PHI than granted. Your stream layout + permission-design choices determine the granularity at which "minimum necessary" can be enforced technically. **Detail** Practical guidance: - Design stream topology so distinct purposes live on distinct subtrees (treatment / billing / research / ops). - Mint per-purpose accesses with `permissions[]` pointing at the smallest necessary subtree. - Avoid blanket `*` permissions except for personal-token / admin roles where unrestricted access is the stated need. **Evidence** - tests: AA01, ACCP - primitives: access, permissions, stream ### HIPAA-Privacy 164.520: Notice of privacy practices Coverage: facilitated · effort saved: medium · mode: storage · draft Requirement: Covered entity must provide a notice that adequately describes its uses and disclosures of PHI and the individual's rights. **What Pryv does for you** The notice itself is your editorial content. Pryv preserves the notice text shown to each subject, typically on `access.clientData.privacy_notice` or as a dedicated event, so the same words presented are recoverable per subject per time. The customer-facing `app-web-auth3` template is the surface where the notice typically appears. **Evidence** - primitives: access, clientData, app-web-auth3, event ### HIPAA-Privacy 164.522: Right to request restriction; confidential communications Coverage: configurable · effort saved: medium · draft Requirement: Individual has the right to request restrictions on uses and disclosures and to receive confidential communications by alternative means or at alternative locations. **What Pryv does for you** A granted restriction is a scope-down on the relevant access (`accesses.update` to narrower permissions) or a revocation (`accesses.delete`). The access-version chain proves what state was in force before the restriction and from when it applies. Confidential-communications choices (alternate address, phone) live in `account.clientData` or a dedicated event. **Detail** Note that §522(a)(1)(vi) (post-HITECH) made restrictions on disclosures to a health plan for out-of-pocket-paid services mandatory on request. The Pryv pattern is the same, mint / narrow the access tied to the health-plan workflow, but you must apply it without operational discretion when this specific condition is met. **Evidence** - tests: AA02, ACCP - config keys: access.permissions - primitives: access, permissions, clientData ### HIPAA-Privacy 164.524: Right of access by the individual Coverage: implemented · effort saved: high · draft Requirement: Individual has a right of access to inspect and obtain a copy of their PHI in a designated record set, in the form and format requested if readily producible. **What Pryv does for you** Your subject, holding a personal token, reads everything via the standard Pryv API, events, streams, accesses (with history), audit records, attachments, in the canonical event-type schemas. Wrap that in a subject-portal app and you have §164.524 covered end-to-end. The 30-day response timeline is your process target, not a software latency. **Detail** Form-and-format: events return as canonical JSON validated against `data-types` schemas, structured, machine-readable, and arbitrary JSON-consumer-friendly. Attachments download in their stored MIME-type. If a subject requests a specific format Pryv doesn't natively produce (e.g., CDA C-CDA), your portal layer transforms. **Evidence** - tests: AA01, EGSQ, UZEV - specs: EVENT.BASE, STREAM.BASE - primitives: access, stream, event, audit, data-types, account-backup-tool ### HIPAA-Privacy 164.526: Right to amend Coverage: configurable · effort saved: high · draft Requirement: Individual has a right to have a covered entity amend PHI or a record about the individual in a designated record set. **What Pryv does for you** `events.update` is the amendment primitive, and the audit log records who amended which event and when. The prior content is kept, so the amendment trail shows what changed, only on a deployment with `versioning.forceKeepHistory: true` (off by default; see `context/event-history.md`): set it, or record each amendment as a new event linked to the one it amends. Configurable rather than implemented: §164.526(c)(1) asks you to append the amendment to, or link it from, the record it amends, and on the default configuration an update overwrites that record; one setting (or that modelling convention) gives you the trail. The §164.526 process (request → decision → action → notice) is yours to run. **Detail** For denied amendments where the individual files a statement of disagreement (§526(d)), store the statement as a separate event on a designated-record-set stream linked back to the original via `clientData.amends_event_id`, so the disagreement travels with the data on subsequent disclosures. **Evidence** - tests: PTU1 - specs: EVENT.BASE - config keys: versioning.forceKeepHistory - primitives: event - context notes: event-history ### HIPAA-Privacy 164.528: Accounting of disclosures Coverage: implemented · effort saved: high · draft Requirement: Individual has a right to receive an accounting of disclosures of PHI made by the covered entity in the 6 years prior to the request, with specified exceptions. **What Pryv does for you** Pryv's audit log is the §164.528 substrate: every API method call attributed to an access (with version) is recorded. Filtering by access category, TPO accesses, §164.512 disclosures, etc., lets you derive the §164.528-eligible subset (which excludes TPO). Six-year retention of the audit log is your operator-side configuration. **Detail** The accounting must include: date, recipient, brief description of PHI disclosed, purpose. Each field has a Pryv source: - date → audit row timestamp - recipient → access holder (`access.id`) or counterparty (for shared / CMC accesses) - description → API method + URL query/path params recorded in audit. **The audit log does NOT capture the request body**, so the description is "what was disclosed" at the API-shape level (e.g., `events.get` on a given stream), not the per-event content, sufficient under §164.528 and favourable for data minimisation (the audit row carries no residual PHI when the underlying event is later erased). See `docs/pryv-primitives.md` audit entry for the full capture catalogue. - purpose → `access.clientData.purpose` recorded at grant time Pre-computing per-subject accounting reports periodically (and storing them on a dedicated stream) is a useful operational pattern for fast response to requests. **Evidence** - tests: AT01, AT51, AT61, AT65 - primitives: audit, access, clientData ### HIPAA-Privacy 164.530(a): Privacy officer / contact person Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Covered entity must designate a privacy official and a contact person responsible for receiving complaints. **What Pryv does for you** Designation is organizational. Pryv's contribution is indirect: the audit log gives the privacy official a concrete artifact to review when investigating complaints or auditing internal use. **Evidence** - primitives: audit ### HIPAA-Privacy 164.530(b): Training Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Covered entity must train all members of its workforce on its privacy policies and procedures. **What Pryv does for you** Training itself is your programme. Pryv's contribution to operationalizing it: the audit log + observability data make training-effectiveness measurable (e.g., does role X exercise access patterns matching policy after training?). The training content + record-keeping are yours. **Evidence** - primitives: audit, observability-provider ### HIPAA-Privacy 164.530(c): Safeguards Coverage: facilitated · effort saved: medium · mode: awareness · draft Requirement: Covered entity must have appropriate administrative, technical, and physical safeguards to protect the privacy of PHI. **What Pryv does for you** Section 530(c) is the Privacy Rule's pointer to the Security Rule and to physical / administrative safeguards. See the HIPAA-Security rows for the technical safeguards Pryv contributes; §164.310 (Physical) for the operator's hosting environment. Together those rows constitute the §530(c) answer for this Pryv deployment. **Evidence** - derives from: hipaa-security.164.308(a)(1)(i), hipaa-security.164.312(a)(1), hipaa-security.164.312(e)(1) - primitives: access, permissions, audit, letsEncrypt-integration, encryption-at-rest-secrets ### HIPAA-Privacy 164.530(f): Mitigation Coverage: facilitated · effort saved: medium · mode: evidence · draft Requirement: Covered entity must mitigate, to the extent practicable, any harmful effect of a use or disclosure in violation of its policies or the Privacy Rule. **What Pryv does for you** Audit log + access version chain let you scope what was disclosed to whom and when, the first step in any mitigation. `bin/backup.js --restore` is available if mitigation involves rolling back data state; `accesses.delete` is the primitive to revoke access from the offending counterparty. **Evidence** - primitives: access, audit, backup-restore ### HIPAA-Privacy 164.502(b): Minimum necessary uses, disclosures, requests Coverage: implemented · effort saved: high · draft Requirement: Covered entity must make reasonable efforts to limit PHI to the minimum necessary to accomplish the intended purpose, with enumerated exceptions (treatment disclosures, disclosures to the individual, authorized disclosures, required-by-law disclosures). **What Pryv does for you** Same primitive mapping as §164.514(d) minimum-necessary: per- stream permissions are the technical control; the holder cannot see more PHI than the granted scope permits. §502(b)(2) exceptions are programmatic, the implementer leaves those accesses unscoped per the exception's permission, and the audit log records the broader access for accountability. **Evidence** - tests: AA01, ACCP - derives from: hipaa-privacy.164.514(d), gdpr.Art.5 - primitives: access, permissions, stream ### HIPAA-Privacy 164.502(e)(1): Disclosures to business associates Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: Covered entity may disclose PHI to a business associate (BA) and may allow a BA to create, receive, maintain, or transmit PHI on its behalf only with satisfactory assurances (typically via a written contract, the BAA) that the BA will appropriately safeguard the information. **What Pryv does for you** The technical disclosure is mediated by the access primitive, mint a BA-specific access with `clientData.role = "business_associate"` + `clientData.baa_id = ""`, scoped to the subjects / streams covered by the BAA. Cross-platform BA arrangements (where the BA runs their own Pryv) inherit the CMC capability pattern for cross- account flow. **Evidence** - derives from: hipaa-security.164.314(a)(1), gdpr.Art.28 - primitives: access, clientData, CMC ### HIPAA-Privacy 164.530(d): Complaints to the covered entity Coverage: facilitated · effort saved: medium · mode: storage · draft Requirement: Covered entity must provide a process for individuals to make complaints concerning the entity's policies + procedures or its compliance with the Privacy Rule; document complaints received and disposition. **What Pryv does for you** A complaint-intake workflow stores each complaint as an event on a designated `complaints/*` stream with `clientData.disposition` tracking outcome. The audit log captures the timestamp + actor on each disposition update, making the §530(d)(2) documentation requirement an automatic byproduct of normal record-keeping. **Evidence** - primitives: event, stream, audit ### HIPAA-Privacy 164.530(e): Sanctions Coverage: out-of-scope · draft Requirement: Covered entity must have and apply appropriate sanctions against members of its workforce who fail to comply with the privacy policies + procedures. **What Pryv does for you** Sanctions are an HR / disciplinary process. No software role at the sanction-decision layer; the audit log gives the underlying evidence ("did this person actually access X?") that HR processes evaluate. ### HIPAA-Privacy 164.530(g): Refraining from intimidating + retaliatory acts Coverage: out-of-scope · draft Requirement: Covered entity may not intimidate, threaten, coerce, discriminate against, or take other retaliatory action against any individual for exercising any right under the Privacy Rule. **What Pryv does for you** Anti-retaliation is an organizational policy + culture commitment; no software role. ### HIPAA-Privacy 164.530(i): Policies and procedures Coverage: facilitated · effort saved: medium · mode: storage · draft Requirement: Covered entity must implement policies and procedures with respect to PHI that are designed to comply with the standards, implementation specifications, and other requirements of this Subpart E. **What Pryv does for you** Same pattern as HIPAA- Security §164.316(a): policies-as-data on a `compliance/policies/*` stream get retention + audit, and versioning once `versioning.forceKeepHistory: true` is set (off by default). The drafting + approval + review-cycle procedure is the privacy officer's. Cross-link to §164.316(a) preserves the Security Rule's parallel obligation. **Evidence** - derives from: hipaa-security.164.316(a) - primitives: event, stream, audit, backup-restore ### HIPAA-Privacy 164.510(b): Disclosures for involvement in care + for notification purposes Coverage: facilitated · effort saved: medium · mode: storage · draft Requirement: Covered entity may, in accordance with §510(b)(2) standards, disclose to a family member, other relative, close personal friend or other person identified by the individual, PHI directly relevant to that person's involvement with the individual's care or payment for care. **What Pryv does for you** The §510(b) "directly relevant" determination + relationship verification are clinical-workflow concerns. Pryv pattern: mint a time-bounded access for the involved person with permissions narrowed to "directly relevant" streams + `clientData.relationship` capturing the §510(b)(1) basis (family member name, role, individual's opportunity-to-object record). **Evidence** - derives from: hipaa-privacy.164.510 - primitives: access, clientData, event ### HIPAA-Privacy 164.512(b): Uses + disclosures for public-health activities Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: Covered entity may disclose PHI for public-health activities to public-health authorities authorized by law to collect or receive such information, including reporting of disease, injury, vital events, conduct of public-health surveillance. **What Pryv does for you** Public-health-authority recipient is recorded on the access's `clientData.recipient_authority` + `clientData.statute` for the §512(b) statutory basis. Audit log anchors the disclosure to a specific timestamp + event range. The "authorized by law" determination is the covered entity's legal judgement. **Evidence** - derives from: hipaa-privacy.164.512 - primitives: access, clientData, audit ### HIPAA-Privacy 164.512(f): Uses + disclosures for law enforcement purposes Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: Covered entity may disclose PHI for law-enforcement purposes under specific conditions: court order / warrant, administrative request, identification + location, victim of crime, decedent, etc. **What Pryv does for you** §512(f) categories drive vocabulary for `clientData.law_enforcement_basis` (e.g., `"f_1_i_court_order"`, `"f_2_ii_subpoena"`, `"f_4_victim"`). Per-instance disclosure access minted + revoked; audit log preserves the chain. The decision of whether the request qualifies under §512(f) is legal counsel's, not Pryv's. **Evidence** - derives from: hipaa-privacy.164.512 - primitives: access, clientData, audit ### HIPAA-Privacy 164.524(b): Right of access, requests + responses Coverage: facilitated · effort saved: medium · mode: storage · draft Requirement: Covered entity may require individuals to make access requests in writing (within reasonable limitations); must act on request within 30 days (with one 30-day extension permitted with written notice). **What Pryv does for you** Request-intake workflow stores each request as an event on a designated `access-requests/*` stream with `clientData.due_by` computed from receipt timestamp. The 30/30-day operational cadence is the covered entity's process; once the response is ready, the individual exercises §524 directly via the standard Pryv API (see the §164.524 parent row). **Evidence** - derives from: hipaa-privacy.164.524 - primitives: access, event ### HIPAA-Privacy 164.524(c): Right of access, provision of access Coverage: implemented · effort saved: high · draft Requirement: Covered entity must provide access in the form + format requested if readily producible; in a readable hard-copy form or other form as agreed; must provide a summary if the individual agrees in advance + agrees to applicable fees. **What Pryv does for you** The Pryv API delivers events in canonical JSON (data-types schemas), "readily producible" in the §524(c) sense. Implementer's portal can transform to PDF / printed format where requested. Summaries are application-layer constructions from the same source events. **Evidence** - tests: EGSQ, UZEV - derives from: hipaa-privacy.164.524 - primitives: event, stream, data-types ### HIPAA-Privacy 164.502(g): Personal representatives Coverage: facilitated · effort saved: medium · mode: primitive Requirement: Covered entity must treat a personal representative as the individual with respect to uses + disclosures of PHI, subject to enumerated exceptions (abuse / neglect concerns, endangerment). **What Pryv does for you** Pryv's account-delegation primitive (`open-pryv.io/components/delegation/`) is the technical mechanism for "treat the personal representative as the individual": the representative holds an **owner-equivalent delegate token** over the subject's account, full owner authority over the data, with the single exception that a delegate can never remove its own delegation. Every action the representative takes is **audited per delegate on the subject's account**, so uses and disclosures made under the representative's authority are attributable. The individual **revokes** the representative by a genuine login on their own account and detaching (the authoritative teardown; a delegate cannot block it), which is the technical shape of §164.502(g)'s exceptions (abuse / neglect / endangerment) once the covered entity makes that clinical / legal determination. Same-core and cross-core (same platform) both carry the audited attribution; see `context/delegation-model.md`. The representative can also authorize an app for the individual through the auth request: the app receives an ordinary app access on the individual's account (never the representative's owner-equivalent token), stamped by the server with a non-forgeable lineage attribute naming the representative, and its uses and disclosures are audited on the individual's account with the representative named on every record. Revoking the representative revokes every app access granted that way (open-pryv.io 2.0.0-rc.23). A lighter-weight alternative where full owner-equivalence is not wanted: the representative holds a scoped `app` / `shared` access instead, with `clientData.representative_relationship` + `clientData.legal_basis` capturing the relationship and `accesses.update` / `accesses.delete` narrowing or removing it. The "abuse / neglect / endangerment" determination is clinical / legal judgement either way. **Evidence** - tests: DCH01, DCH05, DCH12 - derives from: hipaa-privacy.164.502 - primitives: access, delegation, clientData, audit - context notes: delegation-model ### HIPAA-Privacy 164.512(a): Uses + disclosures required by law Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: Covered entity may use or disclose PHI to the extent that such use or disclosure is required by law and the use or disclosure complies with and is limited to the relevant requirements of such law. **What Pryv does for you** "Required by law" disclosures still ride on accesses; record the statutory basis in `clientData.statute` so the audit chain ties the disclosure to the legal authority. The compliance burden of the cited law is separate. **Evidence** - derives from: hipaa-privacy.164.512 - primitives: access, clientData, audit ### HIPAA-Privacy 164.514(b): De-identification, Implementation specifications Coverage: out-of-scope · draft Requirement: Two methods: (1) Expert determination that the risk is very small; (2) Safe Harbor, removal of 18 enumerated identifiers + no actual knowledge that residual information could re-identify. **What Pryv does for you** Choice of method + execution are app-side. Pryv stores the output of either method as ordinary events on the de-identified streams. **Evidence** - derives from: hipaa-privacy.164.514(a) ### HIPAA-Privacy 164.514(c): De-identification, Re-identification Coverage: facilitated · effort saved: medium · mode: primitive · draft Requirement: Covered entity may assign a code or other means of record identification to allow information de-identified under §514(b) to be re-identified by the covered entity, provided the code is not derived from / related to information about the individual + the entity does not use / disclose the code for any other purpose. **What Pryv does for you** `accesses.create {randomAlias:true}` provides the re-identification code directly: it mints a platform-unique `r-XXXXXXXX` alias that is random by construction (does not encode PHI), so it satisfies §514(c)(1)(ii) out of the box. The platform holds the alias-to-user mapping and the aliased access exposes only the alias, the covered entity re-identifies by resolving the alias, and the code is used for no other purpose. Since open-pryv.io `4547b32a` (2.0.0-rc.66) the alias survives a backup and restore (`[BKAL1]`) and routes on a single core answering DNS (`[ALRT1]`). The alias keeps the username from the recipient, and since open-pryv.io 2.0.0-rc.69 the token is accepted under its alias only, so a recipient who suspects whose record it is cannot confirm the guess with the token (`[AL13]`, `[OPSE5]`; earlier releases accepted it under every name of the account). The data stays linked to the account, so the alias does not by itself make it de-identified under §514(b): that determination stays yours. When the workflow instead needs an explicit code-to-PHI map, keep it on a dedicated `re-id-map/*` system- stream-adjacent subtree with access permitted only to the re-identification administrator role; the code generation method (random / hash-of-non-PHI) must not encode PHI per §514(c)(1)(ii). To link an account to a record id your EHR already uses (a patient id), external ids (open-pryv.io 2.0.0-rc.58, `external-id-index`) keep the re-identification means with you, not the platform: your service sends `HMAC(K_namespace, recordId)` under a key it holds, and Pryv stores only a token of that value mapped to a core, never the record id nor the key, and never returns the value `[XIDC1]`, `[XIDG1]`, `[XIDN4]`. The blinded value is derived from the record id, so it is not by itself a code "not derived from" information about the individual (§514(c)(1)): whether your design meets §514(c) rests on your key custody (the key, the means of re-identification, is not disclosed nor used for another purpose, §514(c)(2)) and is your determination. **Evidence** - tests: XIDC1, XIDG1, XIDN4, BKAL1, ALRT1, AL13, OPSE5 - derives from: hipaa-privacy.164.514(a) - primitives: randomAlias, stream, system-streams, access, clientData, external-id-index ### HIPAA-Privacy 164.528(b): Accounting of disclosures, Implementation specifications Coverage: implemented · effort saved: high · draft Requirement: Accounting must include, for each disclosure: date, name of entity / person who received PHI, brief description of PHI disclosed, brief statement of the purpose or copy of written request. **What Pryv does for you** Each §528(b)(2) field has a Pryv source (date / name / PHI description / purpose), see the §164.528 parent row for the mapping. The pre-computed accounting report pattern (storing results on a dedicated stream) keeps the §528 response window tractable. **Evidence** - tests: AT01, AT51, AT61, AT65 - derives from: hipaa-privacy.164.528 - primitives: audit, access, clientData ### HIPAA-Privacy 164.504(e): Organizational requirements, business associate contracts Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: Covered entity may permit a business associate to create, receive, maintain, or transmit PHI on its behalf only with satisfactory assurances via written contract meeting the BAA content requirements of §164.504(e)(2). **What Pryv does for you** The §164.504(e) BAA content is contractual. Pryv-side support for executing the contract terms: BA access tagged with `clientData.baa_id` + `clientData.role = "business_associate"`, scope narrowed to subjects + streams covered by the BAA, audit-log accountability for every action under the BA access. **Evidence** - derives from: hipaa-security.164.314(a)(1), hipaa-privacy.164.502(e)(1), gdpr.Art.28 - primitives: access, clientData, audit, CMC ### HIPAA-Privacy 164.504(g): Organizational requirements, group health plans Coverage: out-of-scope · draft Requirement: Group health plan may disclose PHI to a plan sponsor only upon receipt of certification that the plan documents have been amended per §164.504(f) restrictions. **What Pryv does for you** Group-health-plan / plan-sponsor arrangements are organizational / contractual. No software role. ### HIPAA-Privacy 164.502(j): Disclosures by whistleblowers + workforce member crime victims Coverage: out-of-scope · draft Requirement: Workforce member or business associate disclosure of PHI to a regulatory authority / law enforcement / health oversight agency is not a violation where the workforce member / BA believes in good faith that the entity has engaged in unlawful conduct + meets §502(j)(1) conditions. **What Pryv does for you** Whistleblower protections are legal framing. No software role; the disclosing person's audit-trail evidence under their access may be cited in subsequent proceedings. ## HIPAA Security Rule (HIPAA-Security) - Scope id: `hipaa-security` (regulation) - Jurisdiction: US - Version: 45 CFR Part 164 Subpart C (as amended through the HITECH 2013 Omnibus Final Rule) (2013-01-25) - Official text: https://www.ecfr.gov/current/title-45/subtitle-A/subchapter-C/part-164/subpart-C - Requirements: 41 (9 implemented, 8 configurable, 16 facilitated, 8 out-of-scope) - Browse: https://pryv.github.io/compliance-matrix/#/scope/hipaa-security ### HIPAA-Security 164.308(a)(1)(i): Security Management Process, standard Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Implement policies and procedures to prevent, detect, contain, and correct security violations. **What Pryv does for you** The Security Management Process is a programme you run as the covered entity / business associate, risk analysis, risk-management decisions, sanctions, activity review. Pryv supplies the technical raw material (audit log, system-level observability) that several of those activities draw on, particularly the §164.308(a)(1)(ii)(D) Information System Activity Review specification. The umbrella programme itself remains yours to define and run. **Detail** The four implementation specifications under (a)(1)(ii), risk analysis (R), risk management (R), sanction policy (R), and information system activity review (R), each have their own row where the Pryv contribution is more direct. This row covers the umbrella standard itself: a written, maintained programme. **Evidence** - primitives: audit, observability-provider ### HIPAA-Security 164.308(a)(1)(ii)(D): Information system activity review, Required Coverage: implemented · effort saved: high · draft Requirement: Implement procedures to regularly review records of information system activity, such as audit logs, access reports, and security incident tracking reports. **What Pryv does for you** Every API call is captured by Pryv's per-user audit log; the `audit.get` method exposes it for periodic review. Observability (opt-in telemetry emitter) gives system-level activity reports for the infrastructure side. The "regular review" cadence is your written procedure. **Detail** Audit records carry timestamp, user, access reference (accessId + accessSerial), API method, key request fields, success / error. This is the raw material for both routine review (who accessed what, when) and incident-driven investigation. The audit-event-stream optional channel surfaces audit records into the subject's own streams, useful when the subject participates in review. **Technical** Audit storage: per-user SQLite in `open-pryv.io/components/audit/`. Access method: `audit.get`. Tests live under `open-pryv.io/components/audit/test/`. **Evidence** - tests: AT01, AT02, AT03, AT51 - primitives: audit, audit-event-stream, observability-provider ### HIPAA-Security 164.308(a)(3)(ii)(C): Termination procedures, Addressable Coverage: implemented · effort saved: high · draft Requirement: Implement procedures for terminating access to electronic protected health information when employment ends or workforce role changes. **What Pryv does for you** Workforce access to ePHI is mediated by Pryv accesses. Termination is a single API call (`accesses.delete`) which immediately revokes the token. The audit log proves the termination instant. For role-change scenarios, `accesses.update` narrows permissions without full revocation, preserving the version history of the change. **Detail** The "Addressable" status means you must implement it, document why not, or implement an equivalent. The Pryv primitives give you the "implement it" path directly: - Full termination: `accesses.delete` revokes the token immediately and snapshots the prior state into the access history. - Role change / narrowing: `accesses.update` with reduced `permissions` keeps the same access identity but enforces the new scope from the version bump onward. - Audit chain: every subsequent API call would fail authentication (after delete) or fall outside the new scope (after update), producing a verifiable termination boundary. - Expiry-driven termination: A `shared` access managed by an app access can no longer outlive it (it inherits the app access's expiry at creation, clearing that expiry is refused, and authentication refuses a never-expiring shared access once its app access has expired, `5d609bfa`), and a webhook stops firing and becomes `inactive` once its access has expired (`3394b95f`), both in open-pryv.io 2.0.0-rc.23. For workforce-scale deployments (e.g., hospital with 100+ staff), Pryv composes with two patterns covered in `context/workforce-access-patterns.md` (a third, for teams sharing one account, follows): - Group access + `callerId` (auth header `Authorization: `), termination = removing the individual from the external IdP / IGA group, no Pryv- side action; audit trail preserves the individual identity via the recorded caller id. - Seed access + sub-access derivation, termination = `accesses.delete` on the individual's sub-access while the seed + sibling sub-accesses remain untouched. Roles + groups are deliberately outside Pryv; the external IdP is the source of truth. **Group accounts over CMC** (open-pryv.io 2.0.0-rc.53, release commit `61fb28dd`, https://github.com/pryv/open-pryv.io/issues/158). For a team that shares one account and reaches patient data through cross-account consent, each member holds a membership on the group account and short-lived accesses of their own on each patient account, minted by the group's core. However the membership ends (an administrator revokes it, the member leaves, the membership access is deleted or expires, the delegate who approved it is detached, the group account is deleted), the group's core deletes those accesses on every patient account through the patient's grant, reads each one back, and records the outcome per patient (`deleted`, `absent` or `residual`) on a server-written `consent/member-revoke-cmc` event naming the member `[GA20]`, `[GA21]`, `[GA22]`, `[GA23]`. Narrowing a membership (fewer teams, or a team stream deleted for good) removes only the accesses outside what it still covers `[GA41]`. A residual (a patient core unreachable or refusing) is retried by the retry loop, then by the periodic ledger pass (`cmc.memberAccess.sweepIntervalMs`), and lasts at most until the access's own expiry (24 h by default, 7 d at most, `cmc.memberAccess.maxTtl`). Retries and the periodic pass need `cmc.retryLoop.enabled`, `true` by default since this release; set to `false`, a warning is logged at boot and a residual stays until the access expires. The sweep and the periodic pass read the whole ledger since open-pryv.io 2.0.0-rc.79 `[MA32]`; earlier releases read at most 100,000 ledger records per group account (with a warning in the log), so on a larger group an access beyond them lasted until its own expiry. When the group account itself is deleted, its members' accesses are deleted on the patient cores before the erasure, and no record is kept `[GA40]`. Terminating such a member is no longer your code's job; deciding who may join stays yours. Code: `open-pryv.io/components/cmc/src/memberSweep.ts`, `handleMemberRevoke.ts`, `components/api-server/src/methods/helpers/cmcMemberSweep.ts`; unit tests `[CMCMR]`. See `context/workforce-access-patterns.md`, Pattern 3. **Evidence** - tests: AA02, ACCP, LG20, CMCGA, CMCMR, GA20, GA21, GA22, GA23, GA40, GA41, MA32 - config keys: cmc.retryLoop.enabled, cmc.memberAccess.maxTtl, cmc.memberAccess.sweepIntervalMs - primitives: access, permissions, audit, CMC - context notes: workforce-access-patterns ### HIPAA-Security 164.308(a)(4)(ii)(B): Access authorization, Addressable Coverage: implemented · effort saved: high · draft Requirement: Implement policies and procedures for granting access to ePHI through, for example, access to a workstation, transaction, program, process, or other mechanism. **What Pryv does for you** Granting access to ePHI in Pryv means minting an access with explicit per-stream permissions. The technical authorization decision is enforced at every API call. Documentation of the authorization rationale lives in `access.clientData` next to the grant itself, so the "why" travels with the "what". **Detail** Access grants are creation events on the `accesses` collection, with `permissions[]` listing the streamId + level tuples the grantee may exercise. `clientData` carries free-form metadata such as the workforce-role label, the granting administrator, the business reason. Together these form a per-grant record satisfying both the technical control and the documentation half of the standard. **Group accounts over CMC** (open-pryv.io 2.0.0-rc.53, release commit `61fb28dd`, https://github.com/pryv/open-pryv.io/issues/158). A member of a team sharing one account is authorized by a consent act: the member writes a membership request (`consent/request-cmc` with `request.membership: true`) on their own account, and an administrator of the group (the owner, or a delegate of the group account) accepts it and picks the team streams. The resulting membership access records who approved it (`clientData.cmc.membership.approvedBy`: the delegate and the delegation, or `null` for the owner) and what the member asked for (`requestedScopes`) `[GA01]`, `[MB30]`, `[MB32]`. The server limits what a membership may ask for, at write and again at accept: team streams under `:_cmc:apps:*` only (never the inbox, the chat or collector streams, nor `*`), `read` or `contribute`, no feature permission, never delegable (`cmc-membership-permissions-invalid`) `[GA02]`, `[MB31]`; a delegate cannot approve a membership requested from their own account `[MB34]`. Each access the member then gets on a patient account is issued only through that membership and within the patient's consent (see 164.312(a)(1)). See `context/workforce-access-patterns.md`, Pattern 3. **Evidence** - tests: AA01, ACCP, CMCMB, GA01, GA02, MB30, MB31, MB32, MB34 - primitives: access, permissions, clientData, stream, CMC - context notes: workforce-access-patterns ### HIPAA-Security 164.308(a)(4)(ii)(C): Access establishment and modification, Addressable Coverage: implemented · effort saved: high · draft Requirement: Implement policies and procedures that, based upon the entity's access authorization policies, establish, document, review, and modify a user's right of access to a workstation, transaction, program, or process. **What Pryv does for you** The access lifecycle (create / read / update / delete) is first- class in Pryv. `accesses.update` writes a tamper-evident snapshot of the prior version into history on every modification, giving you the documented review trail this standard expects. **Detail** Modification semantics: - `accesses.create`: establishes a new grant (see (a)(4)(ii)(B)). - `accesses.get ?includeHistory=true`: review the version chain. - `accesses.update`: modify permissions / clientData; bumps `serial`, snapshots the old head into history. - `accesses.delete`: termination (see (a)(3)(ii)(C)). Every step appears in the audit log, with the timestamp and acting administrator's identity preserved. **Group accounts over CMC** (open-pryv.io 2.0.0-rc.53, release commit `61fb28dd`, https://github.com/pryv/open-pryv.io/issues/158). For a team sharing one account, a member's right of access is established by a membership the group's administrator accepts `[GA01]`, modified by updating that membership access (removing teams, or deleting a team stream for good, deletes the member's patient accesses that fall outside what remains) `[MR27]`, `[MR33]`, `[GA41]`, and reviewed from the group account: the membership accesses (a revoked one stays readable as a deletion record with `includeDeletions`) `[GA22]`, the member's access requests (`consent/member-access-cmc`) and the server-written sweep records (`consent/member-revoke-cmc`, with the outcome per patient and any residual) each name the member. A member cannot change or delete these records; the owner can `[GA42]`. See `context/workforce-access-patterns.md`, Pattern 3. **Evidence** - tests: AA01, AA02, ACCP, GF33, CMCMR, GA01, GA22, GA41, GA42, MR27, MR33 - primitives: access, permissions, audit, CMC - context notes: workforce-access-patterns ### HIPAA-Security 164.308(a)(5)(ii)(D): Password management, Addressable Coverage: configurable · effort saved: medium · draft Requirement: Procedures for creating, changing, and safeguarding passwords. **What Pryv does for you** Pryv stores credentials on a privileged `system-stream`, separate from ordinary content. Password rules (complexity, rotation) are operator-configured. Adding `services.mfa.mode` raises the authentication strength beyond a password alone, see §164.312(d). **Detail** Password is one possible factor; MFA via the `mfa.*` API methods (authenticator-app TOTP by default since open-pryv.io 2.0.0-rc.14 `[MA15B]`, `[MA10A]`, SMS supported `[MA3A]`) is the second factor when enabled. Recovery flows live alongside (`mfa.recover`) so an account is not lost when a device is `[MA7A]`. The implementer chooses whether MFA is required universally or per-role. An operator may also enable federated sign-in through an external OpenID Connect provider (`sso.*`, beta, off by default). It is gated so an external identity cannot take over an account whose email was never inbox-proved, and the minted session token is never carried in a URL (delivered to the auth app via a one-time shared secret). MFA, when active, is still enforced on the federated path. **Evidence** - tests: MA15B, MA10A, MA3A, MA7A - config keys: services.mfa.mode, auth.passwordRules, sso.enabled - primitives: system-streams, MFA, access **Planned changes** - enhancement: Reference TOTP / WebAuthn plugins reduce dependence on SMS-OTP for the second factor ### HIPAA-Security 164.308(a)(7)(ii)(A): Data backup plan, Required Coverage: implemented · effort saved: high · draft Requirement: Establish and implement procedures to create and maintain retrievable exact copies of electronic protected health information. **What Pryv does for you** `bin/backup.js` produces per-user backup files (account data, streams, accesses, profile, webhooks, events, attachments, audit, high-frequency series). `--restore` rebuilds a user from a backup file. The backup procedure ("when, where, how often") is yours to schedule; the underlying primitive is shipped. **Take a new backup after upgrading to open-pryv.io 2.0.0-rc.34 or later.** Earlier backups carry no high-frequency series data on any series engine, with no warning: backup and restore addressed each user's series under a different key than the one the series are stored under. Since 2.0.0-rc.34 the series are exported and restored, series move between any two series engines (InfluxDB backups could not be restored before), and the backup manifest's `coreVersion` reports the core's release. **If you ever ran `bin/backup.js --incremental` before open-pryv.io 2.0.0-rc.51, check those backup directories.** An incremental run overwrote the full backup it continued, and a restore of such a directory reported success while restoring only the last delta: it is not a retrievable exact copy and cannot be repaired. `node bin/backup.js --inspect ` reports it `DAMAGED` and `--restore` now refuses it `[BKIC2]`, `[BKC6]`. Take a new full backup into a new directory and continue the incrementals from there. Full backups written by earlier releases are not affected. **Three procedure points from open-pryv.io 2.0.0-rc.86.** A backup written by 2.0.0-rc.86 or later restores with that release or later: if you go back to an earlier release, start a new chain in a new directory (a run an earlier release appends to the chain is refused at restore) `[BKSM6]`. Keep each backup directory for the backup only: a file the backup did not write is refused at restore, and a backup refuses to start in a directory holding other files `[BKSM7]`, `[BKSM8]`. With a recipient public key, sign the runs (`--signing-key` at backup, `--signing-pubkey` at restore; detail below), starting with a new full backup into a new directory. **Detail** Per-user backup files are advantageous for HIPAA's "exact copies" language because the backup unit matches the natural protected- health-information unit (the subject). They also play well with the §164.310(d) media controls (you can encrypt + transport a single subject's backup file). **Backup encryption is built in, opt-in.** By default `bin/backup.js` writes plaintext (gzip-compressed) files. With `--recipient-pubkey ` (recommended: a random per-backup data key is RSA-OAEP-wrapped to your public key, so the backup host holds no secret that can decrypt its own output) or `--encrypt-passphrase` / `PRYV_BACKUP_PASSPHRASE` (scrypt-derived key), every file is encrypted with per-file authenticated AES-256-GCM before it reaches the destination disk, and the backup carries a cleartext `encryption.json` envelope (crypto headers only), a `RESTORE-README.md` and a standalone `decrypt-backup.mjs`, so the key holder can recover it without Pryv. `--restore` takes `--private-key` or `--decrypt-passphrase`. Available since open-pryv.io 2.0.0-rc.5. Losing the key or passphrase makes the backup unrecoverable: key custody is yours, and so are volume- or bucket-level encryption (LUKS, S3 SSE-KMS, ...) if you add it on top. Document the chosen key model in your backup-plan SOP for §164.308(a)(7)(ii)(A). **Backup handling hardened (open-pryv.io 2.0.0-rc.47 to 2.0.0-rc.50).** A backup written without a key model prints a warning that it is plaintext (it holds every account's data, access tokens included) `[BKPW1]`; `--passphrase-file` reads the passphrase from a file, so it shows neither in the process list nor in shell history `[BKPF1]`; backups are written with directories `0700` and files `0600` (2.0.0-rc.49). A restore refuses, before writing anything: a plaintext backup when a decryption secret was given (`--allow-plaintext` overrides, `--require-encrypted` refuses plaintext even without a secret) `[BKRE1]`, `[BKRE4]`; user ids or usernames that are not one safe file name, symbolic links where the backup keeps its data `[BKRS1]`, `[BKRS4]`; names the platform routes itself `[BKRN1]`; and a single-user restore onto a username another account now holds, even with `--overwrite` `[RSOW1]`. Authenticity bound: recipient-key (hybrid) encryption gives confidentiality, not authenticity; whoever holds the public key and can write to your backup destination can produce a backup that restores, unless the runs are signed (open-pryv.io 2.0.0-rc.86, below). Protect write access to the destination, and prefer `--require-encrypted` on restore. **Incremental backups form a chain (open-pryv.io 2.0.0-rc.51).** A `--incremental` run writes only its own `incrementals//` directory and the run index `chain.json`; no file of an earlier run is rewritten `[BKC1]`. A restore applies the full backup, then every run in order, newer versions and deletions replacing older ones `[BKC2]`, `[BKIC1]`; `--through-run ` restores the chain as of a given run, a chain with a missing or reordered run is refused `[BKC7]`, and two overlapping runs into the same directory leave the first in the chain and the second aside `[BKCC1]`. A run's window starts at the previous run's snapshot time, so changes made while that run was in progress are no longer lost `[BKC3]`, and the deletion of streams, accesses and webhooks is carried `[BKC4]`. Each run of an encrypted backup has its own envelope and key, keeps the chain's key model (a wrong secret is refused before anything is written) and carries the current `decrypt-backup.mjs` and `RESTORE-README.md` `[BKC5]`, `[BKCS1]`; with a recipient public key the backup host still needs no private key to continue the chain `[BKIC3]`. Series emptied after a run stay empty on restore `[BKCE2]`. `--inspect ` lists the runs and says whether the directory is sound. Up to 2.0.0-rc.85 the chain index and run manifests are checked for consistency but not signed (the authenticity bound above applies). Your backup-plan SOP should name the chain you restore from and how long its runs are kept. **Authenticated files and signed runs (open-pryv.io 2.0.0-rc.86).** Each run's manifest lists every file of the run with its size and SHA-256 hash and is bound to its run; a restore refuses a run with a file added, removed, resized or changed, and a `chain.json` entry that disagrees with the run's manifest (users, scope, snapshot time) `[BKSM1]`, `[BKSM2]`, `[BKSM3]`. An encrypted file ends with a marked final block and each block is tied to its file, its position and its run, so a file cut at a block boundary, an empty file left in place of a real one, or a file swapped between two accounts is refused instead of restoring as valid. An account's files are checked before anything of the account is written. `--signing-key ` signs each run (`manifest.sig`); given `--signing-pubkey`, a restore or `--inspect` requires every run to be signed by that key `[BKSM4]`, `[BKIS1]`. With a recipient public key and no signature, a writer holding that public key can still replace a run, and the backup warns that it is not signed `[BKSM5]`, `[BKIS2]`. `--inspect --verify-files` (with the backup's secret) reads and checks every file without restoring `[BKIS3]`: put it in your backup verification step. New passphrase backups use a stronger key derivation (scrypt N = 2^17). Runs written by earlier releases restore as before and are reported as "file list not verified". A plaintext run's file table detects corruption, not tampering. An account erased while a full backup runs is left out of that run `[BKDU1]`, and two runs finishing together no longer race on `chain.json` `[BKLK1]`, `[BKLK2]`. Operator page: `customer-resources/backup` on the developer site. **Technical** Backup chunking + integrity restored (see `open-pryv.io/CHANGELOG-v2-back.md`). Series namespace shared by backup, restore, account deletion and the series server: `open-pryv.io/components/business/src/series/namespace.ts` (2.0.0-rc.34). `[BKSR]` runs series through backup and restore in each test matrix (PostgreSQL or SQLite base, with the default or the InfluxDB series engine), `[BKEV]` the events store round trip, `[BKVR]` the manifest version; `just test-backup-roundtrip` (`open-pryv.io/tools/backup-roundtrip/`) backs a seeded user up and restores it PostgreSQL to SQLite and back, comparing the bundles. Backup options are CLI flags of `bin/backup.js`, not config keys. Encryption: `open-pryv.io/storages/interfaces/backup/BackupCipher.ts` (tests in `open-pryv.io/storages/test/backup-encryption.test.js`), released in 2.0.0-rc.5 (commit `ea27bf35`). File table, run binding and signatures: `open-pryv.io/storages/interfaces/backup/FilesystemBackupWriter.ts`, `FilesystemBackupReader.ts`, `chain.ts`, released in 2.0.0-rc.86 (tag commit `70e28786`); the block-level checks are tested by `[BKAD1]` to `[BKAD6]` in `open-pryv.io/storages/test/`. **Evidence** - tests: BKSR, BKEV, BKVR, BKPW1, BKPF1, BKRE1, BKRE4, BKRS1, BKRS4, BKRN1, RSOW1, BKC1, BKC2, BKC3, BKC4, BKC5, BKC6, BKC7, BKCC1, BKCS1, BKCE2, BKIC1, BKIC2, BKIC3, BKSM1, BKSM2, BKSM3, BKSM4, BKSM5, BKSM6, BKSM7, BKSM8, BKLK1, BKLK2, BKIS1, BKIS2, BKIS3, BKDU1 - docs: customer-resources/backup.md - primitives: backup-restore, backup-payload-encryption ### HIPAA-Security 164.308(a)(7)(ii)(B): Disaster recovery plan, Required Coverage: configurable · effort saved: low · draft Requirement: Establish (and implement as needed) procedures to restore any loss of data. **What Pryv does for you** Two layers Pryv gives you, covering different data: (1) cold restore from `bin/backup.js --restore`, the only recovery path for user data; (2) a multi-core cluster replicates the platform DB (user-to-core index, shared settings, certificates) over rqlite Raft with cluster-CA mTLS, so losing one core does not lose the platform's control plane. User data is not replicated between cores: each user lives on one home core, so if that core's storage is lost, its users' data comes back only from your backups (or from replication you run under the storage engine, e.g. PostgreSQL streaming replication). You compose them per your RTO / RPO. **Detail** Cluster topology is documented in the dev-site customer-resources guides. The bootstrap CLI (`bin/bootstrap.js new-core`) issues an encrypted bundle with the cluster CA + rqlite TLS material; the joining core boots via `bin/master.js --bootstrap`. Lets-Encrypt certificates replicate across the cluster via rqlite keys, so a surviving core can serve TLS without re-issuing. **Platform DB recovery (open-pryv.io 2.0.0-rc.34).** The bundled rqlite is 10.5.1: its snapshot store is crash-safe (under 9.x a node killed while taking a snapshot could later restore stale pages into its copy of the platform DB), its snapshot files are checksummed, and a node stops on a node-local SQLite error instead of diverging silently. The first start on 10.x converts the rqlite data directory one way, so put the upgrade in your recovery plan: back up every node (`/db/backup` plus an archive of the data directory taken while the core is stopped), check the snapshot store, and upgrade the nodes of a cluster back to back; a rollback to an older release needs that archived directory. Procedure: `open-pryv.io/INSTALL.md`, "Upgrading the bundled rqlite (9.x to 10.x)". **Restore your series too.** Operator backups taken before open-pryv.io 2.0.0-rc.34 carry no high-frequency series data, so a restore from them loses every series point; take a new backup after upgrading (see 164.308(a)(7)(ii)(A)). **Restore from an incremental chain (open-pryv.io 2.0.0-rc.51).** `--restore` rebuilds user data as of the latest run of a `bin/backup.js` chain, or as of an earlier run with `--through-run `, which gives your recovery plan a restore point per run `[BKIC1]`, `[BKC7]`. A chain is refused when a run is missing or reordered, and a directory damaged by an incremental run of an earlier release is refused unless you pass `--allow-incomplete` `[BKIC2]`. On SQLite, a core running while a restore replaces an account's file now reads the restored file `[UASF1]`, `[UASF2]`. Your drill should restore from a chain, not only from a full backup. **What a restore checks before it writes (open-pryv.io 2.0.0-rc.86).** A restore refuses a run whose files were added, removed, changed, cut short or swapped between accounts, and, given `--signing-pubkey`, a run not signed by that key `[BKSM2]`, `[BKSM4]`; `--inspect --verify-files` checks a whole backup without restoring it `[BKIS3]`, so a damaged copy is found before the day you need it. An account whose restore fails once its data is being written (a database error, a full disk) is no longer left half-restored: what was written is cleared and the account is removed from the core's index and routing, so a new restore starts clean; with `--overwrite`, an account that was on the core before is left empty, and the restore's error is reported `[RSFC1]`, `[RSFC2]`, `[RSFC3]`; your recovery procedure re-runs the restore for each account it names. On a multi-core platform the bootstrap bundle that rebuilds a core is authenticated with its version, salt and nonce from 2.0.0-rc.86 on, and a joining core must run that release or later to read it `[BNEV1]`. **Evidence** - tests: BKSR, BUNDLEENC, BKIC1, BKIC2, BKC7, UASF1, UASF2, BKSM2, BKSM4, BKIS3, RSFC1, RSFC2, RSFC3, BNEV1 - docs: customer-resources/backup.md - config keys: cluster.discoveryEnabled, letsEncrypt.certRenewer - primitives: backup-restore, multi-core-mTLS, letsEncrypt-integration ### HIPAA-Security 164.310: Physical Safeguards, standard (framing) Coverage: facilitated · effort saved: low · mode: awareness · draft Requirement: Implement policies and procedures to limit physical access to electronic information systems and the facility or facilities in which they are housed, while ensuring that properly authorized access is allowed. **What Pryv does for you** Physical safeguards (facility access, workstation security, device and media controls) are properties of the hosting environment, not of the Pryv software itself. Pryv contributes two things: the data-residency primitive lets you bind a user's data to a specific hosting (so you can certify the physical environment for that data explicitly), and operator-supplied secrets are AES-256-GCM encrypted at rest so that a stolen disk doesn't leak the keys themselves. **Detail** For each implementation specification under §164.310 ((a)(1) facility access controls, (b) workstation use, (c) workstation security, (d) device and media controls), the controls are physical and operational. Pryv's posture: the operator chooses + documents the hosting environment; for multi-hosting deployments, `data-residency` lets you certify the physical layer differently per region. Per- user backup files (see §164.308(a)(7)(ii)(A)) are the unit of device-and-media-controls transfer when you need to move a single subject's ePHI off-host. **Evidence** - primitives: data-residency, encryption-at-rest-secrets ### HIPAA-Security 164.312(a)(1): Access control, standard Coverage: implemented · effort saved: high · draft Requirement: Implement technical policies and procedures for electronic information systems that maintain ePHI to allow access only to those persons or software programs that have been granted access rights as specified in §164.308(a)(4). **What Pryv does for you** Per-stream permissions are enforced at every API call; an access can read or write only the streams its `permissions[]` lists, at the level granted. There is no "bypass on trust" path, the enforcement is the API surface, not a downstream policy layer. System streams (account, password, MFA) sit on a separately controlled namespace. **Detail** The standard's four implementation specifications below each map to a distinct Pryv concern. The standard itself is the umbrella: the technical control system that prevents access by anyone / anything not granted it. **Cross-user isolation caveat:** the "no bypass on trust path" property holds at the API surface. The strength of the underlying isolation depends on the chosen storage engine, SQLite gives physical per-user-file isolation; PG gives logical app-code-enforced isolation against shared tables. See `context/per-engine-isolation.md` for the per-engine breakdown + operator mitigation patterns (PG row-level security, per-schema, per-account-DB, per-tenant deployments). **Scope-gated OAuth2 grants.** The delegated-app access path (OAuth2 authorization-code + PKCE, `open-pryv.io/components/oauth2/`, open-pryv.io 2.0.0-rc.8) inherits the same permission enforcement: an authorization-code grant references exactly one consent offer and mints an app access whose `permissions[]` are the user's granted subset of that offer; it can touch nothing outside them. Presented redirect URIs are validated by exact string match (loopback-port carve-out only; fragment-bearing URIs rejected, `open-pryv.io/components/oauth2/src/clientRegistry.ts`), so an issued authorization code cannot be diverted to an unregistered callback. **What an OAuth2 grant can reach (open-pryv.io 2.0.0-rc.64 to 2.0.0-rc.77).** Withdrawing a consent deletes the app's live sessions and the accesses they created at once (rc.64; earlier, a live token ran out its lifetime) `[OE31]`; narrowing it re-cuts every live session (rc.68) and the accesses a session created (rc.70) `[OSUB1]`, `[OSUB3]`. No app, shared or consent-derived access can write account fields (rc.65) `[ACSW1]`, `[ACSW2]`. A consent for an operator-registered client can never grant account or system streams, `*` or `manage`, and by default its sessions cannot create accesses or webhooks or share secrets (`accessCreation`, `webhooks`, `secretSharing` forbidden unless the operator allows them per client) `[OACR1]`, `[OACR2]`. An aliased session is accepted under its alias only (rc.69) `[AL13]`, `[OPSE5]`. An authorization for an account address (`https://{username}./…`, rc.75) is bound to the signed-in account: another account's address is refused before anything is written `[OPUE2]`; address aliases (rc.76) are created, listed and deleted with the personal token only `[OPAL2]`. A suspended client, or one under review after the operator changed its registration (rc.71), is refused at every OAuth2 step and on the data API within `oauth.clientRevokeCheckSeconds` (default 30 s) `[ORF1]`. **Token exchange** (RFC 8693, rc.73): only a client registered `--can-exchange` may trade a user's token for its own, only for a token issued for one of its registered audiences (checked before the home core is named), never for a derived token; the derived session is a session of the same grant, no wider and no longer-lived than the token it replaces, and ends when that token's session is deleted `[OTX05]`, `[OTXE04]`. Since open-pryv.io 2.0.0-rc.82 `oauth.audienceBoundSessions` is `true` by default: the token an app sent to such a resource server is refused directly at the API and works only through that resource server's exchange `[OTXE02]`; an operator may set `false` on a core whose resource servers do not exchange yet (the boot log names the clients concerned; from rc.73 to rc.81 `false` was the default). **Adapter routes** (rc.73, off unless `adapterRoutes` is set) forward `/adapter//…` to a sidecar you run, with no authentication by the core: the sidecar must authenticate every request (see `iso-27001.A.8.26`). **Delegate-account token class.** Account delegation (`open-pryv.io/components/delegation/`) adds a delegate token: an owner-equivalent personal token one account holds over another. It is still bound by the same per-stream permission surface, but its defining access-control property is the teardown rule, a delegate can never remove a delegation, and dissolving one requires a genuine login on the controlled account (a personal token with no forge-protected delegation marker; the marker is forge-guarded on create and update). The `:_delegation:*` namespace is plugin-owned and guarded end to end (no user create/write/delete, internal subtree read-guarded and excluded from wildcard reads), and each delegate's actions are audited on the controlled account. See `context/delegation-model.md`. **Plugin-managed and account streams, by every spelling of an id** (open-pryv.io 2.0.0-rc.56). The guards of the delegation namespace, of the plugin-managed regions of the cross-account (CMC) namespace and of the account fields (the primary email, written only through `account.update`; non-editable and hidden fields; level caps on account-stream permissions) judge the stream an id resolves to, whatever store-prefixed spelling a request uses, for every token, the owner's included, and refuse creating a stream under, or moving one into, a plugin-managed parent `[CNRP1]`, `[CNRP6]`, `[CNRP7]`, `[DSC05]`, `[ASA1]`, `[ASA2]`, `[ASA3]`, `[ASA6]`. The CMC retry worker acts only on records the server wrote `[CNM2B]`, `[RQ32]`. Before this release a store-prefixed spelling was not recognised by these guards, so the separation of the system and plugin namespaces held only for requests using the canonical ids; in particular an access holding `contribute` on the email field could change the primary email through the events API. **Moving a stream** (open-pryv.io 2.0.0-rc.56). An app or shared access moving a stream needs manage rights on every stream of the moved subtree, trashed ones included `[SMV1]`, `[SMV4]`; before it, a child granted to that access at a lower level moved along into the target parent's inherited permissions, reaching accesses that had not been granted it. **Apps granted access through a delegation.** When a delegate grants a software program access to the controlled account, the program receives an ordinary `app` access bound to the requested permissions, never the owner-equivalent token. The server stamps it with a lineage attribute no client can set, change or remove (`clientData.delegation.kind: 'delegated-child'`) `[DCH01]`, `[DCH03]`, and removing the delegate deletes every access granted through the delegation, at any depth, and nothing else `[DCH12]`. In open-pryv.io 2.0.0-rc.23. The same rule covers a cross-account (CMC) data grant a delegate accepts for the controlled account (open-pryv.io 2.0.0-rc.30): the grant carries the lineage attribute and `access-info` names the delegate `[DCH15]`, the accept event records the approving delegate, server-stamped and not client-settable `[DCH16]`, and the detach deletes the grant before it answers, the requester being notified by `consent/revoke-cmc` `[DCH18]`. When such a data grant is delegable (`request.accessType: 'app'`), the detach, like every other CMC withdrawal path (`consent/revoke-cmc`, the reference account app, the requester withdrawing, account deletion), also deletes the accesses the requester derived from it, since open-pryv.io 2.0.0-rc.52 (`96af58ad`) `[MAAC]`, `[CMCHS-APPGRANT]`, `[GA24]`; on earlier releases they stayed valid until their own expiry, and `bin/access-scope-audit.js` lists any left behind. The one exception is explicit: since open-pryv.io 2.0.0-rc.31 the individual, detaching the delegate through a genuine login, may keep named CMC data grants that delegate gave (`keepAccessIds`); a kept grant loses the lineage attribute and becomes the individual's own `[DCH21]`, a list naming any other access is refused whole before any change `[DCH23]`, and every other access granted through the delegation is deleted as before. Grant paths that still cannot record the lineage (OAuth2 consent, publishing a CMC offer, widening a CMC grant) refuse a delegation-derived token `[DCH17]`, `[OE27]`. **Cross-account relationship accesses are bounded by the negotiated channels.** Since open-pryv.io 2.0.0-rc.38 (merge `7aab1e85`) a cross-account (CMC) relationship whose consent excludes chat gives neither relationship access a chat permission and creates no chat stream `[CN62]`, `[CN63]`, and the counterparty's access is refused (`403`, `cmc-chat-disabled`) if it writes a chat directly; alerts are refused the same way when system messaging is off (`cmc-system-messaging-disabled`) `[CN65]`, `[CH07]`, `[CH10]`. Relationships accepted earlier keep their chat stream; the refusal applies to them when their recorded features exclude chat. **Member accesses of a group account** (open-pryv.io 2.0.0-rc.53, release commit `61fb28dd`, https://github.com/pryv/open-pryv.io/issues/158). A team sharing one account lets each member obtain, from the group's core, a short-lived `shared` access on a patient account, derived from the patient's delegable grant (`consent/member-access-cmc`; the access's endpoint is returned once in the `events.create` answer, never stored, logged or retried) `[GA10]`, `[GA11]`. Three bounds apply. The group's core issues it only to a membership access (personal and delegate tokens are refused too, `cmc-member-access-not-member`), only for a patient relationship under the member's team streams, only for named data streams within what the patient's offer granted (never `*`, never a `:_cmc:` stream), with a lifetime within per-core bounds and never beyond the membership's own expiry, and one mint at a time per membership and patient (per worker process) `[GA12]`, `[GA14]`, `[GA15]`, `[CMCMA]`. Two budgets per membership, counted for the whole core, pace the asks: new member accesses (`cmc.memberAccess.mintBurst` 5000, then `ratePerMinute` 1000 a minute) and requests of any kind (`askBurst` 10000, then `askRatePerMinute` 3000 a minute, by default); asking again for a live access spends no new-access budget, and past either budget the ask is answered `429` with `Retry-After` (open-pryv.io 2.0.0-rc.79; before it, every ask counted against `ratePerMinute`, per worker process) `[GA16]`, `[GA17]`, `[MA20]`, `[MA22]`. The budgets pace a membership, they do not narrow its reach: what ends it is its expiry and its revocation. The patient's core refuses anything beyond the grant, and accepts from a delegable grant only the exact member stamp, which it completes itself `[MB10]`, `[MB12]`. The access cannot manage accesses, cannot outlive the grant and expires (24 h by default, 60 s to 7 d, `cmc.memberAccess.*`); when the patient withdraws on any path it is deleted with the grant `[GA24]`. A membership access is not exempt from the personal-token gate, so it cannot accept consents or widen grants on the group's behalf `[GA01]`. An app token may delete only the `shared` accesses it created `[GA31]`, and no update can remove the plugin's record (`clientData.cmc`) from an access `[MB13]`. Code: `open-pryv.io/components/cmc/src/handleMemberAccess.ts`, `memberAccessHooks.ts`, `memberMintRegistry.ts`, `memberLedger.ts`. See `context/workforce-access-patterns.md`, Pattern 3. **Evidence** - tests: AA01, AA02, ACCP, DCH01, DCH03, DCH12, DCH15, DCH16, DCH17, DCH18, DCH21, DCH23, OE27, CN62, CN63, CN65, CH07, CH10, MAAC, CMCGA, CMCMA, GA01, GA10, GA11, GA12, GA14, GA15, GA16, GA17, MA20, MA22, GA24, GA31, MB10, MB12, MB13, CNRP1, CNRP6, CNRP7, DSC05, ASA1, ASA2, ASA3, ASA6, CNM2B, RQ32, SMV1, SMV4, OE31, OSUB1, OSUB3, ACSW1, ACSW2, OACR1, OACR2, AL13, OPSE5, OPUE2, OPAL2, ORF1, OTX05, OTXE04, OTXE02 - config keys: cmc.memberAccess.defaultTtl, cmc.memberAccess.minTtl, cmc.memberAccess.maxTtl, cmc.memberAccess.ratePerMinute, cmc.memberAccess.mintBurst, cmc.memberAccess.askRatePerMinute, cmc.memberAccess.askBurst, cmc.memberAccess.maxInFlightPerMembership, cmc.memberAccess.allowNameOnly, cmc.retryLoop.enabled, oauth.clientRevokeCheckSeconds, oauth.audienceBoundSessions, adapterRoutes - primitives: access, permissions, system-streams, delegation, CMC - context notes: per-engine-isolation, delegation-model, workforce-access-patterns ### HIPAA-Security 164.312(a)(2)(i): Unique user identification, Required Coverage: implemented · effort saved: high · draft Requirement: Assign a unique name and/or number for identifying and tracking user identity. **What Pryv does for you** Every Pryv account has a unique username + cuid; every access derived from it carries a unique access id (cuid) and version serial. Audit records cite the (accessId, accessSerial) tuple, so each tracked action ties back to a unique identity. **Detail** Where several people share one access (a group token), the per-person identifier is the `callerId` your app forwards with each call, a label Pryv records but does not authenticate; see `context/workforce-access-patterns.md`, Pattern 1. **Group accounts over CMC** (open-pryv.io 2.0.0-rc.53, release commit `61fb28dd`, https://github.com/pryv/open-pryv.io/issues/158). For a team sharing one account that reaches patient data through cross-account consent, each member signs in to their own Pryv account and reads a patient's data under an access of their own, whose `clientData.cmc` names the member and the group: the group's core sends only the member's identity, and the patient's core stores it beside the group identity, the grant id, the scope and the app code copied from the authenticated grant; any other `clientData.cmc` is refused (`cmc-member-stamp-invalid`, `cmc-clientdata-cmc-forbidden`) `[GA10]`, `[MB10]`, `[MB11]`, `[MB12]`. The patient's audit then identifies the member by a unique access tied to a unique account, without a forwarded label. Against a patient core older than 2.0.0-rc.53, which refuses the stamp, the group's core mints the access with the member in its name only and reports `attribution: 'name-only'`, while `cmc.memberAccess.allowNameOnly` is `true` (the default for now) `[GA13]`; set it to `false` to refuse such mints. See `context/workforce-access-patterns.md`, Pattern 3. **Technical** Account model: see `open-pryv.io/components/business/src/users/`. Access ids are cuids; composite ids `:` appear once `accesses.update` is exercised (see `context/access-versioning.md`). **Evidence** - tests: AA01, UZEV, GA10, GA13, MB10, MB11, MB12 - config keys: cmc.memberAccess.allowNameOnly - primitives: access, audit, system-streams, CMC - context notes: workforce-access-patterns, access-versioning ### HIPAA-Security 164.312(a)(2)(ii): Emergency access procedure, Required Coverage: configurable · effort saved: medium · draft Requirement: Establish (and implement as needed) procedures for obtaining necessary ePHI during an emergency. **What Pryv does for you** The operator-held admin access key (`auth.adminAccessKey`) is the break-glass mechanism: it grants administrative reads not requiring an ordinary user's consent. You document the circumstances under which it may be exercised and the audit-trail review that must follow. **Detail** The admin access key is operator-side and rotates only at operator-supplied cadence, treat it as a privileged credential under custody controls equivalent to a root password. Every API call made under the admin key is audited like any other, so post-emergency review is concrete. **Evidence** - tests: LG20, GF33 - config keys: auth.adminAccessKey - primitives: access, system-streams ### HIPAA-Security 164.312(a)(2)(iii): Automatic logoff, Addressable Coverage: configurable · effort saved: high · draft Requirement: Implement electronic procedures that terminate an electronic session after a predetermined time of inactivity. **What Pryv does for you** Two configurables: personal-token session lifetime (`auth.sessionMaxAge`) and per-access expiry (`access.expires`). The latter is per-grant (the access is automatically inert after the timestamp passes), useful for clinical-workflow accesses whose validity is bounded by the case. **Detail** Note that HIPAA's "automatic logoff" is workstation-centric in origin (workforce members stepping away from a terminal). In a Pryv-mediated workflow, the analogous control is the validity window of the access token. Combining `auth.sessionMaxAge` (for interactive workforce sessions) with per-grant `access.expires` (for app-driven background processes) covers both shapes. **Evidence** - tests: AA02, ACCP - config keys: auth.sessionMaxAge, access.expires - primitives: access, permissions ### HIPAA-Security 164.312(a)(2)(iv): Encryption and decryption, Addressable Coverage: configurable · effort saved: high · draft Requirement: Implement a mechanism to encrypt and decrypt ePHI. **What Pryv does for you** The "mechanism to encrypt and decrypt ePHI" is delivered as switch-on Pryv software. User PHI/PII at rest (events, attachments, series, audit, platform DB) is encrypted by the `container-encrypted-volume` companion (`encryption-at-rest-user-data`), layered onto the image, it mounts an encrypted volume on boot so the application stores ciphertext at rest. The operator enables it (`CEV_ENABLED`) and chooses a key source. Pryv additionally encrypts operator-supplied secrets at rest (AES-256-GCM, HKDF-derived) and provides TLS-in-transit via the built-in ACME integration. **Detail** `container-encrypted-volume` (v0.1.0, shipped 2026-06-23) provisions and mounts a LUKS-encrypted volume inside the container and points the data roots at it, verified end-to-end (an event written through the API is unreadable in the stopped container file). Pluggable backend (LUKS reference + gocryptfs) and key provider (`env` / `file` / `exec` / `clevis` for TPM2·Tang·PKCS#11 / `aws-kms` envelope). With an identity-bound provider no copyable key is held; key custody is intrinsic to the control, not a Pryv gap. Rotation uses LUKS key-slots (no bulk re-encrypt). Volume encryption also grounds the breach-notification safe harbor (NIST SP 800-111). Coverage is `configurable`, Pryv's software performs the encryption once enabled, a step above the operator-implements-it tier. Caveats: an external PostgreSQL data dir and remote object storage (S3) are outside the mount (encrypt operator-side / via bucket SSE); LUKS needs `--privileged`. See `proposals/container-encrypted-volume.md`. The platform-secret at-rest encryption (Let's Encrypt account keys, observability tokens, cluster bootstrap bundles) remains on by default (`encryption-at-rest-secrets`). Longer-term direction: end-to-end encryption where the server never holds plaintext, research direction tracked under internal backlog slug `E2E-ENCRYPTION` (proxy re-encryption); per-row impact in `proposals/e2e-encryption.md`. **Technical** AES-256-GCM at-rest module: `open-pryv.io/components/business/src/acme/AtRestEncryption.ts`. Bootstrap-bundle encryption: `open-pryv.io/components/business/src/bootstrap/BundleEncryption.ts`. Since open-pryv.io 2.0.0-rc.86 both read a second envelope version that authenticates its context (the at-rest row it is stored in; the bundle's version, salt and nonce) with a pinned 16-byte tag `[AREV1]`, `[BNEV1]`. Bundles are written in it from that release; at-rest rows from the release after open-pryv.io 2.0.0-rc.87 `[AREV3]` (2.0.0-rc.86 and rc.87 still write them in the first version, so a core of the previous release keeps reading them). **Evidence** - tests: ACMEINT, BUNDLEENC, CERTUTILS, AREV3 - config keys: CEV_ENABLED, letsEncrypt.atRestKey, storages.engines.postgresql.ssl - primitives: encryption-at-rest-user-data, encryption-at-rest-secrets, letsEncrypt-integration **Planned changes** - feature: End-to-end (server-blind) encryption via proxy re-encryption brings CMEK / BYOK to the Pryv layer ### HIPAA-Security 164.312(b): Audit controls, standard Coverage: implemented · effort saved: high · draft Requirement: Implement hardware, software, and/or procedural mechanisms that record and examine activity in information systems that contain or use ePHI. **What Pryv does for you** Pryv's per-user audit log records every API method invocation, timestamp, user, access reference, method, success / error. The `audit.get` API method surfaces it for examination. The optional audit-event-stream channel additionally emits audit records into the subject's own streams, so the subject (and any access they authorise) can examine the history. **Detail** Audit storage uses SQLite directly (not the engine-agnostic mall layer), to keep the audit path independent of the data path. This decouples integrity of the log from issues in the primary engine. Audit row content is data-minimal **by construction**: action + source (transport + ip) + URL query + access ref + optional integrity hash of the affected event. The request body is never stored. Consequence: an auditor reviewing the §164.312(b) log sees *who did what when* without the log itself becoming a second copy of PHI, favourable under §164.502(b) minimum- necessary review. See `docs/pryv-primitives.md` audit entry. One scoping nuance: `events.get` content-query conditions sent over HTTP GET are part of the URL query, so the **search values** your apps submit (which may reference PHI, e.g. a diagnosis code) are recorded as-is, deliberately, since the search criteria are the auditable action. Tier the audit log's protection accordingly. See `context/content-query-audit-semantics.md`. Since open-pryv.io `07b6d3b6`, the OAuth2 authorization server records its own activity in the same audit pipeline (`oauth.*` events): consent lifecycle (shown / granted / refused), authorization-code exchange including replay attempts, and token lifecycle (issued per grant type / refreshed / revoked / reuse-detected). User-resolved events land in the subject's per-user trail (`[OE07]` proves rows in `:_audit:`); the pre-identification ones (consent shown / refused, code replay) go to syslog. A detected refresh-token replay additionally revokes the whole token chain and records both the detection and the resulting revocation (open-pryv.io `829f7238`), so the §164.312(b) trail covers delegated-app authorization activity, not just data access. Federated sign-in (SSO, beta) emits into the same pipeline: `sso.login` (user-resolved, in the account's trail) and `sso.refused` (pre-identification: no-account / unproved email / mint failure, syslog), so an attempted account takeover through an external identity is itself auditable. **OAuth2 audit additions (open-pryv.io 2.0.0-rc.66 to 2.0.0-rc.77).** In the subject's trail: `oauth.nonce.reused` (an OpenID Connect nonce presented twice, never the nonce itself) `[OXN02]`; `oauth.token.exchanged` (a resource server traded the user's token for its own, naming both clients); `oauth.consent. refused` with its reason (`permission-level-conflict`, `wrong-core`, `audience-account-mismatch`, `audience-not-listed`, `address-alias-held` since rc.79 (the owner consenting at one of their address aliases another app's grant holds, formerly reported as `audience-account-mismatch`), and with `oauth.perUserIssuer` on, `issuer-account-mismatch`), no username or alias in the payload `[OPUE2]`, `[OPUE22]`, `[OPIU3]`. In syslog (no user resolved): `oauth.token.introspected` (which resource server asked about which client's token, never the token) `[OXI06]`, `oauth.token.exchange_refused` with its reason (an unauthenticated caller is not audited) `[OTX03]`, and `oauth.client. metadata_fetched` / `metadata_refused` for client metadata documents, sampled per host and reason, never the document body `[OCMDE13]`. Refresh tokens are named by a hash since rc.69 `[ORL12]`. Since rc.68 the session minted at consent is written by the system, so the consent shows as `oauth.consent.granted` plus the grant's own create or update row, no longer as an `accesses.create` row. Not audited: requests on adapter routes (the sidecar audits them) and the `421` answers for an account served by another core (warning log only). The three address-alias methods (rc.76) are audited like any API call `[OPAL2]`. **Correction, rc.77:** a streamed answer (for example `events.get`) that the client stopped reading was recorded as a success; it is now recorded as an error with id `client-closed-request`. The call was always in the trail; only its outcome was wrong `[AUAB3]`. Account delegation extends the per-record attribution: a record produced by a delegate token, or by an app access a delegate granted on the controlled account, carries `content.delegation = { delegateUsername, delegateHostSlug }`, so an app acting for a controlled account is traceable on that account's trail to the person who authorized it `[DCH05]` (the app-grant case is in open-pryv.io 2.0.0-rc.23; see `context/delegation-model.md`). **Group accounts over CMC** (open-pryv.io 2.0.0-rc.53, release commit `61fb28dd`, https://github.com/pryv/open-pryv.io/issues/158). When a member of a team sharing one account reads a patient's data, the patient's trail records the member's own access id, an access whose creator is the group's grant and whose server-stamped `clientData.cmc` names the member and the group `[GA10]`. Since this release every CMC and delegation teardown is the `accesses.delete` deletion, so a member access (or a grant) that is gone stays readable by name as a deletion record (`accesses.get` with `includeDeletions`) and the audit rows that cite it can still be resolved `[GA22]`, `[GA30]`. That holds while the deletion record is kept: by default until the account is deleted; since open-pryv.io 2.0.0-rc.56 you may have them purged after `accesses.deletionRecords.retentionDays`, past which an audit row shows such an access by id only `[ADP1]`, `[ADR5]`. Set it no shorter than your audit-review and retention needs (see 164.316(b)(2)(i)). The reference account app's audit page shows such an access as " via ", deleted accesses included, from its first release after 0.21.0 (app-web-user-account). On the group's trail, each member access asked for (`consent/member-access-cmc`, written through the member's own membership access, with the server-owned outcome) and each sweep at offboarding (`consent/member-revoke-cmc`, server-written) is an event naming the member `[GA20]`, `[MA41]`. See `context/workforce-access-patterns.md`, Pattern 3. **External ids** (`external-id-index` primitive). The account's own claims, replacements and releases are audited on its trail like any API call (open-pryv.io 2.0.0-rc.58). From 2.0.0-rc.60 an administrator's release of an id (`POST /system/admin/ext-id/release`, admin key) is recorded twice: the admin call itself without a user (syslog), and an `account.externalIds.adminRelease` entry in the trail of the account that held the id, with the namespace and the administrator's reason, when audit is active `[XIDAR1]`. The blinded value is in neither, nor in any log line `[XIDG1]`. Not audited, like `auth.cores`: the unauthenticated lookup `auth.extIdCores` and the core-to-core holder answer `system.extIdHolds` used by forced-mode sign-ins (open-pryv.io 2.0.0-rc.59), both reads that name no account. **The account owner's examination (open-pryv.io 2.0.0-rc.84).** `accesses.get` and `accesses.getOne` return to the owner's personal token (or a delegate's personal access), on each access and each deletion record, `usage`: approximate lifetime call counts per method, summed as reads, writes, session and other calls; a batch counts as its inner calls `[AUG1]`, `[AUG2]`. App and shared callers never receive it `[AUG3]`; it needs `accessTracking.isActive` (on by default). The counts are written after each reply and are a summary: the per-call record is the audit log, where a batch is one `callBatch` row beside the rows of its inner calls `[QK5F]`. The reference account app (app-web-user-account 0.34.0) shows the counts and the last error on each access's Activity card, and an Audit trail tab lists every audited call on the account, linkable and filtered by app (the OAuth grant and its sessions), access, date or kind of call, each row naming the access that made it, a revoked one included (app tests `[ACTV]`, `[TRLP]`), so the owner can examine the activity on their account without an operator. Since open-pryv.io 2.0.0-rc.86 the same callers can also have the audit log counted over a period (`audit.getSummary`: calls per hour, day or week as reads, writes, session, other calls and errors, for the account or chosen accesses, a batch envelope not counted) `[ASM1]`, `[ASM2]`; app and shared callers are refused `[ASM4]`, and the call is itself audited `[ASM9]`. The account app's next release draws its Activity chart and an Audit trail chart over a chosen period from it. **socket.io calls running at the same time (fix, the release after open-pryv.io 2.0.0-rc.87).** Every call on one socket.io connection used to share one context, so two calls running at once could swap their method id: the audit row (and the access usage count) of one call could name the other call's method. Each call now runs with its own context and is audited under its own method `[SKMC]`. **Streamed audit reads per access (same release; on by default).** One access reads its audit log (`events.get` on `:_audit:` streams) one streamed read at a time per API worker (`limits.audit.maxConcurrentReadsPerAccess`, default 1, `0` turns it off). A read past it waits for a slot, oldest first, up to `limits.audit.maxReadWaitMs` (default 30000 ms; `0` refuses at once), so parallel reads from one client (an account app loading several Activity cards, say) run one after the other and all succeed `[RIDL4]`, `[RIDL5]`; only a read that gets no slot within the wait answers `429 too-many-requests` `[RIDL3]`. Nothing is dropped from the log; the cap bounds the small audit read pool a stalled reader could hold. **Evidence** - tests: AT01, AT02, AT51, AT52, AT53, AT61, AT65, OE07, DCH05, GA10, GA20, GA22, GA30, MA41, ADP1, ADR5, XIDAR1, XIDG1, OXN02, OPUE2, OPIU3, OXI06, OTX03, OCMDE13, ORL12, OPAL2, AUAB3, OPUE22, AUG1, AUG2, AUG3, QK5F, ASM1, ASM2, ASM4, ASM9, SKMC, RIDL3, RIDL4, RIDL5 - config keys: accesses.deletionRecords.retentionDays, limits.audit.maxConcurrentReadsPerAccess, limits.audit.maxReadWaitMs - primitives: audit, audit-event-stream, external-id-index - context notes: content-query-audit-semantics, delegation-model, workforce-access-patterns **Planned changes** - feature: Chained / signed audit log strengthens tamper-resistance evidence ### HIPAA-Security 164.312(c)(1): Integrity, standard Coverage: facilitated · effort saved: medium · mode: primitive · draft Requirement: Implement policies and procedures to protect ePHI from improper alteration or destruction. **What Pryv does for you** Integrity is multi- layered: write authorization gated by `permissions`, event versioning preserves the prior value on every update (on a deployment with `versioning.forceKeepHistory: true`; the default keeps no event history), audit pins the (who, when, via which access) attribution, and `bin/backup.js` provides the recovery path if a destruction event needs to be reversed. The standard's overall programmatic obligation is yours; the technical substrate is Pryv's. **Detail** Concurrent writes (open-pryv.io 2.0.0-rc.38, merge `461f3c4c`): an `events.update`, a trash (`events.delete`; a shared-secret event is trashed by compare-and-set instead) or an attachment deletion is applied onto the event as stored at write time, so a top-level field written meanwhile (by the server or another client) that the request did not change is kept rather than silently overwritten with the copy the request read; `clientData` keys merge onto the stored map `[ESR1]`..`[ESR4]`, `[ESR6A]`. The built-in PostgreSQL and SQLite stores do the read-merge-write atomically: a row lock (`SELECT ... FOR UPDATE`) on PostgreSQL, an immediate transaction on SQLite, whose lock-wait is pinned by a test `[UEA1]`; a custom data store that does not implement it gets a read then an update. A request that sends `content` still replaces the content whole: two clients editing the same event's content concurrently is last-writer-wins, which your app resolves if it matters. **Evidence** - tests: ESR1, ESR2, ESR3, ESR4, ESR6A - primitives: event, audit, permissions, backup-restore **Planned changes** - feature: Chained / signed audit log enforces log integrity at the primitive layer ### HIPAA-Security 164.312(c)(2): Mechanism to authenticate ePHI, Addressable Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Implement electronic mechanisms to corroborate that ePHI has not been altered or destroyed in an unauthorized manner. **What Pryv does for you** Every event carries an integrity hash (SHA-256 by default, SHA-512 optional, on by default; an unkeyed checksum, see detail), and the audit row of each create or update records that hash with the event's key and the access that performed the write, anchoring the change to an authenticated actor `[WNWM]`: an event whose stored state no longer hashes to the value its last audited create or update recorded was changed since by something other than an audited create or update: a trash or an attachment deletion (audited, but the row records no new hash), a server-internal stamp, or an alteration at the storage layer. "What was the original?" needs the prior versions, which Pryv keeps only when you set `versioning.forceKeepHistory: true` (off by default; see `context/event-history.md`). Tamper detection beyond this (e.g., end-to-end content hashing under a customer-held key) is on the implementer or an extension. **Detail** **What the integrity value proves (open-pryv.io 2.0.0-rc.50).** It is an unkeyed checksum, not a signature: it detects corruption, and a change made outside the API is visible only by comparing against the hash the audit row recorded, which itself sits in storage a sufficiently privileged party can also rewrite. The release notes now call it a "checksum" for that reason. `integrity.algorithm` accepts `sha256` (default) and `sha512` only: `md5` and `sha1` refuse the boot and `bin/check-config.js` reports them `[CVIA1]`. Switching a core away from `md5` / `sha1` leaves the events and accesses written before with values that no longer match (`bin/integrity-check.js` reports them). **Accesses, and the configured algorithm (open-pryv.io 2.0.0-rc.84).** An access carries the same kind of checksum. Since 2.0.0-rc.84 it verifies on the form the API returns, also after an update (composite `id` and `modifiedBy`), on `accesses.update`, `accesses.get`, `accesses.getOne` (current and older versions, `includeHistory`) and deletion records `[AIWF]`, `[AIWG]`, `[AIWK]`, `[AIWM]` (a copy returned without its token, as a deletion record is, verifies once a holder of the token restores it `[AIWN]`); before, the value of an updated access was computed on the stored form and a client could not verify it. The upgrade recomputes the stored values once (a PostgreSQL migration, a one-shot pass on SQLite), rewriting a row only when it holds the previous form's value; anything else is left for `bin/integrity-check.js` to report `[AIWR]`, `[AIWS]`, `[AIWU]`. The owner-only `usage` counters are not part of it: a client strips them before hashing, as it does `lastUsed` `[AIWW]`. The storage-layer event checksum and every check by `bin/integrity-check.js` now use `integrity.algorithm` (they used sha256 whatever the setting) `[AIWZ]`; with `sha512`, events written before 2.0.0-rc.84 by that path are reported, not recomputed. Run the migration before trusting the check when `migrations.autoRunOnStart` is `false`. Audit-log tamper resistance itself is **voluntarily missing today**: rows are append-only by convention in the audit-write code path, but there is no software-side hash chain or signature. Integrity rests on the operator's filesystem posture (immutable mounts, append-only flags, file-integrity monitoring, out-of-band SIEM forwarding). Future direction: chained / signed audit log (per-row prev_hash + periodic operator-signed checkpoints). Tracked under internal backlog slug `AUDIT-LOG-CHAINING` and `proposals/audit-log-chaining.md`. When shipped, this row moves from `F: Evidence | Low` to `F: Evidence | Med`. **Evidence** - tests: WNWM, CVIA1, AIWF, AIWG, AIWK, AIWM, AIWN, AIWR, AIWS, AIWU, AIWW, AIWZ - config keys: integrity.algorithm - primitives: event, audit - context notes: event-history **Planned changes** - feature: Chained / signed audit log authenticates audit data (row moves F:Evidence|Low → F:Evidence|Med) ### HIPAA-Security 164.312(d): Person or entity authentication, standard Coverage: implemented · effort saved: high · draft Requirement: Implement procedures to verify that a person or entity seeking access to ePHI is the one claimed. **What Pryv does for you** Authentication is mediated by the access-token primitive: the bearer of a valid token has been authenticated. Strength of that authentication is layered, username + password by default; MFA via `mfa.*` API methods when `services.mfa.mode` is set. Recovery paths preserve account ownership when a second-factor device is lost. **Detail** **MFA is pluggable.** The `Service` base class (`components/business/src/mfa/Service.ts`) defines `challenge()` + `verify()` methods; two subclasses ship (`ChallengeVerifyService`, `SingleService`) targeting HTTP-callable external providers (SMS). An operator can plug in any provider matching the challenge/verify shape via `services.mfa` config (Twilio Authy, Auth0 MFA, Duo Web push, …) without writing code, or extend `Service` to implement any in-process method. Since open-pryv.io 2.0.0-rc.14 (`b606b328`) an in-process authenticator-app factor (TOTP, RFC 6238, secrets encrypted at rest) is built in and is the default method; SMS stays supported. NIST AAL framing: the achievable AAL depends on which method is configured. SMS-only is AAL1 under NIST SP 800-63B Rev 3. TOTP + push or WebAuthn-based providers reach AAL2. The remaining WebAuthn plugin is tracked under internal backlog slug `MFA-MODERN-METHODS` (matrix-side mirror at `proposals/mfa-modern-methods.md`); the broader OAuth2 auth-stack modernisation arc subsumes this work. MFA is opt-in per operator; once enabled, it can be required at login, at sensitive operations, or both. The MFA tests (`components/api-server/test/mfa.test.js`) exercise the activate `[MA3A]`, `[MA10A]`, confirm `[MA4A]`, challenge `[MA5B]`, verify `[MA5A]`, `[MA11A]`, deactivate `[MA6A]`, `[MA13B]` and recover `[MA7A]` paths, for the SMS and the TOTP method. **Second-factor guessing is throttled by Pryv itself (open-pryv.io 2.0.0-rc.27).** A per-account backoff, not a lockout (open-pryv.io `6231a37c`, default in `aa445c43`): after `services.mfa.attempts.backoff.freeFailures` failed second factors (default 3) within `perAccountWindowSeconds` (default 900 s), each further failure delays the next attempt by `baseSeconds` (default 2 s), doubling up to `maxSeconds` (default 300 s). During the delay `mfa.verify` / `mfa.confirm` / `mfa.challenge` answer 429 `too-many-attempts` with `Retry-After`, and a code sent during the delay is neither checked nor counted, so guessing stays slow while someone who only holds the password cannot lock the real user out. A success clears the tally; `backoff.maxSeconds: 0` turns it off (for example when you throttle at the edge instead). The `attempts` block is platform-wide: set the same values on every core. The per-session ceiling (5 attempts) also counts parallel attempts correctly (`1d91696c`). A TOTP code is consumed with a storage compare-and-set (`43293101`, `6231a37c`), so concurrent verifies of one code release exactly one token, and impossible `services.mfa` settings refuse the boot (`214b0b2b`). The former lockout keys (`attempts.perAccount`, `attempts.lockoutSeconds`) are no longer read; a boot warning names them. Tests: `[MA12A]`-`[MA12K]`, `[MBKF1]`-`[MBKF3]`, `[PCS1]`, `[MCHK1]`. **Password guessing is slowed the same way (open-pryv.io 2.0.0-rc.47).** Failed passwords on sign-in, password change, the MFA step-up and `mfa.recover` share a per-account delay (`auth.passwordAttempts`, never a lockout) and a per-client-address budget counted across all cores (`auth.passwordAttempts.perIp`); the methods that take a password are refused inside batch calls and over socket.io, and every password hash carries its own salt. Tests `[CEPB1]`, `[CEPI1]`, `[CEDB1]`, `[PWSL1]`. See §164.308(a)(5)(ii)(C) for the monitoring side. **A busy worker refuses a password check rather than guessing an answer (open-pryv.io 2.0.0-rc.87).** Password and OAuth client-secret checks run at most `auth.passwordCheckConcurrency` at a time per API worker (default 2), with `auth.passwordCheckQueue` calls waiting (default 50, at most 10 s). A call refused past that is not checked: the API answers `429 too-many-requests` with `Retry-After`, never `invalid-credentials`, and the refusal neither counts on the account's failed-password tally nor delays it `[CLIB2]`, `[PCLM1]`, `[PCLM2]`. The OAuth token, introspection and revocation endpoints answer `503 temporarily_unavailable` with `Retry-After`, never `invalid_client` (the uniform refusal below stays the answer to a failed client authentication) `[OPCL2]`, `[OPCL3]`. A refresh, client-credentials or token-exchange request can be retried as is; an authorization code is single-use, so a refused code exchange spends it and revokes its access, and the client starts a new authorization `[OPCL4]`. **A second authentication path, OAuth2.** Beyond the token + MFA stack above, Pryv can authenticate delegated apps through a standards-based OAuth2 authorization-code + PKCE flow (`open-pryv.io/components/oauth2/`, shipped in open-pryv.io 2.0.0-rc.8). PKCE is mandatory (S256 only, `code_challenge_methods_supported: ['S256']` in `open-pryv.io/components/oauth2/src/wellKnown.ts`); access tokens are short-lived (`oauth.accessTokenTTL`, default 1 h) and refresh tokens rotate single-use with a sliding TTL bounded by an absolute cap (`oauth.refreshTokenTTL` / `oauth.refreshTokenAbsoluteTTL`). Correction (2026-11-09): earlier versions of this row said that `oauth.requireAppAccountMfa` (default true) made an app account enrol MFA before driving the OAuth2 write surface. That setting was never enforced and was removed in open-pryv.io 2.0.0-rc.71 (a core where it is still set logs a warning at boot). The second factor protects the account holder's own sign-in, which is what grants consent; the app itself authenticates as a client, as below. **Client authentication and identity tokens (open-pryv.io 2.0.0-rc.68 to 2.0.0-rc.77).** Operator-registered clients (`bin/oauth-client.js create-registry`, curated, `--subject-type` mandatory) authenticate at `/oauth2/token` and `/oauth2/revoke` with `none` (public, PKCE), a client secret or `private_key_jwt`; `/oauth2/introspect` takes confidential clients registered `--can-introspect` only. Assertions are verified only with a key of their own type and pinned algorithms (`ES256`, `ES384`, `RS256` since rc.74, `RS384`), a key set of several keys needs a `kid` on every key and on the assertion, and a `jwks_uri` is fetched as a guarded outbound call (https only, private addresses refused, size and time bounded) `[OCAK2]`, `[OCAK7]`, `[OCAK23]`, `[OTPA1]`, `[OTPA3]`; a secret rotation may keep the previous secret valid for at most 30 days `[OCAK14]`. Every refusal is one uniform `invalid_client`. OpenID Connect is on when `oauth.signingKeys` lists a key (RS256, per core, YAML only): the id token's `sub` is the user's internal id or a pairwise alias, never the username, its `nonce` is accepted once per client platform-wide, and since rc.70 its `auth_time` is the user's last completed sign-in (password, password and second factor, or identity provider); `max_age` and `prompt` are not honoured `[OXD01]`, `[OXD04]`, `[OXN01]`, `[OREG17]`. The browser state of the consent flow is signed with a per-core `oauth.stateKey` (required since rc.70 when a consent page is configured; the admin-key fallback is gone), so the admin key no longer lets anyone forge consent state `[OXSK1]`, `[OREG16]`. With `oauth.perUserIssuer` (rc.77, opt-in, default off) each account host is its own issuer: codes, refresh tokens, id tokens and client assertions are bound to that host, and only the account the host names can consent there (`issuer-account-mismatch` in the audit trail) `[OPIS4]`, `[OPIS5]`, `[OPIS6]`, `[OPIU3]`. **Sender-constrained tokens (DPoP).** A delegated app may opt into RFC 9449 DPoP: it proves possession of a client-held key on each request, and the token is bound to that key's thumbprint (issued `token_type: DPoP`). A token stolen in transit or from storage is then useless without the private key, it materially strengthens "the entity seeking access is the one claimed" for bearer tokens. Opt-in and additive (Bearer clients are unchanged). The proof's freshness window is `oauth.dpop.clockSkewSeconds` (default 120 s); DEPLOYMENT NOTE: DPoP binds to the client-facing request URI, so a deployment accepting it must sit behind a proxy that overwrites the X-Forwarded-Host / -Proto headers. Server-side landed in open-pryv.io `9a874599`; the client side ships in the `pryv` JS library 3.10.0 (`SignedConnection`, `OAuth2Client` with `dpop: true`). **Operator key revocation.** When a bound key is compromised, you revoke it platform-wide by its RFC 7638 thumbprint (`bin/oauth-client.js revoke-key --yes`): every token bound to the key, including refresh rotations attempted after the revoke, is rejected on all cores within `oauth.dpop.keyRevokeCheckSeconds` (default 30 s), and the token endpoint refuses to mint for it. An advisory per-client key inventory (`list-keys`) shows what a revocation will hit before you run it (open-pryv.io `4c0a5ade`). **Delegate tokens authenticate AS the controlled account.** With account delegation (`open-pryv.io/components/delegation/`), a delegate holds a session-backed, owner-equivalent personal token that authenticates as the controlled account, but the two are never conflated: `accessInfo` exposes an additive `delegation` field naming the acting delegate, and audit attributes each delegate's actions on the controlled account (same-core + cross-core). Authentication as the account is revocable by the one party who can genuinely log in to it: detach is gated on a personal token carrying no forge-protected delegation marker (the marker is forge-guarded for every token class), so no delegate can impersonate a genuine login or block a takeover. See `context/delegation-model.md`. The same field identifies an app acting for a controlled account: an app access a delegate granted reports `delegation` with `grantedVia: 'app'` and the delegate's identity, from a server-stamped attribute no client can forge `[DCH02]`, `[DCH03]`. The auth-request result's own `delegation` block is a display hint only; `accessInfo` is the authoritative answer. An access granted through a delegation cannot pass for a genuine login either: it cannot detach the delegation `[DCH11]`. In open-pryv.io 2.0.0-rc.23. **Evidence** - tests: MA3A, MA4A, MA5A, MA5B, MA6A, MA7A, MA10A, MA11A, MA13B, MA12A, MBKF1, PCS1, MCHK1, DCH02, DCH03, DCH11, CEPB1, CEPI1, CEDB1, PWSL1, OCAK2, OCAK7, OCAK14, OCAK23, OTPA1, OTPA3, OXD01, OXD04, OXN01, OREG17, OXSK1, OREG16, OPIS4, OPIS5, OPIS6, OPIU3, CLIB2, PCLM1, PCLM2, OPCL2, OPCL3, OPCL4 - config keys: services.mfa.mode, services.mfa.attempts.backoff, auth.passwordAttempts, auth.passwordAttempts.perIp, oauth.accessTokenTTL, oauth.refreshTokenTTL, oauth.refreshTokenAbsoluteTTL, oauth.dpop.clockSkewSeconds, oauth.dpop.keyRevokeCheckSeconds, oauth.signingKeys, oauth.idTokenTTL, oauth.stateKey, oauth.perUserIssuer, auth.passwordCheckConcurrency, auth.passwordCheckQueue - primitives: access, MFA, system-streams, delegation - context notes: delegation-model **Planned changes** - enhancement: Reference MFA plugins (TOTP / WebAuthn) + primitive-catalogue doc surface the pluggability ### HIPAA-Security 164.312(e)(1): Transmission security, standard Coverage: configurable · effort saved: medium · draft Requirement: Implement technical security measures to guard against unauthorized access to ePHI that is being transmitted over an electronic communications network. **What Pryv does for you** You choose where TLS terminates, and you must choose. The core serves HTTPS when you configure it to: a certificate at `http.ssl.keyFile` / `http.ssl.certFile`, issued and auto-renewed by the built-in ACME integration when `letsEncrypt.enabled` is set. Without that configuration it serves plain HTTP (the default `http.ip` is 127.0.0.1) and your reverse proxy terminates TLS (`open-pryv.io/INSTALL.md`, "Running behind nginx"; `open-pryv.io/docs/nginx-ingress-sample.conf`). Between cores, Raft traffic runs over mutual TLS on a cluster-private CA once `bin/bootstrap.js` has written `storages.engines.rqlite.tls`; with the default `tls: null` it is plain TCP (single core, or a VPN-protected cluster). **Detail** LE certificate replication uses rqlite keyspace `tls-cert/` + `tls-acme-account`; rotation triggers `https.Server.setSecureContext` via cluster IPC for live key swap without downtime. The cluster CA lives outside the LE chain, operator-rooted, used only between cores. **Webhook delivery is signal-only.** Outbound webhook POSTs from Pryv carry a notification that something changed, not the changed data itself. Receivers fetch the current state via authenticated GET back to Pryv (same access-token-protected paths as any other read). No PHI / PII / tokens transit the webhook surface; the transmission-security attack surface narrows accordingly. See `context/webhooks-signal-only.md` for the full design rationale + operational caveats (TLS-on- delivery, retry semantics, poison-pill protection). **Calls to a counterparty** (open-pryv.io 2.0.0-rc.56). Cross-account consent deliveries, which carry the endpoint of a data grant, and the other calls Pryv makes to URLs a counterparty supplies (chat, revocations, scope updates, delegation and OAuth revocation notices) are refused over plain `http:` unless `cluster.allowInsecurePeerUrl` is set (meant for development and test clusters) `[PFR4]`, and refused toward a loopback, private, link-local or otherwise reserved address unless it is listed in `cmc.allowedPrivateHosts` `[PFR1]`, `[CO22]`. Earlier releases applied neither check to these calls. The OAuth2 key sets (`jwks_uri`, open-pryv.io 2.0.0-rc.70) and client metadata documents (2.0.0-rc.74) are fetched over https only, whatever `cluster.allowInsecurePeerUrl` says `[OCMD03B]`, `[OCMD03G]`. Requests forwarded on adapter routes (2.0.0-rc.73) go to the `upstream` you configure; Pryv warns at boot when it is `http:` to a non-local address, since that traffic, credentials included, travels in clear: use `https:` or keep the sidecar on the host `[ADRC03]`, `[ADRI13]`. **Credential hand-off between parties.** TLS protects the pipe; the shared-secrets primitive (`open-pryv.io/components/shared-secrets/`) protects the credential travelling over it. Handing an access credential to a counterparty (e.g. inviting a care-team member) used to mean a URL-embedded token that lingers in browser history, referrer headers, and intermediary access logs after the TLS session ends. Instead, the counterparty receives a one-time random key: redeemable exactly once, mandatory expiry, hash-only server-side storage (the SHA-256 of the key's random half), optional passphrase / HMAC gate on redemption. An intercepted or logged link therefore never carries a live, replayable credential to ePHI. Expiry is enforced when someone reaches for the secret rather than by a background sweeper, so plan your own deletion pass if ePHI retention rules require expired payloads to be gone by a fixed deadline. **Technical** The core sets no TLS version or cipher options of its own (`open-pryv.io/components/api-server/src/server.ts`, `buildHttpsOptions`): Node.js defaults apply. On the Node 24 the Docker image runs, that is a TLS 1.2 floor, with TLS 1.3 negotiated when the client supports it. The sample nginx vhost allows TLS 1.2 and 1.3. Checked against open-pryv.io 2.0.0-rc.34. **Evidence** - tests: ACMEINT, ACMEORCH, CERTUTILS, FORCERENEWIPC, SHS02, SHS12, SHS13, PFR1, PFR4, CO22, OCMD03B, OCMD03G, ADRC03, ADRI13 - config keys: http.ssl.keyFile, http.ssl.certFile, letsEncrypt.enabled, storages.engines.rqlite.tls, cluster.allowInsecurePeerUrl, cmc.allowedPrivateHosts, adapterRoutes - primitives: letsEncrypt-integration, multi-core-mTLS, shared-secrets - context notes: webhooks-signal-only ### HIPAA-Security 164.312(e)(2)(i): Integrity controls, Addressable Coverage: configurable · effort saved: medium · draft Requirement: Implement security measures to ensure that electronically transmitted ePHI is not improperly modified without detection until disposed of. **What Pryv does for you** Once TLS is in place (in the core or in your proxy, see 164.312(e)(1)), every TLS record is integrity-protected, so modification in transit is detectable. The core does not enforce TLS on its own: without a configured certificate it serves plain HTTP, which is only safe behind your TLS-terminating proxy. Endpoint-to-endpoint integrity across multiple hops (e.g., proxy chains) requires your chain to preserve this property. **Evidence** - tests: ACMEINT, ACMEORCH - config keys: http.ssl.keyFile, http.ssl.certFile, letsEncrypt.enabled - primitives: letsEncrypt-integration ### HIPAA-Security 164.312(e)(2)(ii): Encryption, Addressable (transmission) Coverage: configurable · effort saved: medium · draft Requirement: Implement a mechanism to encrypt ePHI whenever deemed appropriate. **What Pryv does for you** Encryption in transit is a configuration you set, not a default. Two supported placements: the core terminates TLS itself (`http.ssl.keyFile` / `http.ssl.certFile`, with certificates issued and renewed by the built-in ACME integration when `letsEncrypt.enabled` is set), or your reverse proxy terminates TLS and the core serves plain HTTP behind it. Between cores, Raft traffic is mutual TLS once `bin/bootstrap.js` has written `storages.engines.rqlite.tls` (default `tls: null`, plain TCP). For ePHI, configure one of the two placements so no network hop carries plaintext. **Detail** With the default configuration (`letsEncrypt.enabled: false`, no `http.ssl.*`) the core serves plain HTTP on `http.ip` (127.0.0.1 by default); keep it bound to the host your proxy runs on. The core sets no TLS version or cipher options of its own, so Node.js defaults apply (on the Node 24 the Docker image runs: a TLS 1.2 floor, TLS 1.3 when the client supports it); at a proxy, the proxy's own settings apply (the sample nginx vhost allows TLS 1.2 and 1.3). The TLS requirement holds at the transmission boundary, wherever you place that boundary. **HSTS behind a TLS-terminating proxy (open-pryv.io 2.0.0-rc.34).** Sites the core hosts (`hostedSites`, e.g. the account web app) send `Strict-Transport-Security` by default only when the core itself terminates TLS, so behind a proxy they used to send none. Set `hostedSites..hsts: always` when your proxy terminates TLS and the site is HTTPS-only (browsers only honour the header received over HTTPS); `never` turns it off. The setting comes from configuration only (no `X-Forwarded-Proto` is trusted), an invalid value refuses the boot, and the value is `max-age=31536000` for that host only. In dnsLess mode the site shares the API's host, so the header covers that whole host. The core does not add HSTS to API answers on a separate API host: set it on your proxy if you want it there. **Evidence** - tests: ACMEINT, ACMEORCH, CERTUTILS, HSHT - config keys: http.ssl.keyFile, http.ssl.certFile, letsEncrypt.enabled, storages.engines.rqlite.tls, hostedSites..hsts - primitives: letsEncrypt-integration, multi-core-mTLS ### HIPAA-Security 164.314(a)(1): Business associate contracts, standard Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: Business associate contract or other arrangement between the covered entity and its business associate must meet the requirements of §164.314(a)(2). **What Pryv does for you** The BAA itself is a contract, the covered entity drafts it with legal counsel. What Pryv contributes when you operate as a business associate: the audit log makes "implement administrative, physical and technical safeguards" (§164.314(a)(2)(i)(A)) auditable per the BAA's specified terms; the access primitive bounds which subjects + which streams the BA may touch; CMC's cross-platform consent flow gives a structured channel for the §164.314(a)(2)(i)(C) breach-notification pipe between BA and CE. **Evidence** - derives from: gdpr.Art.28 - primitives: access, audit, CMC ### HIPAA-Security 164.314(a)(2)(i)(A): BAC content, implement safeguards reasonably and appropriately Coverage: facilitated · effort saved: high · mode: infrastructure · draft Requirement: Business associate contract must provide that the business associate will implement administrative, physical and technical safeguards that reasonably and appropriately protect ePHI. **What Pryv does for you** The BAA's "reasonable and appropriate safeguards" obligation is satisfied by the technical-safeguards programme already enumerated across §164.308 + §164.310 + §164.312. The BA cites the relevant Pryv-implemented rows when populating their BAA exhibit. Mapping this Article to the existing technical-safeguards rows is the `derives_from` chain. **Evidence** - derives from: hipaa-security.164.308(a)(1)(i), hipaa-security.164.312(a)(1), hipaa-security.164.312(e)(1) - primitives: access, permissions, audit, letsEncrypt-integration, encryption-at-rest-secrets, MFA, backup-restore ### HIPAA-Security 164.314(a)(2)(i)(B): BAC content, extend safeguards to subcontractors Coverage: out-of-scope · draft Requirement: Business associate contract must provide that the business associate will, in accordance with §164.308(b)(2), ensure that any subcontractors that create, receive, maintain, or transmit ePHI on its behalf agree to comply with the applicable requirements of this subpart by entering into a contract or other arrangement that complies with this section. Applied down the chain by §164.314(a)(2)(iii) (contracts between a business associate and its subcontractor). **What Pryv does for you** Subcontracting chains are contractual; no software role. The only built-in subprocessor Pryv-the-software carries is the observability-provider adapter (default disabled); when enabled, the BA's subcontractor list adds the observability provider as a sub-processor under both HIPAA-Security §164.314(a)(2)(i)(B) and GDPR Art.28(4). (Listed as §164.314(a)(2)(ii)(B) until 2026-11-19: that paragraph is "other arrangements" and has no subcontractor clause.) ### HIPAA-Security 164.314(a)(2)(i)(C): BAC content, report security incidents Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Business associate contract must provide that the business associate will report any security incident of which it becomes aware to the covered entity. **What Pryv does for you** Detection of a security incident is the BA's operational concern (audit-log review + observability). Reporting to the CE is the contractual flow. Pryv's CMC plugin provides a structured cross-account messaging substrate when both sides run Pryv, otherwise the report channel is email / API / portal at the BA's choice. The audit log supplies the forensic evidence the report cites. **Evidence** - primitives: audit, CMC, observability-provider ### HIPAA-Security 164.316(a): Policies and procedures, standard Coverage: out-of-scope · draft Requirement: Implement reasonable and appropriate policies and procedures to comply with the standards, implementation specifications, or other requirements of this subpart. **What Pryv does for you** The policies-and-procedures programme is an organizational artefact owned by the covered entity / business associate's security officer. Pryv has no software role in drafting them. Pryv-side documentation (this matrix, CHANGELOGs, the QMS workstream) feeds the operator's policy work but doesn't substitute for it. ### HIPAA-Security 164.316(b)(1): Documentation, Required Coverage: facilitated · effort saved: medium · mode: storage · draft Requirement: Maintain the policies and procedures implemented to comply with this subpart in written (which may be electronic) form; if an action, activity, or assessment is required by this subpart to be documented, maintain a written (which may be electronic) record of the action, activity, or assessment. **What Pryv does for you** Where the required record is operational (activity logs, assessment outputs), Pryv events on a designated `compliance/*` stream carry the documentation alongside the audit log's automatic operational record. Event versioning preserves the change history of policies-as-data once you set `versioning.forceKeepHistory: true` (off by default, in which case an update overwrites the previous revision: keep each revision as its own event instead); backup-restore preserves them across the §164.316(b)(2) retention window. **Evidence** - primitives: event, stream, audit, backup-restore ### HIPAA-Security 164.316(b)(2)(i): Documentation, time limit, Required Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: Retain the documentation required by §164.316(b)(1) for 6 years from the date of its creation or the date when it last was in effect, whichever is later. **What Pryv does for you** Six-year is a **minimum** retention period, not a maximum (the statute says "retain … for 6 years"; covered entities may retain indefinitely). Pryv's audit log persists by default; retention beyond the minimum + any operational pruning are operator-driven choices (operator schedules archival to cold storage per their policy). `bin/backup.js` produces the artefact the §164.316 retention rule attaches to. **Detail** **Minimum 6-year retention is the regulatory floor; there is no max.** Pryv never *requires* destruction at the 6-year mark, operators commonly retain indefinitely under GDPR Art.17(3)(b) "compliance with a legal obligation" lawful basis (the §164.316 retention itself, or sectoral regs) or Art.17(3)(e) "legal claims". The pressure to prune is operational (storage cost / DB performance over 10B-row scales), not regulatory. **Tiering pattern for long-running deployments**: the audit log is exposed via the `@pryv/datastore` abstraction (`auditDataStore` registered as `_audit` in the Mall; `components/audit/src/datastore/auditDataStore.ts`). An operator wanting to tier hot recent rows + cold archived rows writes a custom `auditStorage` engine plugin (per `storages/engines/*/manifest.json`) that routes writes to a hot tier + reads to a union view across hot + cold. End users see one continuous log via `audit.getLogs`; the storage backing it is the operator's choice. Full pattern detail in `context/audit-archival-via-custom-datastore.md`. **Cascade with the Q8 erasure setting** (shipped 2026-05-27, open-pryv.io master `405b3a1`): the `audit.onUserDelete: keep` operator setting is the HIPAA-friendly path when a covered entity deletes a subject's account while needing to retain the audit. The retention obligation runs under a lawful basis separate from the deletion itself (HIPAA Privacy Rule §164.530(j) anchors documentation-retention independently of subject account state). Audit erasure on `auth.delete` now converges across engines (SQLite + PostgreSQL, open-pryv.io `891090d` + `853e1cb`): with `audit.onUserDelete: erase` (default), both engines reach zero audit rows for the deleted subject. With `keep`, both engines retain the audit since open-pryv.io 2.0.0-rc.46: the PostgreSQL rows survive, and on SQLite the per-user audit database file stays at its path in the user directory, readable by user id, while everything else there is removed `[DKP1]`. Before 2.0.0-rc.46 the SQLite directory wipe erased it, so `keep` behaved like `erase` on SQLite: if you relied on `keep` there, audit of accounts deleted earlier is gone. **Access deletion records** (open-pryv.io 2.0.0-rc.56). The record of a deleted access is what lets an audit row name the access that acted. It is kept until the account is deleted unless you set `accesses.deletionRecords.retentionDays` above 0, in which case the master purges older ones once a day, whatever `audit.onUserDelete` says `[ADP1]`. The audit rows themselves are kept; past the purge they name such an access by id only. A retention shorter than six years shortens that attribution. **Account auto-deletion (open-pryv.io 2.0.0-rc.66, `8521c8d5`).** An account erased because its holder scheduled it, or because your inactivity preset applied, follows `audit.onUserDelete` like any account deletion: with the default `erase` its audit goes with it and a WARN log line before and after the erasure is what remains; with `keep` (and the audit active) the trail survives and an `account.autoDeletion.erase` row (username, trigger, whether the holder or your preset set the schedule, deadline, when the notices were sent) is written in it before the erasure starts (`[ADSW17]`). A covered entity that enables account auto-deletion keeps `audit.onUserDelete: keep` and keeps those log lines for the six-year period if they are part of its documentation. **Evidence** - tests: DKP1, ADP1, ADSW17 - docs: customer-resources/account-auto-deletion.md - config keys: audit.onUserDelete, accesses.deletionRecords.retentionDays - primitives: backup-restore, audit, account-auto-deletion - context notes: audit-archival-via-custom-datastore ### HIPAA-Security 164.316(b)(2)(iii): Documentation, updates, Required Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Review documentation periodically, and update as needed, in response to environmental or operational changes affecting the security of the ePHI. **What Pryv does for you** Periodic review cadence is the operator's procedure. Pryv's contribution: when policies- as-data are stored as events on a `compliance/policies/*` stream, the audit log shows who updated which policy event and when, and, on a deployment with `versioning.forceKeepHistory: true` (off by default), the event-version chain also shows what changed. **Evidence** - primitives: event, audit ### HIPAA-Security 164.308(a)(2): Assigned security responsibility, standard Coverage: out-of-scope · draft Requirement: Identify the security official who is responsible for the development and implementation of the policies and procedures required by this subpart. **What Pryv does for you** Security-official designation is HR / organizational. No software role. When the assigned official needs operational data, the audit log + observability + this matrix are the substrate they draw on. ### HIPAA-Security 164.308(a)(5)(ii)(A): Security reminders, Addressable Coverage: out-of-scope · draft Requirement: Implement periodic security updates / reminders. **What Pryv does for you** Reminder cadence + content are organizational. Pryv has no role at the awareness-content layer. ### HIPAA-Security 164.308(a)(5)(ii)(B): Protection from malicious software, Addressable Coverage: facilitated · effort saved: low · mode: infrastructure · draft Requirement: Implement procedures for guarding against, detecting, and reporting malicious software. **What Pryv does for you** Guarding against, detecting and reporting malicious software is mostly a host / endpoint / network-layer control: Pryv-the-software doesn't include AV, and your hosting environment carries that part. Pryv contributes one narrow guard on the files it stores: since open-pryv.io 2.0.0-rc.34 an attachment whose declared type a browser executes or renders as a document (HTML, SVG and other XML, JavaScript) is served in a sandbox (`Content-Security-Policy: sandbox; default-src 'none'`), so it cannot run script on the API origin. Pryv does not scan attachment content or refuse uploads by type: if ePHI workflows exchange files, scan them in your app or at your proxy, and keep the detection and reporting procedures in your security program. Same reasoning as ISO 27001 A.8.7. **Evidence** - tests: ACTY - derives from: iso-27001.A.8.7 ### HIPAA-Security 164.308(a)(5)(ii)(C): Log-in monitoring, Addressable Coverage: facilitated · effort saved: medium · mode: evidence · draft Requirement: Implement procedures for monitoring log-in attempts and reporting discrepancies. **What Pryv does for you** Login + authentication- failure events are captured in the audit log (per `auth.*` API method calls). Observability data aggregates rate + anomaly signals. The discrepancy-reporting cadence + threshold tuning are operator-side procedure. **Detail** **Pryv surfaces the events and slows password guessing; you choose the lockout policy.** Since open-pryv.io 2.0.0-rc.47 Pryv delays failed passwords itself, never locking an account: sign-in, `account.changePassword`, the MFA step-up by password and `mfa.recover` share a per-account tally (after `auth.passwordAttempts.freeFailures`, default 5, within 900 s, the next attempt waits from 2 s doubling up to 300 s, answered 429 `too-many-attempts` with `Retry-After`) `[CEPB1]`, and a per-client-address budget counted across all cores (`auth.passwordAttempts.perIp.maxFailures`, default 30 per 900 s, an IPv6 /64 counting as one address) `[CEPI1]`. The credential methods are refused inside batch calls and over socket.io, so every guess is one HTTP request your edge sees `[CEDB1]`. Behind a reverse proxy, list it in `http.trustedProxies`, or every client shares the proxy's address budget `[CEPI2]`. Locking accounts after N failures, and reporting discrepancies, stay your policy: operator pattern `fail2ban` watching the audit log and banning addresses that exceed N auth failures in T minutes, plus reverse-proxy `limit_req_zone` per-IP caps on `/auth/login`. (Before 2.0.0-rc.47 Pryv did not throttle passwords in-process.) **A busy refusal is not a failed attempt** (open-pryv.io 2.0.0-rc.87). When the API worker's password checks are all taken (`auth.passwordCheckConcurrency`, `auth.passwordCheckQueue`), a sign-in is refused without checking the password: `429 too-many-requests` with `Retry-After`, an error id distinct from the `too-many-attempts` of the delay above. It does not count on the account's tally and does not delay the account `[PCLM1]`, `[PCLM2]`. A monitoring rule that counts failed logins should key on `invalid-credentials` and `too-many-attempts`, not on every 429. **The second factor has its own tally.** Since open-pryv.io 2.0.0-rc.27 Pryv enforces a per-account backoff on failed MFA attempts (open-pryv.io `6231a37c`, `aa445c43`; `services.mfa.attempts.backoff`, default: after 3 failures within 15 minutes, delays doubling from 2 s up to 5 minutes, answered 429 `too-many-attempts` with `Retry-After`). It is a delay, never a lockout: a success clears it and the real user waits at most `maxSeconds`. The counter lives on the account's home core. Tests `[MA12A]`-`[MA12K]`, `[MBKF1]`-`[MBKF3]`. See §164.312(d). Full operator-side rate-limiting framing: `context/rate-limiting-and-dos-protection.md`. Enforcement companion on the authentication endpoints: the reference nginx + fail2ban configuration (`customer-resources/rate-limiting.md`) limits password logins and MFA attempts per IP and bans an address after repeated failed logins. **Evidence** - tests: AT01, AT02, AT51, MA12A, MBKF1, CEPB1, CEPI1, CEPI2, CEDB1, PCLM1, PCLM2 - docs: customer-resources/rate-limiting.md#fail2ban - config keys: services.mfa.attempts.backoff, auth.passwordAttempts, auth.passwordAttempts.perIp, http.trustedProxies, auth.passwordCheckConcurrency, auth.passwordCheckQueue - derives from: iso-27001.A.8.15 - primitives: audit, observability-provider, MFA - context notes: rate-limiting-and-dos-protection ### HIPAA-Security 164.308(a)(6)(i): Security incident procedures, standard Coverage: facilitated · effort saved: medium · mode: evidence · draft Requirement: Implement policies and procedures to address security incidents. **What Pryv does for you** Incident-response procedure is the operator's organizational programme. Pryv contributes the detection + scoping data layer: audit log shows who accessed what; observability gives system-level anomaly signals; access primitives provide the containment mechanism (revoke or scope-down the implicated access). For substrate-vulnerability intake specifically (operator learning that the Pryv version they run has a confirmed vulnerability), the upstream's vulnerability disclosure program is the externally-facing channel: `SECURITY.md` publishes a coordinated disclosure policy (private GitHub Security Advisories flow + `security-dev@` mailbox + scope + SLA + safe harbor), and private vulnerability reporting is enabled on the published repositories. **Evidence** - docs: customer-resources/rate-limiting.md#verify-the-limits-fire - derives from: hipaa-security.164.308(a)(1)(i) - primitives: audit, observability-provider, access ### HIPAA-Security 164.308(a)(7)(ii)(C): Emergency mode operation plan, Required Coverage: facilitated · effort saved: medium · mode: infrastructure · draft Requirement: Establish (and implement as needed) procedures to enable continuation of critical business processes for protection of the security of ePHI while operating in emergency mode. **What Pryv does for you** Pryv's HA primitives (multi-core cluster + Raft replication + cluster-CA mTLS) support continued operation when a single facility fails. The "critical business processes" definition + emergency-mode runbook are the operator's. See also Art.5+ of the Disaster Recovery row. **Evidence** - derives from: hipaa-security.164.308(a)(7)(ii)(A), hipaa-security.164.308(a)(7)(ii)(B) - primitives: multi-core-mTLS, backup-restore, letsEncrypt-integration ### HIPAA-Security 164.308(a)(7)(ii)(D): Testing and revision procedures, Addressable Coverage: out-of-scope · draft Requirement: Implement procedures for periodic testing and revision of contingency plans. **What Pryv does for you** Contingency-plan testing is an operational drill. Pryv has no software role at the drill-execution layer. The drill's restoration-from-backup phase exercises Pryv primitives but the testing programme itself is the operator's. ### HIPAA-Security 164.308(a)(8): Evaluation, standard Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Perform a periodic technical and nontechnical evaluation in response to environmental or operational changes affecting the security of ePHI to ensure security policies and procedures meet the requirements of this subpart. **What Pryv does for you** Evaluation is the operator's cyclical assessment. Pryv-side inputs: audit log (control- effectiveness sample), observability (operational stability data), this matrix (control inventory to evaluate against), Pryv's test matrix (~2351 PG and SQLite, matched baseline, passing on every commit, concrete §164.308(a)(8) effectiveness evidence), Pryv's supply-chain pipeline (shipped in open-pryv.io `9e2ee7ff`: CI dependency-audit gate, per-release CycloneDX SBOM, cosign-signed images; the SBOM + latest scan output are citable periodic-evaluation artefacts), Pryv's vulnerability disclosure program + GHSA advisory history (coordinated disclosure policy published in `SECURITY.md`; private vulnerability reporting enabled on the published repositories), and the code-level security review of open-pryv.io (2026-06 to 2026-10, fixes in 2.0.0-rc.40 to 2.0.0-rc.51, public report `SECURITY-AUDIT.md` published 2026-10-14). The assessment write-up is operator-side. **Detail** **The 2026 security review is a technical-evaluation input you can cite for the platform layer.** The open-pryv.io maintainers ran a systematic code-level security review of the source (authentication and sessions, authorisation and tenant isolation, input handling, cryptography and secrets in logs, the admin / multi-core plane, the network-facing daemons, resource limits, deletion semantics), each finding confirmed by a second review before it was accepted and fixed with regression tests. The fixes shipped in open-pryv.io 2.0.0-rc.40 to 2.0.0-rc.51 (October 2026); each release note lists what changed and the operator steps it needs. The public report, `SECURITY-AUDIT.md` (https://github.com/pryv/open-pryv.io/blob/master/SECURITY-AUDIT.md, published 2026-10-14), gathers the method, each finding with its severity, fix release and operator action, and the known residual risks; it is revised with every release that carries a security fix. Methodology, scope and the fix areas: `context/code-security-review-2026.md`. What stays yours under §164.308(a)(8): running a release that carries the fixes (2.0.0-rc.51 or later, with the operator steps of each release in between), and the evaluation itself. The review covered the code, not your deployment: your configuration, network exposure, added applications and procedures, and the "in response to environmental or operational changes" trigger, are evaluated by you. It was performed by the maintainers, not an independent assessor. **Evidence** - derives from: hipaa-security.164.316(b)(2)(iii) - primitives: audit, observability-provider - context notes: code-security-review-2026 **Planned changes** - feature: Read-only effective-configuration endpoint supplies the technical baseline snapshot the periodic evaluation is measured against ### HIPAA-Security 164.310(a)(1): Facility access controls, standard Coverage: out-of-scope · draft Requirement: Implement policies and procedures to limit physical access to its electronic information systems and the facility or facilities in which they are housed, while ensuring that properly authorized access is allowed. **What Pryv does for you** Facility access is physical. See the §164.310 framing row. **Evidence** - derives from: hipaa-security.164.310 ### HIPAA-Security 164.310(b): Workstation use, standard Coverage: out-of-scope · draft Requirement: Implement policies + procedures that specify the proper functions to be performed, the manner in which those functions are to be performed, and the physical attributes of the surroundings of a specific workstation or class of workstation that can access ePHI. **What Pryv does for you** Workstation use + physical attributes are facility / HR controls. **Evidence** - derives from: hipaa-security.164.310 ### HIPAA-Security 164.310(c): Workstation security, standard Coverage: out-of-scope · draft Requirement: Implement physical safeguards for all workstations that access ePHI, to restrict access to authorized users. **What Pryv does for you** Physical workstation security (screen locks, kensington locks, privacy filters) is endpoint-management scope. **Evidence** - derives from: hipaa-security.164.310 ### HIPAA-Security 164.310(d)(1): Device and media controls, standard Coverage: facilitated · effort saved: medium · mode: infrastructure · draft Requirement: Implement policies and procedures that govern the receipt and removal of hardware and electronic media that contain ePHI into and out of a facility, and the movement of these items within the facility. **What Pryv does for you** Pryv-side contribution at the media-controls layer: per-user backup files are the natural unit when an individual subject's ePHI moves off the production system (export, transfer, archive); operator-side at-rest encryption (LUKS / PG TDE) keeps the ePHI-on-media encrypted in motion + at rest. The physical movement procedure is the operator's. **Evidence** - derives from: hipaa-security.164.310 - primitives: backup-restore, encryption-at-rest-secrets ## ISO 13485, Medical devices, Quality Management Systems, Requirements for regulatory purposes (ISO 13485) - Scope id: `iso-13485` (standard) - Jurisdiction: International (ISO) - Version: ISO 13485:2016 (Amd 1:2021) (2016-03-01) - Official text: https://www.iso.org/standard/59752 - Requirements: 10 (1 implemented, 9 facilitated) - Browse: https://pryv.github.io/compliance-matrix/#/scope/iso-13485 ### ISO 13485 4.1.6: Validation of software applications used in the QMS Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Organization shall document procedures for validation of the application of computer software used in the quality management system. Such software shall be validated prior to initial use, after changes, as appropriate. **What Pryv does for you** When the manufacturer's QMS uses Pryv as one of its computer applications (e.g., storing CAPA records as events, design files as attachments, training records as stream content), 4.1.6 requires validation evidence. Pryv-side artefacts that feed validation: test matrix results, audit log (proves the software's behaviour matches expectation under real usage), CHANGELOG-v2 per release. The validation methodology + acceptance criteria are the manufacturer's. **Evidence** - primitives: audit ### ISO 13485 4.2.4: Control of documents Coverage: facilitated · effort saved: medium · mode: storage · draft Requirement: Documents required by the QMS shall be controlled, review, approval, identification of changes, current revision status, legibility, identification of external-origin documents, prevention of obsolete-document misuse. **What Pryv does for you** Pryv as a document-control surface: events on a designated `qms-docs/*` stream tree carry the document content (or a reference to it); event versioning preserves change history once you set `versioning.forceKeepHistory: true` (off by default, in which case an update overwrites the previous revision: keep each revision as its own event instead); audit log tracks who-accessed-what for the "prevention of obsolete-document misuse" element. The manufacturer's approval-workflow / review-cadence procedure sits on top. **Evidence** - qms: qms/pryv/02-procedures/document-control.md - primitives: event, stream, audit ### ISO 13485 4.2.5: Control of records Coverage: implemented · effort saved: high · draft Requirement: Records shall be established and maintained to provide evidence of conformity to requirements and effective operation of the QMS; shall remain legible, readily identifiable + retrievable. **What Pryv does for you** QMS records stored as Pryv events get legibility (canonical data-types schemas), retrievability (events.get with timestamp + stream filters), and durability (backup-restore + audit attestation of changes). The manufacturer's retention period + record-classification design are the policy half. **Evidence** - tests: AT01, AT51, UZEV - primitives: event, audit, backup-restore ### ISO 13485 7.3.7: Design verification Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: Design and development verification shall be performed to ensure design + development outputs have met the design + development input requirements; records of verification + actions shall be maintained. **What Pryv does for you** When the device under development uses Pryv as backend, the verification activity ("output meets input") generates verification records, these can be stored as Pryv events on a designated `design-verification/*` stream with attachments for reports. Audit log provides the timestamp + actor evidence the record was actually produced when claimed. **Evidence** - qms: qms/pryv/02-procedures/design-control.md - primitives: event, audit ### ISO 13485 7.3.8: Design validation Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: Design and development validation shall be performed to ensure product is capable of meeting requirements for specified application or intended use; records of validation + actions shall be maintained. **What Pryv does for you** Same Pryv contribution as 7.3.7, validation records stored as events with attachments; audit chain proves authenticity over time. Clinical validation (the typical method for medical-device design validation) cross-references the MDR Art. 61 clinical-evaluation row. **Evidence** - derives from: mdr.Art.61 - primitives: event, audit ### ISO 13485 8.2.1: Customer feedback Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Organization shall document procedures for feedback process, including provision for collecting + monitoring information from production + post-production phases; feedback shall be used to identify input to risk management + maintain product requirements. **What Pryv does for you** Customer-feedback data sources: events written from the device itself ("post-market reports"), observability data ("how is the system performing in the field"), audit data ("what activity patterns are users showing"). Pryv hosts and audit-trails these data flows; the manufacturer's feedback-processing procedure analyses them and feeds back into design + risk management. **Evidence** - derives from: mdr.Art.83 - primitives: event, audit, observability-provider ### ISO 13485 8.5: Improvement Coverage: facilitated · effort saved: low · mode: storage · draft Requirement: Organization shall identify and implement any changes necessary to ensure + maintain continued suitability + adequacy + effectiveness of the QMS; corrective + preventive action shall be documented. **What Pryv does for you** CAPA records stored as Pryv events with attachments; audit chain provides the tamper- evidence layer. The corrective + preventive action workflow itself (root-cause analysis, effectiveness check, verification) is the manufacturer's process. Pryv carries the records. **Evidence** - primitives: event, audit ### ISO 13485 7.3.10: Design and development files Coverage: facilitated · effort saved: medium · mode: storage · draft Requirement: Organization shall maintain a design and development file for each medical device type. The file shall include or reference records generated to demonstrate conformity to the requirements for design and development and records for design and development changes. **What Pryv does for you** The design history file (DHF in FDA QSR terms) is a curated set of records spanning a device's design lifetime. Pryv supports it by storing each design record as an event on a designated `design-history//*` stream, with event versioning for change traceability (set `versioning.forceKeepHistory: true`; it is off by default) + audit log for tamper evidence + backup-restore for retention. The curation methodology (what's "in" the file vs ambient project history) is the manufacturer's editorial decision. **Evidence** - derives from: iso-13485.4.2.5, mdr.Art.10 - primitives: event, stream, audit, backup-restore ### ISO 13485 8.2.3: Reporting to regulatory authorities Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Where applicable regulatory requirements require notification of complaints that meet specified reporting criteria of adverse events or issuance of advisory notices, the organization shall document such reporting. **What Pryv does for you** Adverse-event reporting decisions + the actual reports are manufacturer-side (per MDR Art. 87 timelines for EU; equivalent timelines for FDA / other regulators). Pryv contribution: the events the report cites live on Pryv with their original timestamps + access provenance + audit trail; CMC plugin (if both parties run Pryv) supports a structured manufacturer-to-authority handshake. **Evidence** - derives from: mdr.Art.87 - primitives: event, audit, CMC ### ISO 13485 8.4: Analysis of data Coverage: facilitated · effort saved: medium · mode: evidence · draft Requirement: Organization shall document procedures to determine, collect and analyze appropriate data to demonstrate the suitability and effectiveness of the QMS; analysis shall provide information relating to feedback, conformity to product requirements, characteristics + trends, suppliers, audits, service reports. **What Pryv does for you** Pryv supplies the data sources: audit log (per-method usage patterns), events on customer-feedback streams (per §8.2.1), observability metrics (system trend data). The analysis methodology + the resulting suitability-of-QMS conclusions are management-review artefacts produced by the manufacturer. **Evidence** - primitives: audit, event, observability-provider ### Excluded clauses Clauses left out of this curated scope because Pryv has no software role in them: - 4.1.1: Top-management QMS scope + boundary definition, organizational. Pryv has no software role at the scope-setting layer. - 4.1.3: QMS process documentation requirements (sequence, interactions, criteria, methods), organizational, drafted by the device manufacturer. - 5: Management responsibility (commitment, customer focus, quality policy, planning, responsibility + authority, communication, management review), entirely organizational. - 6: Resource management (provision, human resources, infrastructure, work environment, contamination control), physical / HR / facility scope, outside Pryv's software boundary. - 7.4: Purchasing process (controls on suppliers + purchased product), organizational. Pryv may be a purchased component but the manufacturer's purchasing controls are not Pryv-side. - 7.5: Production and service provision (control, cleanliness, installation activities, servicing, particular requirements for sterile devices, labelling, etc.), physical / process scope. - 8.2.6: Monitoring and measurement of product (release activities, identity check, status, records), physical inspection scope. - 8.3: Control of nonconforming product, process scope; Pryv's audit log may document data anomalies but the nonconforming-product control itself is the manufacturer's CAPA process. ## ISO/IEC 27001, Information Security Management Systems, Requirements (ISO 27001) - Scope id: `iso-27001` (standard) - Jurisdiction: International (ISO/IEC) - Version: ISO/IEC 27001:2022 (2022-10-25) - Official text: https://www.iso.org/standard/27001 - Requirements: 74 (7 implemented, 3 configurable, 45 facilitated, 19 out-of-scope) - Browse: https://pryv.github.io/compliance-matrix/#/scope/iso-27001 ### ISO 27001 4: Clause 4 Context of the organization Coverage: out-of-scope · draft Requirement: Organization shall determine external and internal issues relevant to its purpose that affect its ability to achieve the intended outcomes of the ISMS, and shall determine interested parties + requirements + scope. **What Pryv does for you** Clause 4 is the organization's strategic ISMS-scoping exercise. Pryv has no software role at this layer, when an organization adopts Pryv, the matrix supports their Clause-6 risk assessment by enumerating Pryv-side controls explicitly, but Clause 4 itself sits at the operator/implementer level. ### ISO 27001 6.1.2: Clause 6.1.2, Information security risk assessment Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Organization shall define and apply an information security risk assessment process that establishes and maintains criteria for risk acceptance, identifies risks associated with the loss of confidentiality, integrity and availability. **What Pryv does for you** The risk-assessment methodology + the operator's specific findings are the operator's artefact. Pryv contributes the inventory of technical controls (this matrix, particularly Annex A.8 rows below), when the operator identifies a CIA risk, the matrix surfaces which Pryv primitive addresses it (or does not), so Annex A applicability is mechanical rather than judgemental. **Evidence** - qms: qms/pryv/02-procedures/risk-management.md - primitives: access, permissions, audit, encryption-at-rest-secrets, multi-core-mTLS, letsEncrypt-integration, backup-restore ### ISO 27001 A.5.15: A.5.15 Access control Coverage: implemented · effort saved: high · draft Requirement: Rules to control physical and logical access to information and other associated assets shall be established and implemented based on business and information security requirements. **What Pryv does for you** Logical access control is enforced at the API surface by the access + permissions primitives; every read/write request is checked against the access's stream + level permissions. The operator's access-control rule definition (who gets what) is the policy half; technical enforcement is Pryv-side. **Detail** **OAuth2 redirect + scope enforcement.** Pryv's delegated-app authorization path (OAuth2 authorization-code + PKCE, `open-pryv.io/components/oauth2/`, open-pryv.io 2.0.0-rc.8) enforces access rules at two points: presented redirect URIs are validated by exact string match (single loopback-port carve-out per RFC 8252 / 9700; fragment-bearing URIs rejected, `open-pryv.io/components/oauth2/src/clientRegistry.ts`), and the minted app access carries only the user's granted subset of the referenced consent offer's permissions. PKCE (S256) is mandatory for every client. **OAuth2 access rules added in open-pryv.io 2.0.0-rc.64 to 2.0.0-rc.77.** A consent for an operator-registered client never grants account or system streams, `*` or `manage`, and by default forbids creating accesses or webhooks and sharing secrets; the grant's reach follows withdrawal and narrowing at once, the accesses the app's sessions created included `[OE31]`, `[OSUB3]`, `[OACR1]`. An aliased session is accepted under its alias only `[AL13]`. An authorization for an account address is bound to the signed-in account `[OPUE2]`. Token exchange gives a resource server a token no wider than the one it replaces, only for a token issued for one of its audiences `[OTX05]`; the replaced token is refused at the API by default since open-pryv.io 2.0.0-rc.82 (`oauth.audienceBoundSessions: true`; an operator may set `false`) `[OTXE02]`. Detail on `hipaa-security.164.312(a)(1)`. **Delegate-account token class.** Account delegation (`open-pryv.io/components/delegation/`) adds an owner-equivalent delegate token one account holds over another. It is bound by the same per-stream permissions as any token; its access-control property is the non-forgeable, authoritative teardown, a delegate can never remove a delegation, and dissolving one requires a genuine login on the controlled account (a personal token with no forge-protected delegation marker). The `:_delegation:*` namespace is plugin-owned and guarded end to end (no user create/write/delete; internal subtree read-guarded and excluded from wildcard reads); each delegate's actions are audited on the controlled account. See `context/delegation-model.md`. **Plugin-managed and account streams, by every spelling of an id** (open-pryv.io 2.0.0-rc.56). The guards of the delegation namespace, of the plugin-managed regions of the cross-account (CMC) namespace (`:_cmc:`, its inbox and internal streams; `:_cmc:apps` stays open to apps) and of the account fields judge the stream an id resolves to, whatever store-prefixed spelling a request uses, for every token, the owner's included; they also refuse creating a stream under, or moving one into, a plugin-managed parent `[CNRP1]`, `[CNRP6]`, `[CNRP7]`, `[DSC05]`. On access creation and update a permission naming an account field through such a spelling is judged, and stored, as that field, so an app holding only a `*` grant on the regular streams cannot hand one out `[ASA3]`, `[ASA6]`. Before this release a store-prefixed spelling (`:local:`, or the account store's prefix) was not recognised by these guards, so the rule above held only for requests using the canonical ids. **Moving a stream** (open-pryv.io 2.0.0-rc.56). A move (a new `parentId`) by an app or shared access needs manage rights on every stream of the moved subtree, trashed ones included, as deleting it does `[SMV1]`, `[SMV4]`; a parent inside the moved subtree is refused for every access `[SMV10]`. Before it, a child granted to the moving access at a lower level travelled into the target parent's inherited permissions. Apps a delegate authorizes on the controlled account get a scoped `app` access, never the owner-equivalent token; the server marks it as granted through the delegation (no client can forge the mark) and removes it with the delegation `[DCH01]`, `[DCH03]`, `[DCH12]`. In open-pryv.io 2.0.0-rc.23. Since open-pryv.io 2.0.0-rc.30 the rule also covers cross-account (CMC) data grants: a delegate may accept one for the controlled account, the grant carries the same mark (reported by `access-info`) `[DCH15]`, the accept event names the approving delegate, server-stamped `[DCH16]`, and the detach deletes the grant and notifies the requester `[DCH18]`. Since open-pryv.io 2.0.0-rc.31 the account holder, detaching the delegate, may keep named CMC data grants that delegate gave (`keepAccessIds`): a kept grant loses the mark and becomes the holder's own `[DCH21]`, a list naming any other access is refused whole before any change `[DCH23]`, and every other access granted through the delegation is removed as before. Grant paths that still cannot record the mark (OAuth2 consent, publishing a CMC offer, widening a CMC grant) refuse delegation-derived tokens `[DCH17]`, `[OE27]`. **Member accesses of a group account** (open-pryv.io 2.0.0-rc.53, release commit `61fb28dd`, https://github.com/pryv/open-pryv.io/issues/158). For a team sharing one account, the rule Pryv enforces is: a member obtains an access on a patient account only through a membership the group's administrator approved, only for patient relationships under the member's team streams, only for named data streams within the patient's offer (the patient's core re-checks them against the grant and stamps the member on the access), and only for a bounded time (24 h by default, 60 s to 7 d, `cmc.memberAccess.*`, never beyond the membership's expiry) `[GA12]`, `[GA14]`, `[GA15]`, `[MB10]`, `[CMCMA]`; the access cannot manage accesses and is deleted when the membership ends `[GA20]` or the patient withdraws `[GA24]`. See `context/workforce-access-patterns.md`, Pattern 3. **Evidence** - tests: AA01, AA02, ACCP, DCH01, DCH03, DCH12, DCH15, DCH16, DCH17, DCH18, DCH21, DCH23, OE27, CMCGA, CMCMA, GA12, GA14, GA15, GA20, GA24, MB10, CNRP1, CNRP6, CNRP7, DSC05, ASA3, ASA6, SMV1, SMV4, SMV10, OE31, OSUB3, OACR1, AL13, OPUE2, OTX05, OTXE02 - config keys: cmc.memberAccess.defaultTtl, cmc.memberAccess.minTtl, cmc.memberAccess.maxTtl, oauth.audienceBoundSessions - primitives: access, permissions, system-streams, delegation, CMC - context notes: delegation-model, workforce-access-patterns ### ISO 27001 A.5.34: A.5.34 Privacy and protection of personal information Coverage: facilitated · effort saved: high · mode: infrastructure · draft Requirement: Privacy and protection of personally identifiable information shall be identified, documented and implemented in accordance with applicable laws and contractual requirements. **What Pryv does for you** Pryv's primitive set carries privacy-by-design (see GDPR Art. 25) and the technical security controls (see GDPR Art. 32). What's on the operator's side: the identification of which laws apply, the documented privacy commitments (notice texts, consent UX), and the contractual side. Cross-scope link to the gdpr.* rows for the detailed mapping. **Evidence** - derives from: gdpr.Art.25, gdpr.Art.32 - primitives: access, permissions, clientData, audit, system-streams ### ISO 27001 A.6.7: A.6.7 Remote working Coverage: facilitated · effort saved: medium · mode: infrastructure · draft Requirement: Security measures shall be implemented when personnel are working remotely to protect information accessed, processed or stored outside the organization's premises. **What Pryv does for you** Pryv's API is remote- by-design, workforce access from off-premises traverses the same TLS + access-token + MFA controls as any other access. The operator's remote-working policy (devices, VPN, endpoint hardening) sits on top of this; Pryv provides the secure transport + auth substrate. **Evidence** - primitives: letsEncrypt-integration, MFA, access ### ISO 27001 A.8.2: A.8.2 Privileged access rights Coverage: configurable · effort saved: medium · draft Requirement: Allocation and use of privileged access rights shall be restricted and managed. **What Pryv does for you** Pryv's privileged-access surface is small and explicit: the operator's `auth.adminAccessKey` is the root credential; system streams (account, password, mfa) require an explicit grant in `permissions[]`. Both surfaces are auditable. The operator's custody process for the admin key is the policy-side control. **Detail** The account-field guards (the primary email, written only through `account.update`; the non-editable and hidden fields; the level caps on account-stream permissions) judge the canonical stream id whatever store-prefixed spelling a request uses, on `events.create` / `update` / `delete` and on `accesses.create` / `update`, since open-pryv.io 2.0.0-rc.56 `[ASA1]`, `[ASA2]`, `[ASA3]`, `[ASA6]`. Before that release a store-prefixed spelling of an account field was not recognised by these guards: an access holding `contribute` on the email field could change the primary email (the password-reset address) through the events API, and an app holding only a `*` grant on the regular streams could grant an account field to an access it created. Upgrading is the fix; no setting closes it on earlier releases. **Evidence** - tests: LG20, GF33, ASA1, ASA2, ASA3, ASA6 - config keys: auth.adminAccessKey - primitives: access, system-streams ### ISO 27001 A.8.3: A.8.3 Information access restriction Coverage: implemented · effort saved: high · draft Requirement: Access to information and other associated assets shall be restricted in accordance with the established topic-specific policy on access control. **What Pryv does for you** Per-stream permissions are the technical access-restriction primitive. Stream design (which data lives where) is the implementer's choice; permission scoping per access is operationally enforced at every API call. **Detail** A permission on a stream reaches its descendants, so moving a stream changes who reaches its subtree. Since open-pryv.io 2.0.0-rc.56 an app or shared access may move a stream (a new `parentId`) only with manage rights on every stream of the moved subtree, trashed ones included, in addition to manage on the target parent; otherwise `403 forbidden` and nothing moves `[SMV1]` to `[SMV5]`. A parent inside the moved subtree is refused for every access `[SMV10]`. Before that release a child granted to the moving access at a lower level (`read`, `create-only`, `none`) moved along and took on the permissions other accesses held on the target parent. Renames and updates that keep the current `parentId` are unchanged. **Evidence** - tests: AA01, AA02, ACCP, SMV1, SMV2, SMV3, SMV4, SMV5, SMV10 - primitives: access, permissions, stream ### ISO 27001 A.8.5: A.8.5 Secure authentication Coverage: implemented · effort saved: high · draft Requirement: Secure authentication technologies and procedures shall be implemented based on information access restrictions and the topic-specific policy on access control. **What Pryv does for you** Token-based auth by default; multi-factor via `mfa.*` API methods, live by default since open-pryv.io 2.0.0-rc.14 (`services.mfa.active`; TOTP built in, SMS providers pluggable) `[MA15A]`, `[MA15C]`. The MFA acceptance series (`[MFAA]`) exercises activate `[MA3A]`, `[MA10A]`, confirm `[MA4A]`, challenge `[MA5B]`, verify `[MA5A]`, `[MA11A]`, deactivate `[MA6A]` and recover `[MA7A]`. Authentication strength tier is the operator's policy choice; technical primitives are shipped. **Detail** **Failed second factors are throttled by Pryv (open-pryv.io 2.0.0-rc.27).** A per-account backoff, never a lockout (open-pryv.io `6231a37c`, `aa445c43`): after `services.mfa.attempts.backoff.freeFailures` failures (default 3) within `perAccountWindowSeconds` (default 900 s), each further failure delays the next attempt, doubling from `baseSeconds` (2 s) up to `maxSeconds` (300 s); `mfa.verify` / `mfa.confirm` / `mfa.challenge` answer 429 `too-many-attempts` with `Retry-After` meanwhile, and a code sent during the delay is not checked. A password holder cannot lock the real user out, and a success clears the tally. The `attempts` block is platform-wide policy (same values on every core); `backoff.maxSeconds: 0` disables it. **Failed passwords are delayed too (open-pryv.io 2.0.0-rc.47).** Sign-in, `account.changePassword`, the MFA step-up by password and `mfa.recover` share a per-account tally (`auth.passwordAttempts`: after 5 failures within 900 s, delays from 2 s doubling up to 300 s, 429 with `Retry-After`, never a lockout) `[CEPB1]`, plus a budget per client address counted across all cores (`auth.passwordAttempts.perIp`, 30 failures per 900 s) `[CEPI1]`; these methods answer `400` inside a batch call or over socket.io `[CEDB1]`. Each password hash gets its own salt (bcrypt, cost 10) `[PWSL1]`. SMS second factors carry send budgets per session, per user, per destination across the platform and, since 2.0.0-rc.50, per core (`services.mfa.methods.sms.sendLimits`, against toll fraud) `[MSSL1]`, `[MSSL11]`, and an account holds at most `services.mfa.sessions.maxPendingPerUser` pending MFA logins `[MCPU1]`; since 2.0.0-rc.51 a login refused after its MFA session opened ends that session, so a failed login no longer holds one of those places until it expires `[MLSX1]`. **Password checks under load (open-pryv.io 2.0.0-rc.87).** Password checks run at most `auth.passwordCheckConcurrency` at a time per API worker (default 2), `auth.passwordCheckQueue` waiting (default 50, at most 10 s). A check refused past that is not performed: sign-in, password change and reset, `mfa.recover`, the MFA step-up and registration answer `429 too-many-requests` with `Retry-After`, never `invalid-credentials`, and the refusal neither counts on the account's failed-password tally nor delays the account `[PCLM1]`, `[PCLM2]`; a refused registration leaves the name and email free to retry `[PCLM3]`. OAuth client-secret checks answer `503 temporarily_unavailable`, never `invalid_client` `[OPCL2]`. **Single-use codes and safe configuration.** A TOTP code is consumed with a storage compare-and-set (open-pryv.io `43293101`, `6231a37c`), so concurrent verifies of one code release exactly one token; the per-session attempt ceiling counts parallel attempts (`1d91696c`); and impossible `services.mfa` settings refuse the boot (`214b0b2b`). The private profile shows the MFA enrolment without its secrets and refuses writes to it (`25239783`, `7ce9ea6f`); recovery codes are stored hashed (`ef66853e`). Tests `[MA12A]`-`[MA12K]`, `[MBKF1]`-`[MBKF3]`, `[PCS1]`, `[MCHK1]`. Since 2.0.0-rc.51 two concurrent activations that both fail at the provider keep the enrolment that was pending before them `[MACC2]`. **Evidence** - tests: MFAA, MA15A, MA15C, MA3A, MA4A, MA5A, MA5B, MA6A, MA7A, MA10A, MA11A, MA12A, MBKF1, PCS1, MCHK1, CEPB1, CEPI1, CEDB1, PWSL1, MSSL1, MSSL11, MCPU1, MLSX1, MACC2, PCLM1, PCLM2, PCLM3, OPCL2 - config keys: services.mfa.mode, services.mfa.attempts.backoff, auth.passwordAttempts, auth.passwordAttempts.perIp, services.mfa.methods.sms.sendLimits, services.mfa.sessions.maxPendingPerUser, auth.passwordCheckConcurrency, auth.passwordCheckQueue - primitives: access, MFA, system-streams **Planned changes** - enhancement: Reference TOTP / WebAuthn plugins + AAL-tier mapping doc strengthen the A.8.5 evidence chain ### ISO 27001 A.8.10: A.8.10 Information deletion Coverage: configurable · effort saved: medium · draft Requirement: Information stored in information systems, devices or in any other storage media shall be deleted when no longer required. **What Pryv does for you** Per-user erasure: `system.users.delete` removes the user's data from the live store. Engine-dependent backup behaviour (SQLite per-user file vs PG row deletion + backup rotation) determines whether erasure extends to backups, same notes as GDPR Art. 17 + HIPAA-Security §164.310(d) media-controls. Event- level and stream-level deletion live alongside for per-record deletion needs. Since open-pryv.io 2.0.0-rc.47 the deletion also erases the high-frequency series kept under the account's former usernames and aliases (earlier releases could leave them), and since 2.0.0-rc.50 points written during the deletion do not survive it; see GDPR Art.17 for the full list. **Detail** Account auto-deletion, since open-pryv.io 2.0.0-rc.66 (`8521c8d5`, see gdpr.Art.5 §1(e) and gdpr.Art.17). Deleting a whole account "when no longer required" is schedulable: by the account holder (a date, or a period without use) or by your inactivity preset, with reminder mails (`[ACXP3]`) and a minimum notice (`[ACXP8]`) before, through the same erasure as `system.users.delete`, guards included (`[ADSW8]`); an erasure interrupted halfway is completed at a later pass (`[ADSW19]`). Unfinished registrations (the release after open-pryv.io 2.0.0-rc.87; merged, unreleased at this walk). Rows a failed or interrupted registration left behind are no longer required by any account: a failed registration's compensation now removes its account fields on PostgreSQL too `[URB2]`, and `bin/reconcile-user-cores.js --registrations` lists, per core, account fields under an id the users index lacks and indexed accounts with no password, and deletes only with `--apply` (orphan ids holding account fields alone, older than the grace; a named account through the account deletion's erasure) `[RCRG1]`, `[RCRG3]`; the default username pass releases the email a stale name held on the platform `[RCRG6]`. See gdpr.Art.5 §1(e) for the safeguards. **Evidence** - tests: USAD, DLN1, DLN4, DLLW1, ACXP3, ACXP8, ADSW8, ADSW19, URB2, RCRG1, RCRG3, RCRG6 - docs: customer-resources/account-auto-deletion.md - config keys: storages.userAccountStorage.engine, user-account.delete, account.autoDeletion.inactivity.defaultDays - primitives: event, stream, backup-restore, account-auto-deletion ### ISO 27001 A.8.13: A.8.13 Information backup Coverage: facilitated · effort saved: medium · mode: infrastructure · draft Requirement: Backup copies of information, software and systems shall be maintained and regularly tested in accordance with the agreed topic-specific policy on backup. **What Pryv does for you** `bin/backup.js` produces per-user backup files, the only copy of user data Pryv makes; a multi-core cluster replicates the platform DB only (rqlite Raft + mTLS), not user data, which stays on each user's home core. The operator's backup policy (cadence, retention, offsite) is layered on top. "Regularly tested" is the operator's drill. On the Pryv side, backup and restore round trips are tested: `[BKSR]` (series data), `[BKEV]` (events store), `[BKVR]` (manifest version), and `just test-backup-roundtrip` in open-pryv.io backs a seeded user up and restores it PostgreSQL to SQLite and back, comparing the bundles on counts and content (2.0.0-rc.34). **Take a new backup after upgrading to open-pryv.io 2.0.0-rc.34 or later.** Earlier `bin/backup.js` backups carry no high-frequency series data on any series engine, with no warning, and series backed up from InfluxDB could not be restored. Since 2.0.0-rc.34 the series are exported and restored and move between any two series engines. **Check every directory that received `bin/backup.js --incremental` before open-pryv.io 2.0.0-rc.51.** Such a run overwrote the full backup it continued; the directory holds only the last delta and cannot be repaired. `--inspect ` reports it `DAMAGED` and `--restore` refuses it `[BKIC2]`, `[BKC6]`: take a new full backup into a new directory. Since 2.0.0-rc.51 the incrementals form a chain next to the full backup (detail below). **From open-pryv.io 2.0.0-rc.86, write three points into your backup policy.** A backup written by 2.0.0-rc.86 or later restores with that release or later; after going back to an earlier release, start a new chain in a new directory `[BKSM6]`. Keep each backup directory for the backup only (a file the backup did not write is refused at restore) `[BKSM7]`, `[BKSM8]`. Sign the runs of a recipient-key backup (`--signing-key` / `--signing-pubkey`), starting with a new full backup into a new directory. **Detail** **Backup encryption is built in, opt-in** (open-pryv.io 2.0.0-rc.5 onward). Without flags `bin/backup.js` writes plaintext (gzip-compressed) files. `--recipient-pubkey ` (recommended: the per-backup data key is RSA-OAEP-wrapped to your public key, so the backup host cannot decrypt its own output) or `--encrypt-passphrase` / `PRYV_BACKUP_PASSPHRASE` (scrypt) encrypts every file with per-file authenticated AES-256-GCM before it reaches the destination, and the backup ships a standalone `decrypt-backup.mjs` plus `RESTORE-README.md` for recovery without Pryv. A.8.13's "protected at the same security level as the source data" expectation is met by enabling one of the two key models, or by your own layer (LUKS / S3 SSE-KMS / ...) on a plaintext backup; record the choice and the key custody (a lost key or passphrase makes the backup unrecoverable) in your backup-policy SOP. **Since open-pryv.io 2.0.0-rc.47 to 2.0.0-rc.50**: a plaintext backup is announced on stderr `[BKPW1]`; `--passphrase-file` keeps the passphrase out of the process list `[BKPF1]`; backups are written owner-only (`0700` / `0600`); a restore refuses an unexpectedly plaintext backup `[BKRE1]` (`--require-encrypted` makes that the rule `[BKRE4]`), unsafe names and symbolic links `[BKRS1]`, `[BKRS4]`, reserved names `[BKRN1]` and a username another account now holds `[RSOW1]`. Recipient-key encryption gives confidentiality, not authenticity: protect write access to the backup destination (and, from 2.0.0-rc.86, sign the runs, below). See `context/operator-backup-coverage.md`. **Incremental chain (open-pryv.io 2.0.0-rc.51).** Each `--incremental` run writes its own `incrementals//` directory, listed in `chain.json`, and rewrites no earlier file `[BKC1]`; a restore applies the full backup then each run in order, deletions included `[BKC2]`, `[BKIC1]`, and `--through-run ` restores as of a given run `[BKC7]`. Runs no longer miss changes made while the previous run was in progress `[BKC3]` and carry the deletion of streams, accesses and webhooks `[BKC4]`. Each run of an encrypted backup has its own envelope and key under the chain's key model, plus its own decrypt script `[BKC5]`, `[BKCS1]`. Overlapping runs into one directory keep the first and set the second aside `[BKCC1]`. A whole-core run records the accounts it covers, so a restore does not re-create an account deleted between runs `[BKCU1]`, `[BKIC4]`. The A.8.13 "regularly tested" drill should include a chain restore and `--inspect` of the chain you rely on. Up to 2.0.0-rc.85 the chain index and run manifests are checked for consistency, not signed. **Authenticated files and signed runs (open-pryv.io 2.0.0-rc.86).** Each run's manifest lists every file with its size and SHA-256 hash and is bound to its run; a restore refuses a file added, removed, resized or changed and a `chain.json` entry that disagrees with the run's manifest `[BKSM1]`, `[BKSM2]`, `[BKSM3]`. Encrypted files end with a marked final block, each block tied to its file, position and run, so truncation at a block boundary, an emptied file or a file swapped between accounts is refused; an account's files are checked before anything of it is written. Optional Ed25519 run signatures (`--signing-key` at backup, `--signing-pubkey` at restore and `--inspect`) close the recipient-key bound above: given the public key, every run must be signed by it `[BKSM4]`, `[BKIS1]`; an unsigned recipient-key backup prints a warning `[BKSM5]`, `[BKIS2]`. For the "regularly tested" element, `--inspect --verify-files` (with the backup's secret) reads and checks every file without restoring `[BKIS3]`. New passphrase backups use scrypt N = 2^17. Runs written by earlier releases restore as before, reported as "file list not verified"; a plaintext run's file table detects corruption, not tampering. An account erased during a full backup is left out of the run `[BKDU1]`, and an account whose restore fails while its data is written is cleared and removed from the core's index instead of being left half-restored `[RSFC1]`, `[RSFC3]`. Operator page: `customer-resources/backup` on the developer site. **External ids (open-pryv.io 2.0.0-rc.58).** The platform backup carries the external-id namespace rows with their salts; a restore keeps a live namespace whose salt differs and reports it `[XIDB1]`. The index rows are rebuilt by `bin/reconcile-user-cores.js --ext-ids` on each core. The accounts' own links (the core's local external-id table) are not in the per-user backup in 2.0.0-rc.58 and 2.0.0-rc.59: include that table in your database-level backup of each core and in the restore drill. See `context/operator-backup-coverage.md`. From 2.0.0-rc.60 the per-user backup carries each account's ids (`users//external-ids.jsonl[.gz]`: namespace, blinded value, claim date), also in incremental chains; a restore links them again after the platform rows, an id another account holds by then stays with it and is counted `lost`, an id of an unknown namespace is `skipped` `[XIDB2]`, `[XIDB3]`, `[XIDB4]`, `[XIDBK1]`, `[XIDBK2]`. A blinded value can claim its id, so a per-user backup becomes as sensitive as a claim credential: encrypt it (see above). An account rolled back by `--verify-integrity` keeps its restored ids; release them with the admin release if the account is to be dropped. **Account aliases (open-pryv.io `4547b32a`, 2.0.0-rc.66).** Earlier backups did not carry an account's aliases (access aliases, former usernames): after a restore its aliased accesses and endpoints under a former username did not route and a former username could be registered by someone else. From that release the per-user manifest lists them (`aliases`) and the restore reserves them again; an alias another account or core holds by then stays with it and is reported `[BKAL1]`. Series still held under a former username are exported and restored under the username `[BKAL3]`. Take a new backup after upgrading. **Evidence** - tests: BKSR, BKEV, BKVR, BKPW1, BKPF1, BKRE1, BKRE4, BKRS1, BKRS4, BKRN1, RSOW1, BKC1, BKC2, BKC3, BKC4, BKC5, BKC6, BKC7, BKCC1, BKCS1, BKCU1, BKIC1, BKIC2, BKIC4, XIDB1, XIDB2, XIDB3, XIDB4, XIDBK1, XIDBK2, BKAL1, BKAL3, BKSM1, BKSM2, BKSM3, BKSM4, BKSM5, BKSM6, BKSM7, BKSM8, BKIS1, BKIS2, BKIS3, BKDU1, RSFC1, RSFC3 - docs: customer-resources/backup.md - primitives: backup-restore, backup-payload-encryption, multi-core-mTLS, external-id-index - context notes: operator-backup-coverage ### ISO 27001 A.8.15: A.8.15 Logging Coverage: implemented · effort saved: high · draft Requirement: Logs that record activities, exceptions, faults and other relevant events shall be produced, stored, protected and analysed. **What Pryv does for you** Per-user audit log captures every API method invocation; access reference (accessId + accessSerial) ties each row to the authenticated identity. Since open-pryv.io `07b6d3b6` this includes the OAuth2 authorization server's own activity (`oauth.*` events: consent lifecycle, code exchange incl. replay attempts, token issued / refreshed / revoked / reuse-detected), authorization decisions are logged alongside the data accesses they enable. Audit storage uses SQLite directly to decouple log integrity from data-path engine issues. The "analysed" element (review cadence, alerting thresholds) is the operator's procedure. **Detail** **OAuth2 events added in open-pryv.io 2.0.0-rc.66 to 2.0.0-rc.77**: `oauth.nonce.reused`, `oauth.token.exchanged` (subject's trail), `oauth.consent.refused` reasons including `audience-account-mismatch` and `issuer-account-mismatch`; `oauth.token.introspected`, `oauth.token.exchange_refused`, `oauth.client.metadata_fetched` / `metadata_refused` (syslog, no user resolved; never a token or a document body) `[OXN02]`, `[OXI06]`, `[OTX03]`, `[OCMDE13]`, `[OPIU3]`. Adapter-route requests are not audited by the core. Since rc.77 a streamed answer the client stopped reading is logged as an error (`client-closed-request`), not a success `[AUAB3]`. From the release after rc.87, calls running at the same time on one socket.io connection are each audited under their own method; before, two such calls could swap their method id in the audit row and the access usage counts `[SKMC]`. Full list on `hipaa-security.164.312(b)`. **Analysis by the account owner (open-pryv.io 2.0.0-rc.84).** The owner's `accesses.get` reports, per access, approximate lifetime call counts by method (`usage`; never returned to an app or shared caller) `[AUG1]`, `[AUG3]`, and the reference account app (app-web-user-account 0.34.0) adds a linkable, filterable Audit trail tab over the account's audit log. Since rc.86 the owner can also have that log counted per hour, day or week over a period (`audit.getSummary`, refused to app and shared callers) `[ASM1]`, `[ASM4]`. This helps your users review their own activity; the operator-side analysis (review cadence, alerting) stays yours. Detail on `hipaa-security.164.312(b)`. "Stored, protected" caveat, the audit log is append-only by convention in the write path, but there is **no software-side tamper-resistance signal** (no hash chain, no per-row signature, no operator-signed checkpoint). Protection of the log rests on the operator's filesystem hardening: immutable mounts, append-only flags (`chattr +a`), file-integrity monitoring (AIDE / Tripwire), out-of-band SIEM forwarding to a WORM store. Future direction: chained / signed audit log (per-row prev_hash + periodic operator-signed checkpoints). Tracked under internal backlog slug `AUDIT-LOG-CHAINING` and `proposals/audit-log-chaining.md`. When shipped this row's coverage stays Implemented but the cited primitives will include `audit-chain`. Separate audit property worth flagging to the A.8.15 auditor: Pryv's audit log is data-minimal by construction, it captures action + source + URL query + access ref + integrity hash, but **never the request body**. The log itself therefore qualifies as well-scoped under the "logs that record activities" framing without storing the data being acted on. Caller-supplied search values (`events.get` content-query conditions on the GET path) do appear in the recorded URL query, see `context/content-query-audit-semantics.md`. See `docs/pryv-primitives.md` audit entry for the full capture catalogue. **Server logs are protected from carrying credentials (open-pryv.io 2.0.0-rc.43 to 2.0.0-rc.50).** The operational logs (`logs.file`, `logs.fileSync`, console, `DEBUG=pryv:*`) are separate from the audit log, and they are what a log shipper or a support engineer reads. Credential values are masked wherever they are logged, including inside a logged `Error` (message, stack, cause) and the debug output; the masked names cover access and refresh tokens, passphrases, the admin key and the platform secrets; URL user info, access-request keys, `readToken`, `key` / `poll` and authorization-code `code` / `state` values are hidden; a parameter validation error is logged without the rejected value; the request trace prints no Basic-auth user name `[BLGM1]`, `[BLGM2]`, `[BLGM3]`, `[BLGM4]`, `[RDL5]`, `[RDL8]`, `[RDLA]`, `[RAL1]`. A server-side fault is answered to the client as `Unexpected error (ref <8 hex>)`, its detail logged under the same reference `[UNXR1]`. The boot log identifies the admin key by a keyed fingerprint, not a hash a log reader could test candidate keys against `[PLFP1]`. Log files are created `0640`, and the log directories the core creates `0750` (2.0.0-rc.50; existing files and directories keep their modes) `[BLFM1]`. Check the retention of logs written by releases before 2.0.0-rc.43, which may hold credential values; log shipping, retention and access to the log host stay yours. **External ids** (`external-id-index` primitive): an administrator's release of an id claimed by the wrong account (from 2.0.0-rc.60) is logged on the admin side without a user (syslog) and, when audit is active, in the trail of the account that held it (`account.externalIds.adminRelease`: namespace and reason) `[XIDAR1]`, so the subject's own history shows the operator's act. The blinded value reaches no audit row and no server log `[XIDG1]`. The credential-free lookup and the core-to-core holder answer of forced-mode sign-ins (`system.extIdHolds`, 2.0.0-rc.59) are not audited. **Long-running deployment tiering**: for the "logs … stored, protected, analysed" portion of A.8.15 at multi-year scales, the audit log is exposed via the `@pryv/datastore` abstraction. Operators write a custom `auditStorage` engine plugin to tier hot recent rows + cold archived rows (e.g., S3 Object Lock, Glacier) behind the same `audit.getLogs` API. No Pryv-shipped pruning primitive, pressure to prune is operational, not regulatory (HIPAA-style retention floors apply; there's no max-retention rule pushing destruction). Full pattern at `context/audit-archival-via-custom-datastore.md`. **Evidence** - tests: AT01, AT02, AT03, AT51, AT52, AT53, AT61, AT65, OE07, BLGM1, BLGM2, BLGM3, BLGM4, RDL5, RDL8, RDLA, RAL1, UNXR1, PLFP1, BLFM1, XIDAR1, XIDG1, OXN02, OXI06, OTX03, OCMDE13, OPIU3, AUAB3, AUG1, AUG3, ASM1, ASM4, SKMC - config keys: logs.file, logs.fileSync - primitives: audit, audit-event-stream, external-id-index - context notes: content-query-audit-semantics, audit-archival-via-custom-datastore **Planned changes** - feature: Chained / signed audit log adds the software-side tamper-resistance signal A.8.15 expects ### ISO 27001 A.8.16: A.8.16 Monitoring activities Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Networks, systems and applications shall be monitored for anomalous behaviour and appropriate actions taken to evaluate potential information security incidents. **What Pryv does for you** The opt-in observability emitter (per-method metrics + error reports over OTLP) gives system-level monitoring; audit logs give application-level activity. Operator chooses backend + thresholds + escalation paths. Anomaly-detection logic on the audit stream itself is a potential extension. **Evidence** - primitives: observability-provider, audit ### ISO 27001 A.8.20: A.8.20 Networks security Coverage: configurable · effort saved: medium · draft Requirement: Networks and network devices shall be secured, managed and controlled to protect information in systems and applications. **What Pryv does for you** TLS in transit once configured: either the core terminates it (`http.ssl.*`, with the built-in ACME integration issuing, renewing and replicating certificates across the cluster when `letsEncrypt.enabled` is set) or your reverse proxy does and the core serves plain HTTP behind it (default `http.ip` 127.0.0.1). Between cores, Raft runs over mutual TLS on a private cluster CA once `bin/bootstrap.js` has written `storages.engines.rqlite.tls` (default `tls: null`, plain TCP). The core sets no TLS version of its own: Node.js defaults apply (TLS 1.2 floor on the Node 24 the image runs). Operator-side network controls (firewalls, network segmentation) sit on top. **Detail** When a proxy in front of the core terminates TLS, set `hostedSites..hsts: always` on each HTTPS-only site the core hosts so its answers carry `Strict-Transport-Security` (open-pryv.io 2.0.0-rc.34). The default, `auto`, sends the header only when the core itself terminates TLS; `never` turns it off. The core does not add HSTS to API answers on a separate API host, so set it on your proxy there. Outbound side (open-pryv.io 2.0.0-rc.56): the calls Pryv makes to URLs a counterparty supplies (cross-account consent deliveries, chat, revocations, scope updates, delegation and OAuth revocation notices) cannot be turned toward your internal network. A host that is or resolves to a loopback, private, link-local or otherwise reserved address is refused before any connection, and checked again at connect time `[PFR1]`, `[PFR2]`, `[CO22]`; plain `http:` is refused unless `cluster.allowInsecurePeerUrl` (development and test clusters) `[PFR4]`. The platform's own host names are always allowed; list peers on a private network, and a private `core.url` given as an IP, in `cmc.allowedPrivateHosts` (host names, IPs or CIDR ranges, the grammar of `webhooks.allowedPrivateHosts`; checked at boot) `[PFR3]`. Webhook deliveries apply the same address rules. Egress filtering on your network stays yours. **Evidence** - tests: ACMEINT, ACMEORCH, CERTUTILS, FORCERENEWIPC, BUNDLEENC, HSHT, PFR1, PFR2, PFR3, PFR4, CO22 - config keys: http.ssl.keyFile, http.ssl.certFile, letsEncrypt.enabled, storages.engines.rqlite.tls, hostedSites..hsts, cmc.allowedPrivateHosts, cluster.allowInsecurePeerUrl - primitives: letsEncrypt-integration, multi-core-mTLS ### ISO 27001 A.8.24: A.8.24 Use of cryptography Coverage: implemented · effort saved: high · draft Requirement: Rules for the effective use of cryptography, including cryptographic key management, shall be defined and implemented. **What Pryv does for you** TLS for transit (in the core when `http.ssl.*` / `letsEncrypt.*` is configured, otherwise in your proxy; the core sets no TLS version of its own, so Node.js defaults apply, a TLS 1.2 floor on Node 24), AES-256-GCM for at-rest operator secrets (HKDF-derived per-key with purpose labels), AES-256-GCM (scrypt-derived) for bootstrap bundle encryption, per-file AES-256-GCM for `bin/backup.js` output when encryption is requested, and, from open-pryv.io 2.0.0-rc.86, optional Ed25519 signatures of backup runs. The operator's cryptography policy (key custody, rotation cadence, algorithm choice for engine-side at-rest encryption) is layered on top. **Detail** **Changes in open-pryv.io 2.0.0-rc.86.** Backups: encrypted files carry authenticated data naming their file, run and chain, with a marked final block; each run's manifest lists every file's SHA-256 hash; `--signing-key` (Ed25519) signs each run and `--signing-pubkey` makes the signature mandatory at restore `[BKSM4]`; new passphrase backups derive their key with scrypt N = 2^17. Add the signing key pair to your key inventory: the private key stays on the backup host, the public key with the restore secret. Bootstrap bundles: the version, salt and nonce are authenticated, with a pinned 16-byte tag `[BNEV1]`. Keys stored encrypted at rest (TLS and ACME keys, authenticator secrets, observability credentials, transfer identities): a second envelope version, bound to the row that holds it and with a pinned tag, is read from this release `[AREV1]`, `[AREV2]`; 2.0.0-rc.86 and rc.87 still write rows in the first version (no binding) so that a core of the previous release can read them. The release after open-pryv.io 2.0.0-rc.87 writes version 2 `[AREV3]`: every core must have run 2.0.0-rc.86 or later before it is deployed, and going back to a release before 2.0.0-rc.86 is not possible without restoring the rows. The configured `letsEncrypt.atRestKey` is unchanged. **Evidence** - tests: ACMEINT, ATRENC, BUNDLEENC, AREV1, AREV2, AREV3, BNEV1, BKSM4 - config keys: letsEncrypt.atRestKey - primitives: letsEncrypt-integration, encryption-at-rest-secrets, multi-core-mTLS, backup-payload-encryption **Planned changes** - feature: End-to-end encryption adds a customer-key flow (CMEK / BYOK) to the cryptography catalogue ### ISO 27001 A.8.25: A.8.25 Secure development lifecycle Coverage: facilitated · effort saved: low · mode: awareness · draft Requirement: Rules for the secure development of software and systems shall be established and applied. **What Pryv does for you** Pryv's own SDLC is visible (public commit history, tagged releases, CHANGELOG-v2 + CHANGELOG-v2-back, multi-engine test matrix, dependency audit). For the implementer, this transparency feeds supplier- assessment artefacts. The implementer's own SDLC for their app + integrations remains their ISMS artefact. **Evidence** - qms: qms/pryv/01-policies/software-development-lifecycle-policy.md - primitives: audit ### ISO 27001 A.8.32: A.8.32 Change management Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Changes to information processing facilities and information systems shall be subject to change-management procedures. **What Pryv does for you** Pryv-side change-management evidence: tagged releases, Docker image SHA-pinning, CHANGELOG-v2 + CHANGELOG-v2-back per release, release-notes per Dokku deploy. The operator's change-management procedure (approvals, deployment windows, rollback plans) sits on top. The audit log gives the operational record of changes that touched data. **Evidence** - qms: qms/pryv/02-procedures/change-control.md - primitives: audit ### ISO 27001 A.8.34: A.8.34 Protection of information systems during audit testing Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Audit tests and other assurance activities involving assessment of operational systems shall be planned and agreed between the tester and appropriate management. **What Pryv does for you** Pen-tests, vulnerability scans, internal audits, all may generate elevated activity on the system. Pryv's audit log keeps the testing activity attributable (any test access surfaces with its accessId + accessSerial in the audit rows). The plan + agreement element is the operator's procedure. **Evidence** - primitives: audit ### ISO 27001 A.5.10: A.5.10 Acceptable use of information and other associated assets Coverage: out-of-scope · draft Requirement: Rules for the acceptable use and procedures for handling information + associated assets shall be identified, documented and implemented. **What Pryv does for you** Acceptable-use policies are operator-side editorial artefacts (workforce code-of-conduct, asset handling rules). Pryv has no software role at the policy-content layer; the audit log supports after-the-fact enforcement evidence but doesn't author the rules. ### ISO 27001 A.5.12: A.5.12 Classification of information Coverage: facilitated · effort saved: medium · mode: primitive · draft Requirement: Information shall be classified according to the information security needs of the organization based on confidentiality, integrity, availability + relevant interested party requirements. **What Pryv does for you** Pryv supports classification by stream layout, dedicate subtrees per classification tier (e.g., `confidential/`, `restricted/`, `public/`) and gate them with distinct permission scopes. System streams add a privileged-data tier independent of the operator's classification scheme. The operator's classification scheme itself (tier labels, criteria, owner) is the policy artefact. **Evidence** - primitives: stream, system-streams, event, data-types ### ISO 27001 A.5.13: A.5.13 Labelling of information Coverage: facilitated · effort saved: medium · mode: storage · draft Requirement: An appropriate set of procedures for information labelling shall be developed and implemented in accordance with the information classification scheme adopted by the organization. **What Pryv does for you** Labels on event-level data can ride on `event.clientData.classification` or on the parent stream's `clientData`; the canonical event-type schema (`data-types`) can be extended with a classification property when machine-readable labelling is needed downstream. Stream- level labels propagate to descendants by Pryv semantics. **Evidence** - primitives: event, clientData, stream ### ISO 27001 A.5.23: A.5.23 Information security for use of cloud services Coverage: facilitated · effort saved: low · mode: infrastructure · draft Requirement: Processes for acquisition, use, management and exit from cloud services shall be established in accordance with the organization's information security requirements. **What Pryv does for you** When the Pryv operator runs on a cloud provider (rather than on-premise), the cloud- service security posture is the operator's contractual concern. Pryv-side hooks that the operator's CSP-management process should use: data-residency configuration locks subjects to chosen regions; bootstrap bundle export gives a clean cloud- exit path (re-issue the cluster onto new infrastructure); operator-side at-rest encryption isolates the cloud provider from plaintext. The per-release CycloneDX SBOM and cosign-signed image from the open-pryv.io supply-chain pipeline travel with the workload, so a provider exit hands the next environment a machine-readable composition manifest plus a verifiable image signature. **Evidence** - primitives: data-residency, encryption-at-rest-secrets, backup-restore ### ISO 27001 A.6.3: A.6.3 Information security awareness, education and training Coverage: out-of-scope · draft Requirement: Personnel and relevant interested parties shall receive appropriate information security awareness, education and training and regular updates of the organization's information security policy + procedures. **What Pryv does for you** Training is an organizational programme. No software role at the training-content / training-delivery layer; the audit log lets you measure whether trained workforce actually applies trained patterns (a defensible "training effectiveness" artefact for the ISMS). ### ISO 27001 A.8.7: A.8.7 Protection against malware Coverage: facilitated · effort saved: low · mode: infrastructure · draft Requirement: Protection against malware shall be implemented and supported by appropriate user awareness. **What Pryv does for you** Anti-malware is mostly a host / endpoint / network-layer control: Pryv-the-software doesn't include AV or endpoint protection, and your hosting environment carries that part (HDS Activity 1+2 certified hosters typically inherit it from the CSP). Pryv does store and serve files your users upload, and contributes one narrow control there: since open-pryv.io 2.0.0-rc.34 an attachment whose declared type a browser executes or renders as a document (HTML, SVG and other XML, JavaScript) is served with `Content-Security-Policy: sandbox; default-src 'none'` next to `Content-Disposition: attachment`, so it cannot run script on the API origin. **Detail** What stays yours: Pryv does not scan attachment content and does not refuse uploads by type, so a malicious PDF or executable is stored and served as uploaded. If your users exchange files, scan them (at upload in your app, or at your proxy) and cover the user-awareness half of the control in your ISMS. Code: `open-pryv.io/components/api-server/src/middleware/attachment-access.ts`. **Evidence** - tests: ACTY ### ISO 27001 A.8.8: A.8.8 Management of technical vulnerabilities Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Information about technical vulnerabilities of information systems in use shall be obtained, the organization's exposure to such vulnerabilities shall be evaluated, and appropriate measures taken. **What Pryv does for you** Pryv-side vulnerability management is upstream, public dependency-audit (npm audit pipeline, dependabot on open-pryv.io master), versioned CHANGELOG announcing relevant fixes, reproducible Docker image SHA. The operator's vulnerability-management cadence (when to upgrade, how to verify) sits on top. Observability data feeds incident-correlated vulnerability hunting. **Detail** **Vulnerabilities found in Pryv's own code.** Beyond dependency advisories, the open-pryv.io maintainers ran a code-level security review of the source in 2026 (2026-06 to 2026-10): findings were confirmed by a second review, classified by severity and fixed with regression tests, critical and high ones first. The fixes shipped in open-pryv.io 2.0.0-rc.40 to 2.0.0-rc.51; most of those release notes open with "upgrade promptly" and name the operator steps (a configuration check before restarting, a one-off repair tool). The public report, `SECURITY-AUDIT.md` (https://github.com/pryv/open-pryv.io/blob/master/SECURITY-AUDIT.md, published 2026-10-14), lists each finding with its severity, the release that fixed it and the operator action, plus the known residual risks; it is revised with every release that carries a security fix. See `context/code-security-review-2026.md`. Your part of A.8.8: watch the release notes and `SECURITY.md` advisories, assess your exposure (which release you run, which features you enabled), and upgrade on your own schedule, running each release's operator steps. Image hygiene moved in the same releases: the image installs the Debian security updates available at build time and no longer ships `curl` (2.0.0-rc.42) nor `npm` / `npx` (2.0.0-rc.50), which removes the scan findings those tools carried; OS-level findings of the pinned base image remain visible to the scanners. **Evidence** - primitives: observability-provider, audit - context notes: code-security-review-2026 ### ISO 27001 A.8.9: A.8.9 Configuration management Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Configurations, including security configurations, of hardware, software, services and networks shall be established, documented, implemented, monitored and reviewed. **What Pryv does for you** Pryv configuration lives in `default-config.yml` + `override-config.yml` + `host-config.yml` (operator-side); a `config-validation` step on master start fails fast on unresolved variables or missing required service fields, giving a baseline "configuration is well-formed" check. The operator's config-change procedure (versioning, approval, deployment) sits on top. Audit log shows when config-driven behaviour changed observably. **Evidence** - primitives: audit **Planned changes** - feature: Read-only effective-configuration endpoint supplies per-core configuration-management evidence without host access ### ISO 27001 A.8.11: A.8.11 Data masking Coverage: facilitated · effort saved: medium · mode: primitive · draft Requirement: Data masking shall be used in accordance with the organization's topic-specific policy on access control + other related topic- specific policies, and business requirements, taking applicable legislation into consideration. **What Pryv does for you** Pryv enforces masking by **projection**, not transformation: stream-level isolation + permission-scoped access tokens hide whole sub-trees from a given role. The "rewrite a value before display" flavour of masking (e.g., `j***@example.com`) lives in the calling application, by design. **Detail** The boundary is recorded in `context/data-masking-projection-vs-transformation.md`: - Stream-tree split + narrow access tokens = Pryv's projection-side contribution. Auditor-visible via the access permissions matrix. - Field-substring rewrites, hash-on-read, faker substitution, per-role redaction = application layer. Not Pryv's job by design (storage layer stays deterministic; "partially redacted" is not an API response). - Username-side pseudonymisation is the one transformation Pryv does natively: `accesses.create {randomAlias:true}` mints a routable `r-XXXXXXXX` alias that hides the username per access (`proposals/aliases-as-pseudonymization-primitive.md`); it survives a backup and restore and routes on every topology since open-pryv.io `4547b32a`. It masks the username from the holder, and since open-pryv.io 2.0.0-rc.69 the token is accepted under its alias only, so a holder who guesses the username cannot confirm it with the token (`[AL13]`, `[OPSE5]`; earlier releases accepted it under every name of the account). - Third-party record ids are masked before they reach Pryv (open-pryv.io 2.0.0-rc.58, `external-id-index` primitive): your service sends `HMAC(K_namespace, recordId)` with a key it keeps, the platform index stores a token of it mapped to a core, and no listing, error, log line or audit record returns the value `[XIDC1]`, `[XIDC7]`, `[XIDG1]`, `[XIDN4]`. Key custody is yours: every holder of `K_namespace` can look up and claim ids of that namespace. - Static masking for non-prod environments + field-level encryption at the schema layer are both implementer concerns today; end-to-end encryption (`proposals/e2e-encryption.md`) is the natural future primitive for both. - The audit log itself is data-minimal by construction, captures action + access + integrity hash, never the request body (see `docs/pryv-primitives.md` audit entry). **Evidence** - tests: XIDC1, XIDC7, XIDG1, XIDN4, AL13, OPSE5 - primitives: randomAlias, stream, system-streams, event, external-id-index - context notes: data-masking-projection-vs-transformation ### ISO 27001 A.8.12: A.8.12 Data leakage prevention Coverage: facilitated · effort saved: medium · mode: primitive · draft Requirement: Data leakage prevention measures shall be applied to systems, networks and any other devices that process, store or transmit sensitive information. **What Pryv does for you** Pryv's primary leakage- prevention surface is the permission model, an access only reads / writes the streams its scope permits, so a misconfigured app can't accidentally exfiltrate out-of-scope data. The audit log surfaces anomalous access patterns post-facto. The shared-secrets primitive closes a classic leakage channel: credentials handed to third parties travel as a one-time random key instead of a URL-embedded token, so browser history, referrer headers, and server access logs stop accumulating live credentials. Network / endpoint DLP (browser-side copy-paste protection, USB blocking, etc.) is the operator's endpoint-management scope. **Evidence** - primitives: access, permissions, audit, observability-provider, shared-secrets ### ISO 27001 A.8.22: A.8.22 Segregation of networks Coverage: facilitated · effort saved: medium · mode: infrastructure · draft Requirement: Groups of information services, users and information systems shall be segregated in the organization's networks. **What Pryv does for you** Multi-core Pryv clusters use mTLS over rqlite Raft for inter-core traffic, on a cluster-private CA distinct from the Let's Encrypt user- facing chain. This gives technical segregation between the cluster-internal control plane and the user-facing data plane. The operator's network segmentation (VPCs, security groups, firewall rules) layers on top. **Detail** Keep rqlite's HTTP port (default 4001) closed to the outside: it is unauthenticated, and since open-pryv.io 2.0.0-rc.34 (rqlite 10.5.1) it also serves rqlite's web console. Cores replicate and forward writes over the Raft port (default 4002, mutual TLS); open 4001 between cores only for admin tools you run against a peer (`open-pryv.io/INSTALL.md`, "Upgrading the bundled rqlite (9.x to 10.x)"). **Evidence** - primitives: multi-core-mTLS ### ISO 27001 A.8.28: A.8.28 Secure coding Coverage: facilitated · effort saved: low · mode: awareness · draft Requirement: Secure coding principles shall be applied to software development. **What Pryv does for you** Pryv's own secure-coding posture is visible in the public open-pryv.io repository, coding standards (neostandard), linting enforced on PRs, pre-commit hooks, dependency-audit pipeline. The implementer's own application-layer secure-coding programme remains their ISMS artefact, drawing on the public Pryv-side practice as supplier evidence. The 2026 code-level security review of open-pryv.io (fixes in 2.0.0-rc.40 to 2.0.0-rc.51, each with regression tests; public report `SECURITY-AUDIT.md`, published 2026-10-14, https://github.com/pryv/open-pryv.io/blob/master/SECURITY-AUDIT.md) is part of that evidence, see `context/code-security-review-2026.md`. **Evidence** - context notes: code-security-review-2026 ### ISO 27001 A.8.30: A.8.30 Outsourced development Coverage: out-of-scope · draft Requirement: Organization shall direct, monitor and review activities related to outsourced system development. **What Pryv does for you** Outsourced development is the operator's contractual / supplier- management concern. When the operator's "supplier" is Pryv (i.e., they consume open-pryv.io as a third-party platform), this matrix + the CHANGELOGs + the public release process serve as the supplier-monitoring artefact set the operator references, now joined by the per-release CycloneDX SBOM and the keyless cosign signature + SLSA provenance on published images (open-pryv.io supply-chain pipeline, merge `9e2ee7ff`). ### ISO 27001 A.8.31: A.8.31 Separation of development, test and production environments Coverage: facilitated · effort saved: medium · mode: infrastructure · draft Requirement: Development, testing and production environments shall be separated and secured. **What Pryv does for you** Pryv supports separate environments via independent core deployments (each with its own bootstrap bundle + cluster CA); the data-residency primitive prevents accidental cross-environment data flow at the user-binding layer. Operator's environment-management procedure (test data hygiene, promotion gates, deployment automation) sits on top. **Evidence** - primitives: data-residency, multi-core-mTLS ### ISO 27001 A.5.1: A.5.1 Policies for information security Coverage: out-of-scope · draft Requirement: Information security policy + topic-specific policies shall be defined, approved by management, published, communicated to and acknowledged by relevant personnel + relevant interested parties, reviewed at planned intervals. **What Pryv does for you** Information-security policy is the operator's organizational artefact. Pryv has no role in drafting policy text. The audit log + observability data give the operator the means to verify policy effectiveness post-facto. ### ISO 27001 A.5.7: A.5.7 Threat intelligence Coverage: facilitated · effort saved: low · mode: evidence · draft Requirement: Information relating to information security threats shall be collected and analysed to produce threat intelligence. **What Pryv does for you** Pryv-side contribution to threat intelligence: dependabot alerts on master (Q24 supply-chain backlog ships the broader CI gate + SBOM + Trivy/Grype pipeline), CHANGELOG announcements of relevant security fixes, observability data on anomalous request patterns. Vulnerability-disclosure intake: `SECURITY.md` publishes a coordinated disclosure policy (private GitHub Security Advisories flow + `security-dev@` mailbox + scope + SLA + safe harbor + GHSA/CVE issuance), and private vulnerability reporting is enabled on the published repositories. That VDP + GHSA log is the substrate- vulnerability threat-intelligence feed downstream operators subscribe to. The operator's own threat-intel programme (threat-feed subscriptions, correlation logic) sits on top. **Evidence** - primitives: observability-provider, audit ### ISO 27001 A.5.16: A.5.16 Identity management Coverage: implemented · effort saved: high · draft Requirement: The full life cycle of identities shall be managed. **What Pryv does for you** Pryv's account + access primitives implement the full identity lifecycle: create (registration), enable (login + access mint), modify (accesses.update, account.update), suspend (access narrowing), terminate (accesses.delete + system.users.delete). Audit log gives the per-stage evidence. The naming + assignment policy is the operator's. **Detail** For workforce / role-scale deployments, Pryv composes with an external IdP / IGA system via two patterns documented in `context/workforce-access-patterns.md`: (1) group access + `callerId` audit suffix, (2) seed access + sub-access derivation. **Roles + groups themselves are deliberately outside Pryv;** the IdP is the source of truth for identity lifecycle, and Pryv records the resulting access state + per-individual audit trail. A third pattern ships in open-pryv.io 2.0.0-rc.53 (release commit `61fb28dd`, https://github.com/pryv/open-pryv.io/issues/158): for a team sharing one account that reaches patient data through cross-account consent, each member is their own Pryv account, joins through a membership request an administrator of the group approves `[GA01]`, acts on patient accounts under accesses the group's core issues and the patient's core stamps with their identity `[GA10]`, and leaves (or is removed, including when the delegate who approved them is detached) with those accesses swept by the platform `[GA20]`, `[GA21]`, `[GA23]`. Roles stay outside Pryv in that pattern too: a team is a stream, a membership is a consent relationship. See `context/workforce-access-patterns.md`, Pattern 3. **Delegated-app identity via OAuth2.** For app identities, Pryv ships an OAuth2 authorization-code + PKCE flow (`open-pryv.io/components/oauth2/`, open-pryv.io 2.0.0-rc.8): each client is a curated identity the operator registers through `bin/oauth-client.js` (create / rotate-secret / list, the full credential lifecycle), authenticating with mandatory PKCE (S256 only) against an exact-match registered redirect-URI set. Open self-registration is disabled, so every client identity is operator-authorised before it exists. Since open-pryv.io 2.0.0-rc.74 that holds while `oauth.clientMetadataDocuments.mode` is `off` (the default); otherwise a client may identify itself by an https URL on a host your policy accepts, with its reach set by your template only (see `soc2.CC6.2`) `[OCMDE06]`. **Identities an app sees (open-pryv.io 2.0.0-rc.68 to 2.0.0-rc.77).** An operator-registered client declares a subject type, `public` or `pairwise`, with no default. A pairwise client sees each user as a pseudonymous alias, one per user and client, never the username, in token responses, the OpenID Connect id token (`sub`, signed with a key of `oauth.signingKeys`) and introspection `[OPSE1]`, `[OXD08]`; a public one sees the user's internal id, also never the username. The account holder can mint up to 10 address aliases (rc.76, personal token only, names chosen by the server) that a consent can adopt as the app's address `[OPAL1]`, `[OPAL2]`, `[OPUE9]`. Changing a grant's subject type must be acknowledged by the user `[OCMP11]`. With `oauth.perUserIssuer` (rc.77, opt-in) each account host is its own OAuth2 issuer `[OPIS5]`. **Delegate-account identity lifecycle.** Account delegation (`open-pryv.io/components/delegation/`) manages the lifecycle of a delegate relationship between two accounts: a controlled-account- initiated invite / accept handshake creates it (create-from- delegate can provision the controlled account itself, optional email/password seed), an owner-equivalent delegate token enables it, and an authoritative detach terminates it, reserved to a genuine login on the controlled account (a delegate can never remove a delegation). Each delegate acts under its own attributable token, audited on the controlled account (same-core + cross-core), and `accessInfo` names the acting delegate. See `context/delegation-model.md`. App identities a delegate authorizes for the controlled account carry that lineage for their whole life: `accessInfo` reports them as granted through the delegation (`grantedVia: 'app'`, naming the delegate) `[DCH02]`, and they end with the delegation `[DCH12]`. In open-pryv.io 2.0.0-rc.23. **Evidence** - tests: AA01, AA02, ACCP, UZEV, DCH02, DCH12, CMCGA, GA01, GA10, GA20, GA21, GA23, OCMDE06, OPSE1, OXD08, OPAL1, OPAL2, OPUE9, OCMP11, OPIS5 - config keys: oauth.clientMetadataDocuments.mode, oauth.signingKeys, oauth.perUserIssuer - derives from: iso-27001.A.5.15, hipaa-security.164.308(a)(4)(ii)(C) - primitives: access, system-streams, audit, delegation, CMC - context notes: workforce-access-patterns, delegation-model ### ISO 27001 A.5.17: A.5.17 Authentication information Coverage: facilitated · effort saved: medium · mode: infrastructure · draft Requirement: Allocation and management of authentication information shall be controlled by a management process, including advising personnel on appropriate handling. **What Pryv does for you** Pryv stores credentials on a privileged system-stream (`:_system:password` etc.). MFA secrets stay server-side: the TOTP secret encrypted at rest in the private profile, recovery codes stored hashed, and neither is returned by the profile methods (open-pryv.io `7ce9ea6f`). Operator's secret-distribution + secret-rotation policy is the organizational programme; Pryv provides the secure storage tier. **Detail** **OAuth2 token + secret handling.** Where you delegate access to apps, Pryv's OAuth2 flow (`open-pryv.io/components/oauth2/`, open-pryv.io 2.0.0-rc.8) manages the authentication material for you: access tokens are short-lived (`oauth.accessTokenTTL`, default 1 h), refresh tokens are single-use and rotate on every exchange with a sliding TTL bounded by an absolute cap (`oauth.refreshTokenTTL` / `oauth.refreshTokenAbsoluteTTL`), and a replayed (already-rotated) refresh token fails the exchange (`open-pryv.io/components/oauth2/src/grants/refresh_token.ts`). Confidential clients hold a rotatable `client_secret` (`bin/oauth-client.js rotate-secret`). The operator's broader secret-distribution + rotation programme stays the organizational half; Pryv supplies the short-TTL + rotation mechanics. **Since open-pryv.io 2.0.0-rc.69 to 2.0.0-rc.74.** A refreshed token's predecessor expires after `oauth.refreshRetireGraceSeconds` (default 60 s) `[ORET1]`; a refresh refused for bad client authentication no longer uses up the refresh token `[ORL04]`; audit rows name refresh tokens by a hash, never by their first characters `[ORL12]`. Per-client lifetimes may only shorten the platform's (rc.70); a rotated secret can stay valid for at most 30 days `[OCAK14]`. `private_key_jwt` assertions are checked only with a key of their type and a pinned algorithm, a multi-key set needs a `kid` on each key, and a `jwks_uri` is fetched through the outbound guard `[OCAK2]`, `[OCAK7]`, `[OCAK23]`. The OpenID Connect signing keys (`oauth.signingKeys`) and the per-core keys that sign the consent flow's and third-party sign-in's browser state (`oauth.stateKey`, `sso.stateKey`, required since rc.70, no longer derived from the admin key) live in the YAML configuration, never in the platform DB `[OXK01]`, `[OXSK1]`, `[CKOC2]`. **Transmitting authentication information to a third party.** "Appropriate handling" includes how a credential travels when you hand it to someone else. Pryv's shared-secrets endpoints (`open-pryv.io/components/shared-secrets/`) replace the URL-embedded-token pattern with a one-time random key: redeemable exactly once, mandatory TTL, only the SHA-256 of the key's random half stored server-side, payload scrubbed when the item leaves the pending state (on redemption, on a signature mismatch, and on the first retrieval attempt after the TTL; expiry is enforced on access, not by a background sweeper, so an untouched expired secret keeps its payload until something reaches it or you delete it), optional passphrase / HMAC signature on redemption. Your handling policy ("never send credentials in links or logs") gains a shipped mechanism to point at instead of a prohibition alone. A `secretSharing: forbidden` feature permission, inherited by child accesses, lets you exclude publicly-exposed tokens from the mechanism entirely. The same one-time-key mechanism carries the session token when an account holder signs in through an external OpenID Connect provider (`sso.*`, beta, off by default): the token is never placed in the redirect URL, and the federated login is gated so an external identity cannot claim an account whose email was never inbox-proved. **Evidence** - tests: ORET1, ORL04, ORL12, OCAK14, OCAK2, OCAK7, OCAK23, OXK01, OXSK1, CKOC2 - config keys: oauth.refreshRetireGraceSeconds, oauth.signingKeys, oauth.stateKey, sso.stateKey - primitives: system-streams, MFA, encryption-at-rest-secrets, shared-secrets **Planned changes** - enhancement: Reference MFA plugins broaden the authentication-information catalogue ### ISO 27001 A.5.18: A.5.18 Access rights Coverage: implemented · effort saved: high · draft Requirement: Access rights to information and other associated assets shall be provisioned, reviewed, modified and removed in accordance with the organization's topic-specific policy on, and rules for, access control. **What Pryv does for you** Same primitive surface as A.5.15 + A.5.16, accesses.create / .update / .delete cover the lifecycle stages; access version history provides the review-evidence layer. When an access expires, what hangs off it ends too: a `shared` access managed by an app access can no longer outlive it (it inherits the app access's expiry at creation, clearing that expiry is refused, and authentication refuses a never-expiring shared access once its app access has expired, `5d609bfa`), and a webhook stops firing and becomes `inactive` once its access has expired (`3394b95f`), both in open-pryv.io 2.0.0-rc.23. **Detail** **Group accounts over CMC** (open-pryv.io 2.0.0-rc.53, release commit `61fb28dd`, https://github.com/pryv/open-pryv.io/issues/158). For a team sharing one account, a member's rights on patient accounts follow their membership: provisioned only under an approved membership `[GA01]`, `[GA10]`, reviewable from the group account (each access asked for and each removal is an event naming the member; a revoked membership stays readable as a deletion record) `[GA22]`, narrowed with it `[GA41]`, and removed on every patient account when it ends `[GA20]`, with residuals recorded, retried by the retry loop and the periodic pass `[MR25]`, and bounded by the access's own expiry. See `context/workforce-access-patterns.md`, Pattern 3. **Evidence** - tests: AA01, AA02, ACCP, CMCMR, GA01, GA10, GA20, GA22, GA41, MR25 - derives from: iso-27001.A.5.15, iso-27001.A.5.16, hipaa-security.164.308(a)(3)(ii)(C) - primitives: access, permissions, audit, CMC - context notes: workforce-access-patterns ### ISO 27001 A.5.19: A.5.19 Information security in supplier relationships Coverage: facilitated · effort saved: low · mode: awareness · draft Requirement: Processes and procedures shall be defined and implemented to manage the information-security risks associated with the use of supplier's products or services. **What Pryv does for you** When the operator's "supplier" is Pryv (i.e., open-pryv.io as a third-party platform), the public release process + CHANGELOGs + this compliance matrix serve as the supplier-monitoring artefact set. The operator's supplier-management procedure (assessment criteria, periodic review) sits on top. **Evidence** - primitives: observability-provider ### ISO 27001 A.5.20: A.5.20 Addressing information security within supplier agreements Coverage: out-of-scope · draft Requirement: Relevant information-security requirements shall be established and agreed with each supplier based on the type of supplier relationship. **What Pryv does for you** Supplier agreements are contractual artefacts. No software role. When the operator's contract with Pryv (open-pryv.io is BSD- licensed open source) requires security commitments, those map to public Pryv-side practices (release cadence, security-fix backporting, etc.) but the contract itself is operator-side. ### ISO 27001 A.6.1: A.6.1 Screening Coverage: out-of-scope · draft Requirement: Background-verification checks on all candidates to become personnel shall be carried out prior to joining the organization and on an ongoing basis taking into consideration applicable laws, regulations and ethics. **What Pryv does for you** Personnel screening is an HR process. No software role. ### ISO 27001 A.6.4: A.6.4 Disciplinary process Coverage: out-of-scope · draft Requirement: A formal and communicated disciplinary process shall be in place to take actions against personnel and other relevant interested parties who have committed an information-security policy violation. **What Pryv does for you** Disciplinary process is HR-side. Pryv's audit log gives the evidence pack the HR / legal team uses to substantiate an allegation, but the process itself is organizational. ### ISO 27001 A.6.5: A.6.5 Responsibilities after termination or change of employment Coverage: facilitated · effort saved: medium · mode: primitive · draft Requirement: Information security responsibilities + duties that remain valid after termination or change of employment shall be defined, enforced and communicated to relevant personnel and other interested parties. **What Pryv does for you** Technical termination is `accesses.delete` (full revoke) + audit-log timestamp. The post-termination obligations (confidentiality, IP, NDA enforcement window) are contractual. **Detail** **Group accounts over CMC** (open-pryv.io 2.0.0-rc.53, release commit `61fb28dd`, https://github.com/pryv/open-pryv.io/issues/158). When a member leaves a team sharing one account, or is removed, ending the membership deletes that member's accesses on every patient account and records the outcome per patient (`consent/member-revoke-cmc`, `deleted`, `absent` or `residual`) `[GA20]`, `[GA21]`, `[GA22]`, `[GA23]`. A residual is retried while `cmc.retryLoop.enabled` is `true` (the default) and cannot outlive the access's own expiry (at most `cmc.memberAccess.maxTtl`, 7 d by default). What the departing person may still owe (confidentiality of what they read) stays contractual. See `context/workforce-access-patterns.md`, Pattern 3. **Evidence** - tests: CMCMR, GA20, GA21, GA22, GA23 - config keys: cmc.retryLoop.enabled, cmc.memberAccess.maxTtl - derives from: iso-27001.A.5.16, iso-27001.A.5.18, hipaa-security.164.308(a)(3)(ii)(C) - primitives: access, audit, CMC - context notes: workforce-access-patterns ### ISO 27001 A.8.1: A.8.1 User end-point devices Coverage: out-of-scope · draft Requirement: Information stored on, processed by or accessible via user end-point devices shall be protected. **What Pryv does for you** End-point device security (laptops, phones, tablets) is endpoint- management scope. Pryv's API access from end-points is mediated by access tokens + TLS, but the device itself isn't a Pryv concern. ### ISO 27001 A.8.4: A.8.4 Access to source code Coverage: out-of-scope · draft Requirement: Read + write access to source code, development tools and software libraries shall be appropriately managed. **What Pryv does for you** Source-code access management is an operator IT concern (Git access policies, CI/CD secrets, repository permissions). Pryv- the-software's own source is public; the operator's app-side source-code repo is theirs to manage. ### ISO 27001 A.8.6: A.8.6 Capacity management Coverage: facilitated · effort saved: medium · mode: infrastructure · draft Requirement: The use of resources shall be monitored + adjusted in line with current + expected capacity requirements. **What Pryv does for you** Pryv-side capacity surfaces: per-core observability metrics (memory, CPU, latency, request volume); horizontal scaling via adding cores to the cluster (each handles its bound users + shared rqlite control plane). Operator's capacity-planning cadence + provisioning automation sit on top. **Detail** **Resource bounds inside the core (open-pryv.io 2.0.0-rc.47 and 2.0.0-rc.50).** One client can no longer exhaust a core's capacity through a single call shape: a batch holds at most 1000 calls with its results bounded together (`limits.batch.maxTotalItems`) `[CEDB5]`, `[CEDB6]`; `events.get` paging is bounded and PostgreSQL results are streamed through a cursor instead of loaded whole `[EGLV1]`, `[EGLC1]`; uploads are limited in parts, files (`uploads.maxFiles`) and size by default `[MPLM3]`, `[MPLD1]`; socket.io namespaces exist only for user names and messages are bounded (`socketIO.maxMessageBytes`) `[SION1]`, `[SION4]`; previews refuse images declaring more than `eventFiles.previewsMaxInputPixels` and render at most `eventFiles.previewsRenderConcurrency` at once `[PVPX1]`, `[PVRQ1]`; a crashing worker is replaced after a growing delay `[WRBO1]`. These protect capacity; sizing the cores, watching the metrics and scaling stay yours. See `context/rate-limiting-and-dos-protection.md`. **Password checks and database time (open-pryv.io 2.0.0-rc.87).** Password hashing and verification, OAuth client secrets included, run at most `auth.passwordCheckConcurrency` at a time per API worker (default 2), with up to `auth.passwordCheckQueue` calls waiting (default 50, at most 10 s); beyond that the call is refused before anything is checked, so a flood of password checks no longer takes the worker's CPU and thread pool from attachments, webhook lookups and compression for every account `[CLIM1]`, `[CLIM2]`, `[CLIM3]`, `[CLIB2]`, `[PCLM1]`, `[PCLM2]`. On PostgreSQL, a statement issued while serving an API request is stopped after `storages.engines.postgresql.statementTimeoutMs` (default 30 s) and a transaction left idle is closed after `idleInTransactionTimeoutMs` (default 60 s); the request answers `503 api-unavailable` and one warning line is logged. A streamed read is limited per batch of rows, so a long download is not cut. Account deletion, background jobs, boot-time schema work, `system.checkPlatformIntegrity` and the command-line tools run unlimited on a small separate pool: each PostgreSQL pool of a worker may open up to 2 more connections, so leave that headroom in `max_connections` (tests `[PGSS1]`, `[PGSI1]`, `[PGSI2]`, `[STMC1]`, `[MNSC1]`). Both apply to the workers of the clustered server (`bin/master.js`). They bound how long one request holds a connection and how much CPU password checks take; many slow requests in a row are still for your edge layer to limit. **Per-account, per-access and per-connection ceilings (the release after open-pryv.io 2.0.0-rc.87; on by default, per API worker, `0` turns each off).** Authenticated calls running at once (HTTP, batch counted once, socket.io) are capped per account (`limits.requests.maxInflightPerUser`, default 64) and per access (`limits.requests.maxInflightPerAccess`, default 32), so one shared token cannot take its owner's whole budget; past either the call answers `429 too-many-requests` with `Retry-After: 1` without running `[APLM3]`, `[APLM5]`, `[APLM9]`. Calls without an access (`auth.login`, password reset) are not counted. Parameters nested deeper than `limits.json.maxDepth` (default 64) or with an object holding more than `limits.json.maxObjectKeys` keys (default 10000) answer `400 invalid-parameters-format` before the method runs `[APLM1]`, `[APLM2]`. On socket.io: connections per access (`socketIO.maxConnectionsPerAccess`, 20) and per account (`socketIO.maxConnectionsPerUser`, 100), refused at the handshake with `too-many-requests` `[SIOL1]`, `[SIOL3]`; calls running at once on one connection (`socketIO.maxInflightCallsPerConnection`, 16) `[SIOL5]`; scopes per connection (`socketIO.maxScopesPerConnection`, 100; refused with `invalid-operation`, the whole `subscribe` adds nothing) `[SIOL6]`; a burst of access changes re-checks the open connections at most once per second `[SIOL8]`. These are ceilings on concurrent work, not request rates: per-token request rates stay at your edge layer. **Stream tree, stalled readers and mail (same release; on by default, `0` turns each off).** A stream sits at most `limits.streams.maxDepth` levels deep (default 32, a move counts the moved subtree) and an account holds at most `limits.streams.maxPerAccount` streams in its own store (default 10000, trashed ones included); past either the write answers `400 invalid-operation`, also when an access creates a stream from a permission's `defaultName` `[STLM1]`, `[STLM2]`, `[STLM3]`, `[STLM6]`. An event carries at most `limits.events.maxStreamIds` distinct stream ids (default 100, `400 invalid-parameters-format`) `[STLM4]`. What an account already holds stays readable. An HTTP connection with no traffic either way for `http.responseIdleTimeoutMs` (default 120 s) is closed, so a client that stopped reading no longer holds a database cursor and call slots `[RIDL1]`; keep it above your slowest call (websockets are not affected). One access runs one streamed audit read at a time per worker (`limits.audit.maxConcurrentReadsPerAccess`, default 1); a further read waits for a slot, oldest first, up to `limits.audit.maxReadWaitMs` (default 30 s), so parallel reads run one after the other and succeed, and only a read left without a slot past the wait answers `429 too-many-requests` `[RIDL3]`, `[RIDL4]`, `[RIDL5]`. The mail a caller can make a core send is capped per hour and per class (`services.email.maxPerHour`, default 500, registration mails apart from account mails) `[MLBG3]`; the per-address and per-account mail budgets are on A.8.21. **Evidence** - tests: CEDB5, CEDB6, EGLV1, EGLC1, MPLM3, MPLD1, SION1, SION4, PVPX1, PVRQ1, WRBO1, CLIM1, CLIM2, CLIM3, CLIB2, PCLM1, PCLM2, STMC1, MNSC1, UNXS1, APLM1, APLM2, APLM3, APLM5, APLM9, SIOL1, SIOL3, SIOL5, SIOL6, SIOL8, STLM1, STLM2, STLM3, STLM4, STLM6, RIDL1, RIDL3, RIDL4, RIDL5, MLBG3 - docs: customer-resources/rate-limiting.md - config keys: limits.batch.maxTotalItems, uploads.maxFiles, socketIO.maxMessageBytes, eventFiles.previewsMaxInputPixels, eventFiles.previewsRenderConcurrency, auth.passwordCheckConcurrency, auth.passwordCheckQueue, storages.engines.postgresql.statementTimeoutMs, storages.engines.postgresql.idleInTransactionTimeoutMs, limits.requests.maxInflightPerUser, limits.requests.maxInflightPerAccess, limits.json.maxDepth, limits.json.maxObjectKeys, socketIO.maxConnectionsPerAccess, socketIO.maxConnectionsPerUser, socketIO.maxInflightCallsPerConnection, socketIO.maxScopesPerConnection, limits.streams.maxDepth, limits.streams.maxPerAccount, limits.events.maxStreamIds, http.responseIdleTimeoutMs, limits.audit.maxConcurrentReadsPerAccess, limits.audit.maxReadWaitMs, services.email.maxPerHour - primitives: observability-provider, multi-core-mTLS - context notes: rate-limiting-and-dos-protection ### ISO 27001 A.8.14: A.8.14 Redundancy of information processing facilities Coverage: facilitated · effort saved: high · mode: infrastructure · draft Requirement: Information processing facilities shall be implemented with redundancy sufficient to meet availability requirements. **What Pryv does for you** Multi-core Raft replication makes the platform DB (user-to-core index, shared settings, certificates) redundant, so the cluster keeps routing and serving TLS when a peer fails. User data is not replicated between cores: the users homed on a failed core are unavailable until that core, or its restore from backup, is back. Redundancy of user data is yours to add under the storage engine (e.g. PostgreSQL streaming replication, replicated volumes). The availability target + redundancy depth is operator policy. **Detail** Since open-pryv.io 2.0.0-rc.34 the replicated platform DB runs on rqlite 10.5.1: a node killed while taking a snapshot no longer risks restoring stale pages into its copy (as under 9.x), snapshot files are checksummed, a node stops on a node-local SQLite error instead of diverging, and the first write a follower forwards to a restarted leader no longer fails once. Upgrading a cluster is one-way for each node's data directory and needs the nodes upgraded back to back (followers first, never adding a node while versions are mixed): `open-pryv.io/INSTALL.md`, "Upgrading the bundled rqlite (9.x to 10.x)". **Evidence** - derives from: iso-27001.A.5.23, hipaa-security.164.308(a)(7)(ii)(B) - primitives: multi-core-mTLS, backup-restore, letsEncrypt-integration ### ISO 27001 A.8.17: A.8.17 Clock synchronization Coverage: facilitated · effort saved: low · mode: awareness · draft Requirement: Clocks of information processing systems used by the organization shall be synchronized to approved time sources. **What Pryv does for you** Clock sync stays your host's job (chronyd / ntpd): Pryv stores whatever timestamp the host produces. Pryv makes a badly skewed clock visible at the two points where it breaks a core: a new core whose clock differs from the cluster's is refused at join, and a TLS certificate outside the local clock's validity window is neither installed nor hot-swapped. **Detail** Pryv's architecture is **core-affine**, every user's data operations resolve to one core (see `context/core-affinity-architecture.md`). Cores never need to agree on clock value or on cert validity with each other; the dangerous failure modes are all intra-core (one core's own clock vs its own loaded cert / its own audit-row timestamps). **Pryv's existing contribution to skew detection**: every API response carries `meta.serverTime` (Unix timestamp seconds; `components/api-server/src/methods/helpers/setCommonMeta.ts`). Webhook payloads include the same. Clients use this to detect their own clock skew vs the server. **Shipped** (open-pryv.io `5266b697`, released after 2.0.0-rc.34; see `proposals/clock-skew-cluster-checks.md`): two intra-core checkpoints. (1) Bootstrap join: before acking, a new core compares its clock with the issuing core's (`meta.serverTime` of its API root, else the HTTP `Date` header) and refuses the join beyond `--bootstrap-clock-skew-seconds` (default 30 s, `0` disables); the join token is not used, so fixing the clock and re-running succeeds. (2) Certificate load: a certificate whose `notBefore..notAfter` window does not contain the local clock (tolerance `cluster.clockSkewSeconds`, default 30 s) is not materialized from PlatformDB nor hot-swapped into the workers, and a custom certificate outside its window is reported at boot. What stays yours: run a clock service on every host. Pryv does no periodic clock polling. **Evidence** - primitives: multi-core-mTLS, letsEncrypt-integration - context notes: core-affinity-architecture ### ISO 27001 A.8.18: A.8.18 Use of privileged utility programs Coverage: facilitated · effort saved: medium · mode: primitive · draft Requirement: The use of utility programs that can be capable of overriding system and application controls shall be restricted and tightly controlled. **What Pryv does for you** Pryv-side privileged utilities: the `bin/*` CLIs (`bootstrap.js`, `migrate.js`, `dns-records.js`, `observability.js`, `backup.js`). Operator restricts their execution to administrator accounts via host-OS permissions + sudo policy. The `auth.adminAccessKey`-bearing API surface is the runtime privilege channel; usage is audit-logged. **Evidence** - derives from: iso-27001.A.8.2, hipaa-security.164.312(a)(2)(ii) - primitives: system-streams, access, audit ### ISO 27001 A.8.19: A.8.19 Installation of software on operational systems Coverage: facilitated · effort saved: low · mode: infrastructure · draft Requirement: Procedures and measures shall be implemented to securely manage software installation on operational systems. **What Pryv does for you** Pryv ships as a single Docker image with SHA-pinned tag; the installation channel is reproducible. Operator's installation procedure (build verification, signature checking, change-approval gate) sits on top. **Evidence** - primitives: audit ### ISO 27001 A.8.21: A.8.21 Security of network services Coverage: facilitated · effort saved: medium · mode: infrastructure · draft Requirement: Security mechanisms, service levels and service requirements of network services shall be identified, implemented and monitored. **What Pryv does for you** Pryv's external network surface is the TLS-terminating HTTPS API + the embedded DNS server (when multi-core enabled); both are monitored via observability. Inter-core mTLS is the internal surface. The operator's broader network-service portfolio (LB, WAF, VPN) sits outside Pryv. **Detail** **General rate limiting / DoS protection stays operator-side** (reverse proxy / WAF / API gateway): general in-process throttling was rejected because (1) multi-core load distribution makes per-core counters mis-fire and (2) abuse signatures are operator-specific. Pryv contributes the **detection layer** (audit log + observability metrics + `accesses.delete` revocation) and, since open-pryv.io 2.0.0-rc.47, **targeted in-code budgets** on the paths it can count correctly: failed passwords per account and per client address across all cores (`auth.passwordAttempts`) `[CEPB1]`, `[CEPI1]`; credential methods refused inside batches and over socket.io `[CEDB1]`; live `/reg/access` requests per address (`access.maxLiveRequestsPerIp`) `[RAI1]`; batch, paging, upload and socket.io message bounds `[CEDB5]`, `[EGLV1]`, `[MPLM3]`, `[SION4]`; and in 2.0.0-rc.50 an invitation-check budget `[IVCK1]`, a `webhooks.test` interval `[WHTT1]` and preview limits `[PVPX1]`. Failed MFA second factors have had a per-account backoff since 2.0.0-rc.27 (`services.mfa.attempts.backoff`), see A.8.5. The per-address budgets read the client address through `http.trustedProxies` only: behind your reverse proxy, list it there `[CEPI2]`. The embedded DNS server validates requests and bounds its TCP connections (`dns.tcpMaxConnections`, 2.0.0-rc.46) `[DNR01]`. Since open-pryv.io 2.0.0-rc.87, password checks run a bounded number at a time per API worker (`auth.passwordCheckConcurrency`, `auth.passwordCheckQueue`): past it the API answers `429 too-many-requests` and the OAuth endpoints `503 temporarily_unavailable`, both with `Retry-After`, and the refusal is never a failed attempt `[CLIM2]`, `[PCLM1]`, `[PCLM2]`; on PostgreSQL the database work of an API request is time-limited (see A.8.6). From the release after 2.0.0-rc.87, each API worker also caps the calls running at once per account and per access (`limits.requests.*`, `429 too-many-requests`), the nesting and size of call parameters (`limits.json.*`, `400`), and socket.io connections per access and per account, calls per connection and scopes per connection (`socketIO.max*`) `[APLM1]`, `[APLM3]`, `[APLM9]`, `[SIOL1]`, `[SIOL3]`, `[SIOL5]` (see A.8.6). They bound concurrent work, not request rates. The same release closes an HTTP connection idle either way for `http.responseIdleTimeoutMs` (default 120 s), so a stalled reader no longer holds its call's resources `[RIDL1]`, and bounds the mail a caller can make a core send: registration codes per client address (`account.emailVerification.registrationCodesPerIpPerHour`, 10 an hour, `429 too-many-attempts`) `[MLBG1]`, verification mails per account to distinct addresses (`account.emailVerification.addressesPerAccountPerDay`, 10 a day) `[MLBG2]`, and an hourly breaker per core counted apart for registration and account mails (`services.email.maxPerHour`, 500), so a flood of registration codes cannot stop password resets `[MLBG3]`. Notices the platform sends on its own are not counted. These budgets do not replace an edge layer for volumetric traffic, per-token request rates and WAF rules. Full rationale + operator mitigation patterns: `context/rate-limiting-and-dos-protection.md`. Reference nginx + fail2ban configuration, verified against a running core (per-IP and per-token limits on the routes that matter, ban jails, limits per workload profile, a load test proving the limits fire): `customer-resources/rate-limiting.md` on the developer site. **Evidence** - tests: CEPB1, CEPI1, CEPI2, CEDB1, CEDB5, RAI1, EGLV1, MPLM3, SION4, IVCK1, WHTT1, PVPX1, DNR01, CLIM2, PCLM1, PCLM2, APLM1, APLM3, APLM9, SIOL1, SIOL3, SIOL5, RIDL1, MLBG1, MLBG2, MLBG3 - docs: customer-resources/rate-limiting.md - config keys: auth.passwordAttempts, http.trustedProxies, access.maxLiveRequestsPerIp, socketIO.maxMessageBytes, limits.batch.maxTotalItems, uploads.maxFiles, dns.tcpMaxConnections, auth.passwordCheckConcurrency, auth.passwordCheckQueue, limits.requests.maxInflightPerUser, limits.requests.maxInflightPerAccess, limits.json.maxDepth, limits.json.maxObjectKeys, socketIO.maxConnectionsPerAccess, socketIO.maxConnectionsPerUser, socketIO.maxInflightCallsPerConnection, socketIO.maxScopesPerConnection, http.responseIdleTimeoutMs, account.emailVerification.registrationCodesPerIpPerHour, account.emailVerification.addressesPerAccountPerDay, services.email.maxPerHour - derives from: iso-27001.A.8.20 - primitives: letsEncrypt-integration, multi-core-mTLS, observability-provider - context notes: rate-limiting-and-dos-protection ### ISO 27001 A.8.26: A.8.26 Application security requirements Coverage: facilitated · effort saved: medium · mode: awareness · draft Requirement: Information security requirements shall be identified, specified and approved when developing or acquiring applications. **What Pryv does for you** For the operator running Pryv as one of its applications, this compliance matrix IS the catalogue of identified + specified + approved security requirements Pryv satisfies. For the operator's own applications built on Pryv, the requirements are their editorial work. **Detail** Example of a requirement Pryv implements for you: content a user uploads cannot attack other users through the API origin. Since open-pryv.io 2.0.0-rc.34 an attachment whose declared type a browser executes or renders as a document (HTML, SVG and other XML, JavaScript) is served with `Content-Security-Policy: sandbox; default-src 'none'` next to `Content-Disposition: attachment`, on the token and the `readToken` paths alike (`open-pryv.io/components/api-server/src/middleware/attachment-access.ts`). Uploads are not refused for their type. If your app displays HTML or SVG attachments, fetch the content and render it in your app's own sandbox: that part of the requirement is yours. A second example, in the sign-in flow: an authorisation request (`POST /reg/access`) no longer has a `REDIRECTED` outcome (open-pryv.io 2.0.0-rc.36, `62ab4f7e`, merged in `1aa22e1a`). That status let anyone holding a request key store an unvalidated URL that was then served to the authentication page under a field such pages follow. It is now refused (`400 invalid-parameters`), no outcome post stores a `redirectUrl`, and the poll never answers `REDIRECTED` `[MC04D]`. No shipped authentication page sent it; if your own page did, it must stop (a request stays on the core that created it, and an account on another core is served through the shared-secret hand-off between cores). Further examples from the 2026 security review (open-pryv.io 2.0.0-rc.49 and 2.0.0-rc.50; `context/code-security-review-2026.md`): every JSON answer of the API carries `Cache-Control: no-store` and `Vary: Origin`, so neither a browser nor a shared cache keeps API answers `[HTC1]`; a hosted proxy site refuses a path holding an encoded separator or a dot segment before it reaches the upstream `[HSPE1]`; query strings are parsed without letting a key shadow a built-in object property `[QPR2]`. If you put a cache or CDN in front of the API, keep it honouring these directives. Another, for outbound calls (open-pryv.io 2.0.0-rc.56): a URL a counterparty supplies cannot make the server call an address it should not reach. The cross-account, delegation and OAuth revocation calls refuse, before any connection, a host that is or resolves to a loopback, private, link-local or otherwise reserved address (unless listed in `cmc.allowedPrivateHosts`), plain `http:` and URLs carrying credentials, do not follow redirects and stop reading an answer past 1 MiB `[PFR1]`, `[PFR2]`, `[PFR4]`, `[PFR5]`, `[PFR6]`, `[CO22]`; a refusal names the host, never the path or a token `[PFR10]`, and a refused delivery is not retried `[CO21]`, `[RQ33]`. Since open-pryv.io 2.0.0-rc.70 a client's `jwks_uri` key set, and since 2.0.0-rc.74 a client metadata document and its key set, are fetched through the same guard, https only whatever `cluster.allowInsecurePeerUrl` says, with the checked address pinned to the connection, bounded size (64 KiB for a key set, `oauth.clientMetadataDocuments.maxDocumentBytes`, default 16 KiB, for a document), a 5 s timeout and a budget of 10 document fetches a minute per host; a document URL naming a host of your platform is refused before any fetch `[OCMD01]`, `[OCMD03B]`, `[OCMD03D]`, `[OCMD03G]`, `[OCMD03H]`, `[OCMDE17]`. Hosts listed in `cmc.allowedPrivateHosts` are allowed for these fetches too, so list there only peers you would let any client name. **Adapter routes (open-pryv.io 2.0.0-rc.73, off unless `adapterRoutes` is set).** The core forwards `/adapter//…` (and optional `/.well-known/