PHPackages                             noxlogic/dbalkeyrotate - 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. noxlogic/dbalkeyrotate

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

noxlogic/dbalkeyrotate
======================

DBAL driver for AWS secrets manager key rotation

12PHP

Since Apr 26Pushed 6y ago1 watchersCompare

[ Source](https://github.com/jaytaph/DbalKeyRotate)[ Packagist](https://packagist.org/packages/noxlogic/dbalkeyrotate)[ RSS](/packages/noxlogic-dbalkeyrotate/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

DBAL driver for automatic retrieval of credentials through AWS secretsmanager.

> This is a highly experimental POC library. Do not use in production!

This library will automatically fetch credentials from the AWS secrets manager. The secrets manager allows easy key rotating, and this library will fetch any new credentials without any changes your code or reboots of your instance, pod or container.

Because key retrieval is a time-consuming operation, the fetched credentials are stored inside a cache. The driver will first try the cached credentials and only when these credentials fail to connect, it will fetch credentials from the secrets manager. After a specific amount of attempt, the driver will fail if no correct credential can be retrieved.

If you have set a local username and password and no cached credentials are present, these local credentials will be tried first. If you do not need this behaviour, you can leave the username and password empty.

Usage
=====

[](#usage)

```
$connectionParams = [
    'dbname' => 'mysql',
    'user' => '',
    'password' => '',
    'host' => 'mydb.1234.eu-west-1.rds.amazonaws.com',
    'driverClass' => KeyRotate\Driver::class,
    'driverOptions' => [
        'cache' => new PhpFileCache(sys_get_temp_dir()),
        'secretId' => /secret/database-2
        'retries' => 5,
        'awsOptions' => [],
    ]
];

```

The driver class needs a few options in order to work:

cache: The drivers needs an mandatory cache service in order to function. This is a class that implements Doctrine\\Cache.

secretId: The actual secret that must be retrieved.

retries: The number of tries of database connection and key fetching that must be done before giving up.

awsOptions: An array of AWS options send to the AWS client. This chould consist of region, profile etc. Probably not needed when running on an ecs/ec2 instance where AWS credentials and information are automatically fetched by the AWS client.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/19b14ca62f80ce8c77ae749ddf04e2d4077451db9f701f3bd37dec1dc950c76b?d=identicon)[JayTaph](/maintainers/JayTaph)

---

Top Contributors

[![jaytaph](https://avatars.githubusercontent.com/u/241458?v=4)](https://github.com/jaytaph "jaytaph (5 commits)")

---

Tags

awsdbalsecretsmanager

### Embed Badge

![Health badge](/badges/noxlogic-dbalkeyrotate/health.svg)

```
[![Health](https://phpackages.com/badges/noxlogic-dbalkeyrotate/health.svg)](https://phpackages.com/packages/noxlogic-dbalkeyrotate)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M543](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M209](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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