Prompt for userId and password in commandline mode #724
Comments
Thank you for your suggestion. You can always pass these in with -user=xzy -password=blablabla with dmeans there is no need to hardcode these in files. I don't want to go beyond this. Won't fix. |
The command line arguments are not secure as they can be captured by things such as shell history and other accounting tools. This is a serious issue. |
@akhudek You can put them in a config file to eliminate this issue. |
Unfortunately we need to operate in some environments where we cannot store cleartext passwords in files due to regulations. We'll probably resort to building our own command line client wrapper to get around this problem. It would certainly be helpful to have an option to prompt for a password in the distributed command line client though. |
Fair point. Reopening. |
Pull request for fix submitted. I'm new to the GitHub process. Hopefully it gets accepted and released soon. |
This has now been fixed. Prompting will happen automatically if either user or password have not been supplied via any other means. Cheers |
Hi axelfontaine, |
Hello, flyway.conf
|
I downloaded the latest client as well and verified this is not working. I pulled the latest code in order to debug it but can't seem to build it due to missing dependencies: Building flyway-core: The only version of sqlline available in maven central is version 1.1.9. Building flyway-commandline: If it takes another 9 months to get a release with this in it, I'm going to be very frustrated. |
I moved to liquibase since this feature is not working in flyway. Thanks, Sadhana From: Steven Zgaljic [mailto:notifications@github.com] Hello, flyway.conf [szxnyc@orbiter scripts]$ flyway info ERROR: Unable to obtain Jdbc connection from DataSource (jdbc:mysql://localhost:3306/mydb) for user 'devuser': Could not connect: Access denied for user 'devuser'@'localhost' (using password: NO) — |
Build instructions are available here: https://flywaydb.org/documentation/contribute/code/setup and here https://flywaydb.org/documentation/contribute/code/database You can avoid all those DB-specific dependencies by using -DskipTests |
@axelfontaine Thanks for the fix. When might we see an official release build? Also for the sake of trying to get this thing to build, it still tries to build tests and fails finding sqlline. Per https://maven.apache.org/surefire/maven-surefire-plugin/examples/skipping-test.html, -DskipTests only skips execution, not compile. I tried both -DskipTests and -Dmaven.test.skip=true with no change in the compile error. So, it still seems to have a non-test dependency that requires sqlline:sqlline:1.1.8 (which is no longer available in Maven Central). I've included abbreviated output below of each command: C:\Flyway> mvn -version
C:\Flyway> mvn install -P-InstallableDBTest -P-CommercialDBTest
C:\Flyway> mvn clean compile -DskipTests -Dmaven.test.skip=true
|
@PredatorVI I made the build work with running this command:
The first part I got from the docs: The second part is from the CLI maven pom: And I can confirm the issue is gone for me (mysql) |
I think it is difficult to implement userId and password encryption in flyway.conf file without making other compromises such as exposing encryption keys. How about if in commandline mode flyway prompts user for database credentials? That would still be very secure compared to storing in clear text in conf file.
The text was updated successfully, but these errors were encountered: