[BUG] Still use connection string auth even if the connection string property is set as empty string #42880
Open
3 tasks done
Labels
azure-spring
All azure-spring related issues
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Describe the bug
Even if the connection string property is set as empty, the application still tries to auth via connection string.
The application is a simple spring cloud stream + kafka, refering to the sample project https://github.com/Azure-Samples/azure-spring-boot-samples/tree/main/eventhubs/spring-cloud-azure-starter/spring-cloud-azure-sample-eventhubs-kafka.
In the application.yaml, when we specify the auth as follows, we want to use managed identity auth, instead of connection string (we leave it empty), but the application still try to use connection string for auth, causing it cannot startup.
Exception or Stack Trace
In the following file, when the property is set as empty, it should not enter the method. but now it will execute this method even if empty.
To Reproduce
Steps to reproduce the behavior:
Code Snippet
Add the code snippet that causes the issue.
Expected behavior
When setting connection string as empty, it should auto-use MI configuration for auth.
Screenshots
If applicable, add screenshots to help explain your problem.
Setup (please complete the following information):
If you suspect a dependency version mismatch (e.g. you see
NoClassDefFoundError
,NoSuchMethodError
or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:mvn dependency:tree -Dverbose
)Additional context
Add any other context about the problem here.
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: