Skip to content
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

Working solution for Flyway missing when using password-less authentication towards Azure Postgres. #732

Open
DanielWikman opened this issue Nov 6, 2023 · 2 comments
Labels
azure-spring All azure-spring related issues
Milestone

Comments

@DanielWikman
Copy link

DanielWikman commented Nov 6, 2023

Is your feature request related to a problem? Please describe.

Yes, using password-less with managed identity or workload identity according to your guides together with Flyway fails
since Flyway picks up an HickariDataSource that is broken, and it will try to connect with an empty password to a password-less Postgres...

So what I end up doing is to create a subclass of HickariDataSource that returns a password
created by a ChainedCredentialBuilder... And a configuration class that creates that datasource. Then
that is passed successfully to Flyway...

Describe the solution you'd like

I would like an example of how to use these together without having to override half the datasource domain.
If I use your guides for passoword-less and set the spring.datasource.* and spring.cloud.azure.* according to
your guides Flyway should work out of the box.

Describe alternatives you've considered

As you saw above I got it working by overriding all your settings and autoconfigurations when creating my own
datasource...

Additional context

@DanielWikman DanielWikman added the azure-spring All azure-spring related issues label Nov 6, 2023
@saragluna
Copy link
Contributor

@DanielWikman could you help provide a project with minimal setups for us to reproduce the issue?

@jgresc
Copy link

jgresc commented Jan 23, 2024

Would also be interested how that works. I always got the error: The server requested password-based authentication, but no password was provided by plugin null\ from the HikariDataSource

@saragluna saragluna added this to the 2025-01 milestone Nov 29, 2024
@saragluna saragluna modified the milestones: 2025-01, 2025-02 Dec 27, 2024
@saragluna saragluna modified the milestones: 2025-02, 2025-03 Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure-spring All azure-spring related issues
Projects
None yet
Development

No branches or pull requests

3 participants