-
Notifications
You must be signed in to change notification settings - Fork 808
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
AspNetCore.HealthChecks.NpgSql (Postgres) health check and Managed Identity on Azure #1813
Comments
What kind of support are you talking about? Could you provide example? |
It is basically this scenario: https://learn.microsoft.com/en-us/azure/app-service/tutorial-connect-msi-azure-database?tabs=sqldatabase%2Csystemassigned%2Cnetfx%2Cwindowsclient So we are using PostgreSQL on Azure, and do not want to use username/password as authentication, but rather Azure Managed Identity. |
Hi @steingran, what failures are you getting? As far as I can see, the healtcheck supports a connection string, and the managed identity is just a way of creating the credentials for the connectionstring without the need for storing the credentials, e.g.
(Majority of the code was copied from the tutorial you linked) |
The issue with this is that the token has an expiration time. After that the connectionString is not valid anymore |
I have some working code for this issue. I will provide a PR for that issue. There shouln't be any breaking changes for existings code |
The current health check for Postgres (AspNetCore.HealthChecks.NpgSql, version 6.0.2) does not support Azure Managed Identity tokens as far as I can see.
Are there any workarounds for this, or any plans on adding support for Managed Identity tokens?
Using Managed Identity tokens is increasingly normal to use, so supporting this scenario would be great.
The text was updated successfully, but these errors were encountered: