Download the PHP package tacticmedia/rds-auth-middleware without Composer
On this page you can find all versions of the php package tacticmedia/rds-auth-middleware. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tacticmedia/rds-auth-middleware
More information about tacticmedia/rds-auth-middleware
Files in tacticmedia/rds-auth-middleware
Package rds-auth-middleware
Short Description Doctrine DBAL driver middleware for Amazon RDS: IAM token authentication and master-password refresh from Secrets Manager.
License MIT
Informations about the package rds-auth-middleware
Doctrine middleware for RDS authentication
TL;DR: Doctrine middleware that bridges the gap between Doctrine's convenience and AWS RDS's advanced security features: IAM authentication and automatic password rotation. Use this bridge to improve your baseline security posture with minimal effort.
Important: Symfony users should install tacticmedia/rds-auth-bundle instead, which configures this package through bundle configuration.
A Doctrine DBAL driver middleware that supplies the database credentials for an Amazon RDS instance. At connection time, it selects one of three modes:
- When an IAM username is configured: replace the user and password with a short-lived RDS IAM authentication token.
- When the Secret ARN is configured: connect with the configured password; when the database rejects it, read the current password from Secrets Manager and retry once. This recovers from automated RDS
ManageMasterUserPasswordrotation without a deployment, and an optional PSR-14 dispatcher receives aConfiguredPasswordOutdatedevent so the application can alert or redeploy. - Neither configured: pass the connection parameters through unchanged.
Before you choose IAM authentication, read its limitations: AWS requires 300 to 1000 MiB extra database memory, which rules out small instances. The managed password mode exists for exactly those deployments: an automatically rotated password is still better than a fixed one.
Installation
Quick start
Documentation
- Getting started - requirements, installation, wiring, mode selection
- IAM token authentication - token flow, AWS-side setup, TLS, limitations
- Managed password - Secrets Manager rotation recovery, failure detection
- Caching - PSR-6 behaviour, TTLs, invariants, key format
- Database engines - engine detection, ports, TLS per engine
- Architecture - class map, connection flow, design decisions
- Testing - suites, Docker services, environment variables, fixtures
Versioning
This package follows semantic versioning. The public API is RdsAuthMiddleware, RdsIamTokenProvider, RdsSecretPasswordProvider, RdsIamTokenGenerator, DatabaseEngine, and ConfiguredPasswordOutdated. RdsAuthMiddleware::wrap() builds RdsAuthDriver; construct it directly at your own risk, because its constructor can take new arguments in a minor release.
Releases are listed in CHANGELOG.md.
Development
See docs/testing.md for the Docker services, environment variables, and reference fixtures.
Contributions
Non-LLM-slop contributions and issues are most definitely welcome.
License
MIT. See LICENSE.
One more thing
This package is brought to you by Tactic Media, a South Australian software development business.
We love to help businesses become more efficient by automating tasks that shouldn't have been done by a human in the first place.
Head over to our website to check out what we do, and if you think we can help you give your employees more time to spend on something more creative, let's talk
All versions of rds-auth-middleware with dependencies
async-aws/core Version ^1.28
async-aws/secrets-manager Version ^2.0
doctrine/dbal Version ^3.10 || ^4.0
psr/cache Version ^2.0 || ^3.0
psr/clock Version ^1.0
psr/event-dispatcher Version ^1.0