-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Microsoft SQL server token login and Flyway placeholder results in a login error. #3884
Comments
Would you be able to provide us with a minimal reproduction? |
I have the following configuration:
In powershell I retrieve the access token and add it to the environment variables: Then I execute the migration step:
This works correctly. Once I add an environment variable containing the FLYWAY_PLACEHOLDERS prefix the login fails. This also happends when I add the variable to the flyway.toml file:
The login works correctly again once I remove the placeholders |
Which version and edition of Flyway are you using?
Flyway Community Edition 10.11.1 by Redgate
If this is not the latest version, can you reproduce the issue with the latest one as well? (Many bugs are fixed in newer releases and upgrading will often resolve the issue)
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Command-line
Which database are you using? (Type & version)
Azure Microsoft SQL server
Which operating system are you using?
WIndows
What did you do? (Please include the content causing the issue, any relevant configuration settings, the SQL statement(s) that failed (if any), and the command you ran)
I am running into a login issue once I add a Flyway placeholder to the environment variable or to my toml file.
I use the token login from sql server by setting an environment variable FLYWAY_JDBC_PROPERTIES_accessToken.
This works correctly but once I add a Flyway placeholder I run into the error:
If I remove the error disappears when I remove the placeholder from the environment variables and the TOML file.
What did you expect to see?
That I can correctly login and execute my migration files
What did you see instead?
The error:
ERROR: Unable to obtain connection from database (jdbc:sqlserver://xxxxxx.database.windows.net:1433;databaseName=xxxxx) for user 'null': Login failed for
user ''. ClientConnectionId:a20e1e0f-02c5-4e12-a347-f35e1b777fc4
SQL State : S0001
Error Code : 18456
Message : Login failed for user ''. ClientConnectionId:a20e1e0f-02c5-4e12-a347-f35e1b777fc4
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user ''. ClientConnectionId:a20e1e0f-02c5-4e12-a347-f35e1b777fc4
The text was updated successfully, but these errors were encountered: