Skip to content
APFerrer
M-WORM-01 · ModuleSoftware development (security and compliance)

Immutable WORM log in PostgreSQL for audit trails and evidence

A module to build into your software so that audit records and evidence cannot be modified or deleted. It keeps each customer's data separate and lets you prove an original has not changed.

Source codeEmbeddableOEM

An audit log that the application itself can change is no use as evidence. This module adds an immutable audit log for PostgreSQL to your software, built on WORM (write once, read many): protected records cannot be modified or deleted, each customer sees only its own data even when customers share a database, and every original can be checked later to prove it has not changed.

Who it is for

Teams building software with traceability requirements (audit, compliance, regulated industries), and software companies that keep several customers' data in the same database.

What an immutable WORM log solves

  • Records that can be edited. The audit history, the original records and the decisions only accept new entries.
  • Data leaking between customers. A query that does not say which customer it belongs to returns nothing.
  • Integrity you cannot prove. When an original is read, it is checked against the version that was stored.

What it does

  • Blocks changes to and deletion of protected records, even if the application fails.
  • Lets you revoke a record without deleting it: the revocation is written once and the record stays visible.
  • Keeps each customer's data separate inside the same database.
  • Stores each original with a digital fingerprint (hash) and warns you if anyone has altered it.
  • Optionally keeps the originals in storage with a retention lock, which prevents deletion during the retention period, even by the account administrator.

Benefits

  • Your audit records become evidence that holds up in front of a third party.
  • You reduce the risk of a programming error showing one customer's data to another.
  • Your team does not have to design and test a delicate part of the product.

Industry context

General industry data with its public source. These are not results of this product.

  • The global average cost of a data breach was USD 4.99 million, 12% more than the previous year and the highest on record. Source: IBM and Ponemon Institute, "Cost of a Data Breach Report 2026".
  • In Spain, the National Security Framework (Esquema Nacional de Seguridad, ENS) requires that, for medium and high category systems, activity logs can only be viewed or deleted by authorized staff, and that the security documentation sets how long they are kept. Source: Royal Decree 311/2022, Annex II, measure op.exp.8, reinforcements R3 and R4.

What you get with each license

Price upon request, depending on license type and scope. Integration support and maintenance are contracted separately.

  • The module code, ready to add to your application.
  • The database installation scripts.
  • Integration examples and documentation.
  • A warranty against defects for the agreed period.

Technical specifications

Language and runtime: SQL and PL/pgSQL in the database, and TypeScript 5.9 on Node.js in the application layer. Minimum supported version: Node.js 20.19 (required by Prisma 7).

Frameworks: Prisma 7.10 in the application layer.

Database: PostgreSQL. Minimum supported version: 16 (it uses role-switching permissions introduced in PostgreSQL 16).

Operating systems: Any that supports PostgreSQL 16 and Node.js.

Interface languages: It has no user interface of its own.

Required infrastructure:

  • PostgreSQL 16 or later, with an owner role that installs the module and a separate role for the application.
  • Amazon S3-compatible storage with Object Lock, optional, to keep the originals outside the database (if it is an external service, it requires the buyer's own account).

Private deployment: It runs fully on its own in your infrastructure. External storage of originals is optional and can be an S3-compatible service installed on your network.

Main libraries:

Library Version License
@prisma/client 7.10.1 Apache-2.0
@prisma/adapter-pg 7.10.1 Apache-2.0
pg 8.23.1 MIT
@aws-sdk/client-s3 3.1165.0 Apache-2.0

Dependencies with specific license terms: None of the module's dependencies has a copyleft license or specific commercial terms.

Compatibility and integrations: PostgreSQL 16 or later; the Amazon S3 API with Object Lock in compliance mode, and S3-compatible services.

Redistribution terms

The asset's own code can be integrated into the licensee's commercial products under the embeddable module license, the source code license and the OEM license, on the terms of the contract. None of the module's production dependencies has a copyleft license or specific commercial terms.

Installation requirements

An application that uses PostgreSQL 16 or later. External storage of originals is optional and needs Amazon S3 with a deletion lock (Object Lock) or a compatible service.

FAQ

Frequently asked questions

  • Can a database administrator delete records?

    An administrator with full database privileges could get around the protection. To cover that case as well, there is the copy in storage with a retention lock, which does not allow deletion or a shorter retention period.

  • How is legal retention applied?

    Through a procedure reserved for the database owner, outside the application's reach.

  • Does it work as a timestamp?

    It is not a qualified timestamp. For that, combine it with the RFC 3161 timestamping module (M-EVI-01).

Request

Request information on M-WORM-01

Fill in the form with the asset reference and the license type you're considering. I reply in writing. If you need to review code, tick the NDA box and we'll sign one before anything is shared.

Controller: APFerrer. Purpose: to answer your request. You can exercise your rights as described in the privacy policy.

Price upon request, depending on license type and scope. Maintenance and support are contracted separately.