Personal Data Vault (pdv) keeps each person's documents and personal data encrypted, once, and lets the sites they choose use them: a form fills itself in from the vault and saves back to it, under the owner's consent, kind of data by kind of data. Encryption keys are managed through the Key module under a three-tier key hierarchy, so a database dump or a stolen disk reveals nothing: bodies, metadata, and even on-disk filenames are encrypted or opaque.
What it does
- Encryption at rest. Envelope encryption: a Master KEK wraps a per-owner Subject KEK, which wraps a per-item key. New data is sealed with XChaCha20-Poly1305 (portable to every host); AES-256-GCM is supported as an explicit pinned-fleet choice. The Master KEK can also live in OpenBao or HashiCorp Vault (Transit), so the root key never reaches Drupal.
- Owner consent. A site asks to read or to save kinds of data, and the owner decides on one page, kind by kind, with an expiry if they want one. The vault page shows, for each site, what it may read and save, and changes it in one place. Read and write are independent: holding one never grants the other.
- Owner passphrase. An owner can lock their vault behind a secret the operator does not hold: a locked vault is unreadable to the site operator too. Setting or changing the passphrase starts a new key, so earlier copies of the old one open nothing written afterwards. The unlock window is configurable and slides with activity.
- Files and records. Store files, or typed records described by reusable kinds: text, dates, numbers, yes/no and choices from a list, with labels translated into each owner's language. A kind may hold one record, or a list of them, such as the children of an employee.
- Webform integration. A vault file element, and fields bound to record fields, prefill from the vault and save back to it, whether the vault is on the same site or another one. A multi-value composite maps to a list of records, filtered in the vault so the site never receives the others. A save box shows only once the owner allowed saving, and only while the form differs from the vault.
- Who gets the vault. A permission decides who uses the vault, on the vault site and on each site using it, so a site can open it to a panel of users first. Each user can also turn it off on forms, and a site can turn it off for everyone.
- Cross-site access. A separate Drupal site reads and writes a vault over an OAuth-gated HTTP API, through the same client contract a local site uses.
- Multi-tenancy. Several vault realms on one site, each with its own Master KEK and its own kinds of data. A pluggable resolver decides which realm a request belongs to; PDV Domain picks it from the domain being served.
- Operator and lifecycle tools. A vault subjects report, Master KEK rotation (re-wrapped at scale by cron, Batch, Drush or core's
dr), GDPR-aligned crypto-erase, owner-driven export for data portability, cleanup of dormant vaults after reminders the owner actually received, a bounded cron garbage collector, and per-consumer flood limiting on the cross-site API.
Modules
- pdv: the contract a site uses to read and write a vault (required, hidden).
- pdv_engine: keeps the vaults on this site.
- pdv_server: exposes them to sites on other hosts, over the HTTP API.
- pdv_client: reaches a vault on another site, for a site with no vault of its own.
- pdv_webform: the Webform element and handler.
- pdv_vault: holds the Master KEK in OpenBao or HashiCorp Vault (Transit).
- pdv_domain: picks the vault realm from the domain, with Domain.
- pdv_audit_trail, pdv_client_audit_trail: optional bridges into Audit Trail, on the vault site and on a site using it.
- pdv_mail, pdv_message, pdv_eca: deliver vault notifications, as fixed email, editable Message templates, or no-code ECA rules.
- pdv_consumer_console: a development-only console simulating a site using the vault (hidden).
Requirements
Drupal 11.4 or later, or Drupal 12; PHP 8.2 or later with the sodium extension; Key 1.23 or later and Consumers. The HTTP API needs Simple OAuth, the Webform integration needs Webform, and PDV Domain needs Domain.
API stability
The supported PHP API is the documented interfaces, value types, events and scope constants, with VaultClientInterface as the one way to read and write a vault. The concrete service classes are marked internal and final: depend on the interfaces and the container bindings instead. The cross-site HTTP contract is described by the OpenAPI spec shipped with the module. Full documentation (concepts and the key hierarchy, owner and consumer guides, cross-site setup, lists of records, and an API reference) lives in the module's docs directory and is available here.
Project information
- Project categories: Content editing experience, Security
- Ecosystem: Consumers, Key, Simple OAuth (OAuth2) & OpenID Connect, Webform, Audit Trail
3 sites report using this module
- Created by mably on , updated
Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.
Releases
Development version: 1.x-dev updated 30 Nov 2026 at 10:00 UTC







