-
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] Still use connection string auth even if the connection string property is set as empty string #42880
Comments
Thank you for your feedback. Tagging and routing to the team member best able to assist. |
Another problem is that for But for |
FYI: More information about environment variable used in Spring Boot can be found here: https://github.com/azure-javaee/azure-dev/wiki/Knowledge-Sharing#2-sometimes-the-environment-variable-not-take-effect-in-spring-boot-application |
The behavior is not expected, I opened an issue on SCS side, see more from spring-cloud/spring-cloud-stream#3039 |
This problem also exists in Service Bus. Lines 53 to 59 in e9953c1
I'll reopen this issue. Hi, @moarychan |
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: