PHPackages                             morebec/orkestra-postgresql-personal-information-store - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. morebec/orkestra-postgresql-personal-information-store

ActiveLibrary[Database &amp; ORM](/categories/database)

morebec/orkestra-postgresql-personal-information-store
======================================================

PostgreSQL Personal Information Storage for Orkestra

v2.5.6(3y ago)1402Apache-2.0PHPPHP &gt;=7.4

Since Apr 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Morebec/orkestra-postgresql-personal-information-store)[ Packagist](https://packagist.org/packages/morebec/orkestra-postgresql-personal-information-store)[ RSS](/packages/morebec-orkestra-postgresql-personal-information-store/feed)WikiDiscussions 2.x Synced 3w ago

READMEChangelogDependencies (8)Versions (23)Used By (0)

PostgreSQL Personal Information Store
=====================================

[](#postgresql-personal-information-store)

This component is a PostgreSQL based implementation of the Orkestra Privacy Component's Personal Information Store. It supports encrypting data in the personal store.

It relies on DBAL for communication with PostgreSQL.

Installation
------------

[](#installation)

The component can be installed using composer.

```
composer require morebec/orkestra-orkestra-postgresql-personal-information-store
```

Usage
-----

[](#usage)

Create a new instance of a `PostgreSqlPersonalInformationStore`.

```
use Doctrine\DBAL\Configuration;
use Doctrine\DBAL\DriverManager;
use Morebec\Orkestra\PostgreSqlPersonalInformationStore\PostgreSqlPersonalInformationStore;
use Morebec\Orkestra\PostgreSqlPersonalInformationStore\PostgreSqlPersonalInformationStoreConfiguration;

$connection = DriverManager::getConnection([
    'url' => '...'
], new Configuration());

$config = new PostgreSqlPersonalInformationStoreConfiguration();
$config->encryptionKey = PostgreSqlPersonalInformationStore::generateEncryptionKey(); // Or random_bytes(SODIUM_CRYPTO_SECRETBOX_KEYBYTES);
$store = new PostgreSqlPersonalInformationStore($connection,$config);
```

> Ensure you save the encryption key securely such as .env variables or a secret manager.

For more information for how to use the Store, see the documentation for the Privacy Component.

### Disposable Information

[](#disposable-information)

The information stored in the Personal Information Store can have a `disposedAt` value which indicates if and when the data should be destroyed. This component ships a `DisposedPersonalDataRemover` service class that inspects the store for expired data and deletes it.

It should be used in a daemon:

```
use Morebec\Orkestra\PostgreSqlPersonalInformationStore\DisposedPersonalDataRemover;

$remover = new DisposedPersonalDataRemover($store);

while(true) {
    $remover->run();
    sleep(60);
}
```

Security
--------

[](#security)

Given the goal of this store is to save Personal Data, the PostgreSQL server must be highly secured against attackers. Here are a few ideas to help you get started.

### Client Authentication Control

[](#client-authentication-control)

Client Authentication Control allows to specify the way clients of the PostgreSQL server can connect to it, and if they are allowed to. This configuration can be done in the `pg_hba.conf`:

```
# TYPE  DATABASE        USER            ADDRESS                 METHOD
host     postgres       all             172.20.0.0/24           ident
host     all            all             0.0.0.0/0               reject
```

For example, the above config would only allow all clients with IP address `172.20.0.x` to connect to the server on the database postgres using the authentication method ident which works by using the client's operating system username. Given this file is read from top to bottom for a match, the last line would reject any other connection attempts.

### Server Configuration

[](#server-configuration)

Another thing that can be done to enhance the security of the PostgreSQL server is of course to edit its Server configuration. For example:

- Changing the default port to something else,
- Changing the list of allowed client addresses (similar to Client Authentication Control).
- Using SSL

Testing
-------

[](#testing)

To run the tests execute the following command:

```
vendor/bin/phpunit tests/
```

It is required to have an instance of postgresql running with a password-less role `postgres` and a database named `postgres`. To easily get this setup and running a `docker-compose` configuration file is available at the root of this project.

To run it simply execute the following command:

```
docker-compose up -d
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~33 days

Recently: every ~58 days

Total

22

Last Release

1183d ago

PHP version history (2 changes)2.0PHP &gt;=7.3

v2.3.3PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/10d7f5561446f2d4df4413803946e9f77175155d241f78bd65c0dd94e6caffc5?d=identicon)[jwillp](/maintainers/jwillp)

---

Top Contributors

[![jwillp](https://avatars.githubusercontent.com/u/5913483?v=4)](https://github.com/jwillp "jwillp (1 commits)")

---

Tags

gdprorkestraphppostgresqlprivacy

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/morebec-orkestra-postgresql-personal-information-store/health.svg)

```
[![Health](https://phpackages.com/badges/morebec-orkestra-postgresql-personal-information-store/health.svg)](https://phpackages.com/packages/morebec-orkestra-postgresql-personal-information-store)
```

###  Alternatives

[martin-georgiev/postgresql-for-doctrine

Extends Doctrine with native PostgreSQL support for arrays, JSONB, ranges, PostGIS geometries, text search, ltree, uuid, and 100+ PostgreSQL-specific functions.

4535.7M4](/packages/martin-georgiev-postgresql-for-doctrine)[flow-php/doctrine-dbal-bulk

Bulk inserts and updates for Doctrine DBAL

14361.1k3](/packages/flow-php-doctrine-dbal-bulk)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
