Skip to content

Dynamic database credentials with RDS IAM DB authentication #1789

Open
@tokyowizard

Description

@tokyowizard

Bug report

Required System information

  • Node.js version: v16
  • NPM version: 8.5.0
  • Strapi version: 4.2.2
  • Database: PostgreSQL
  • Operating system: Alpine
  • Is your project Javascript or Typescript: Typescript

Describe the bug

Could Strapi include exposing the expirationChecker function in the database connection configuration?

We have an Amazon RDS for PostgreSQL instance for our Strapi database.
We would like to use IAM database authentication for PostgreSQL, where we can generate a password token that is good for 15 minutes to login to the database, instead using a fixed password.
Strapi is using Knex to connect to the database.
Knex has implemented an expirationChecker function to check if the token has expired. See also expirationChecker in the connection config: [1] [2]

Steps to reproduce the behavior

  1. Be able to include expirationChecker in the connection parameters (or some setting) to be able to generate AWS IAM DB tokens to connect to the database.

Expected behavior

Be able to use AWS IAM DB authentication to generate a password token to update the password before connection.

Screenshots

N/A

Code snippets

N/A

Additional context

N/A

Metadata

Metadata

Labels

issue: docs/instructionsIssues about incorrect instructions found on docs.strapi.ioseverity: mediumIf it breaks the basic use of the product but can be worked around

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions