{"id":17158253,"url":"https://github.com/jaytaph/dbalkeyrotate","last_synced_at":"2026-05-01T10:32:25.443Z","repository":{"id":57028870,"uuid":"258833356","full_name":"jaytaph/DbalKeyRotate","owner":"jaytaph","description":"DBAL driver for AWS secrets manager key rotation","archived":false,"fork":false,"pushed_at":"2020-04-26T10:30:15.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-29T19:23:40.430Z","etag":null,"topics":["aws","dbal","secretsmanager"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaytaph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-25T17:24:46.000Z","updated_at":"2023-02-07T09:27:52.000Z","dependencies_parsed_at":"2022-08-23T16:20:43.839Z","dependency_job_id":null,"html_url":"https://github.com/jaytaph/DbalKeyRotate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaytaph%2FDbalKeyRotate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaytaph%2FDbalKeyRotate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaytaph%2FDbalKeyRotate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaytaph%2FDbalKeyRotate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaytaph","download_url":"https://codeload.github.com/jaytaph/DbalKeyRotate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245288481,"owners_count":20590894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","dbal","secretsmanager"],"created_at":"2024-10-14T22:10:57.805Z","updated_at":"2026-05-01T10:32:25.373Z","avatar_url":"https://github.com/jaytaph.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"DBAL driver for automatic retrieval of credentials through AWS secretsmanager.\n\n\u003e This is a highly experimental POC library. Do not use in production!\n\nThis library will automatically fetch credentials from the AWS secrets manager. The secrets manager allows easy \nkey rotating, and this library will fetch any new credentials without any changes your code or reboots of your \ninstance, pod or container. \n\nBecause key retrieval is a time-consuming operation, the fetched credentials are stored inside a cache. The driver \nwill first try the cached credentials and only when these credentials fail to connect, it will fetch credentials \nfrom the secrets manager. After a specific amount of attempt, the driver will fail if no correct credential can be \nretrieved.\n\nIf you have set a local username and password and no cached credentials are present, these local credentials will \nbe tried first. If you do not need this behaviour, you can leave the username and password empty.\n\n\n\n# Usage\n\n    $connectionParams = [\n        'dbname' =\u003e 'mysql',\n        'user' =\u003e '',\n        'password' =\u003e '',              \n        'host' =\u003e 'mydb.1234.eu-west-1.rds.amazonaws.com',\n        'driverClass' =\u003e KeyRotate\\Driver::class,\n        'driverOptions' =\u003e [\n            'cache' =\u003e new PhpFileCache(sys_get_temp_dir()),\n            'secretId' =\u003e /secret/database-2\n            'retries' =\u003e 5,\n            'awsOptions' =\u003e [],\n        ]\n    ];\n\nThe driver class needs a few options in order to work:\n\ncache:\n    The drivers needs an mandatory cache service in order to function. This is a class that implements Doctrine\\Cache.\n\nsecretId:\n    The actual secret that must be retrieved.\n\nretries:\n    The number of tries of database connection and key fetching that must be done before giving up.\n   \nawsOptions:\n    An array of AWS options send to the AWS client. This chould consist of region, profile etc. Probably not needed\n    when running on an ecs/ec2 instance where AWS credentials and information are automatically fetched by the AWS \n    client.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaytaph%2Fdbalkeyrotate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaytaph%2Fdbalkeyrotate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaytaph%2Fdbalkeyrotate/lists"}