Download the PHP package promenadeco/doctrine-aws-auth without Composer
On this page you can find all versions of the php package promenadeco/doctrine-aws-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download promenadeco/doctrine-aws-auth
More information about promenadeco/doctrine-aws-auth
Files in promenadeco/doctrine-aws-auth
Package doctrine-aws-auth
Short Description RDS authentication using IAM for Doctrine DBAL/ORM
License Apache-2.0
Informations about the package doctrine-aws-auth
Doctrine AWS Authentication
This library provides Amazon RDS database authentication using IAM for Doctrine DBAL / ORM.
Features:
- RDS auth via IAM using short-lived tokens
- Token caching (for 10 min by default)
- Support of EC2 and ECS environments
- Support of PDO and MySQLi drivers
Usage
Install the package using Composer:
Enable IAM authentication in cleartext using the following environment variables:
Doctrine ORM
Register the DBAL driver middleware in Doctrine ORM:
Encryption
Connection encryption is necessary to secure transmission of credentials as cleartext.
The SSL configuration differs between drivers, for example:
Caching
Activate token caching to stay within rate limits and improve performance:
By default, tokens are good for 15 min and are cached for 10 min to be renewed well ahead of their expiration.
Symfony
Register the DBAL driver middleware in config/services.yaml
:
Caching
Activate the token caching and adjust its lifetime as needed:
Make sure tokens are valid some time beyond their cache expiration to compensate for potential clock drift.
Limitations
IAM authentication relies on database client sending credentials in cleartext without hashing.
The implementation has only been tested on MySQL. Other RDBMS may have their own unique limitations.
Resources
Related resources with useful information:
- sators/connect.php
- lead/doctrine-rds-iam-auth
- AWS Documentation
- AWS Knowledge Center
- AWS User Guide
- MySQL Documentation
Contributing
Pull Requests with fixes and improvements are welcome!
License
Copyright © Promenade Group. All rights reserved.
Licensed under the Apache License, Version 2.0.
All versions of doctrine-aws-auth with dependencies
aws/aws-sdk-php Version ^3.225
doctrine/dbal Version ^3.3
psr/cache Version ^3.0