Share your experience with Database DevOps by taking part in the 2021 State of Database DevOps survey Take the survey

Authentication

In order to log in to your database, the typical approach is to set your username and password in the Flyway configuration file. This however has some concerns:

  • These properties are stored in plain text - anyone can see your credentials
  • Your credentials must be supplied in every configuration file you use
  • You may not have access to these credentials, and someone else needs to configure them securely

Flyway comes with additional authentication mechanisms that tackle these concerns.

Environment Variables

By storing your username and password in the environment variables FLYWAY_USER and FLYWAY_PASSWORD respectively, they can be configured once and used across multiple Flyway configurations. They can also be set by someone who has the relevant access, so they do not end up being leaked to any unwarranted parties.

Database Specific Authentication

Oracle

SQL Server and Azure Synapse

MySQL

PostgreSQL

Snowflake

AWS Secrets Manager