-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[BUG] Java azure-identity-extensions 1.1.21 - Database Connection - PSQLException: FATAL: The access token does not have a valid audience claim. #42632
Comments
@billwert could you follow up with @coding-jj |
@coding-jj Hello! Is it possible for you to collect a log for me? Enable the default logger as described here. Use |
We analyzed the JWT and found out, the the audience in the JWT for my admin user to access the database is The error message We assume that the audience in azure-identity-extension 1.1.21 has an extra slash and so the audience can't be verified.
|
The difference with JWT Version
JWT Version
|
Thank you so much for the analysis here! I'll dig in and get back to you shortly. |
Describe the bug
We have Database Access with "Managed Identity" and Azure Identity Extention 1.1.21 configured.
The solution worked perfectly with Azure Identity Extention 1.1.20 and in 1.1.21 we get the Error:
"PSQLException: FATAL: The access token does not have a valid audience claim."
Exception or Stack Trace
To Reproduce
Use Azure Postgres Database with Managed Identity and Postgres AuthenticationPluginClassName
jdbc:postgresql://<Azure Porstgres flex Server>:5432/postgres?sslmode=require&authenticationPluginClassName=com.azure.identity.extensions.jdbc.postgresql.AzurePostgresqlAuthenticationPlugin
Code Snippet
Use jdbc String for Database:
jdbc:postgresql://<Azure Porstgres flex Server>:5432/postgres?sslmode=require&authenticationPluginClassName=com.azure.identity.extensions.jdbc.postgresql.AzurePostgresqlAuthenticationPlugin
Expected behavior
Authetication is possible
Setup (please complete the following information):
openjdk 21.0.5 2024-10-15 LTS
OpenJDK Runtime Environment Zulu21.38+21-CA (build 21.0.5+11-LTS)
OpenJDK 64-Bit Server VM Zulu21.38+21-CA (build 21.0.5+11-LTS, mixed mode, sharing)
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: