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

AzureWebJobs keys and values documentation #3827

Open
linde12 opened this issue Sep 18, 2024 · 1 comment
Open

AzureWebJobs keys and values documentation #3827

linde12 opened this issue Sep 18, 2024 · 1 comment

Comments

@linde12
Copy link

linde12 commented Sep 18, 2024

Version

4.0.5455

Description

UPDATE: See comment below, issue was with local.settings.json configuration and poor documentation. I would like to keep this ticket to instead improve the documentation.

I am under the suspicion that the system certificate store is being ignored when using @app.queue_trigger

I am trying to connect to Azurite locally, and it works fine with HTTP and the HTTP connection string, but when i switch to HTTPS and run func start it times out after a while and gives me the following error message:

[2024-09-18T07:59:59.384Z] An unhandled exception has occurred. Host is shutting down.
[2024-09-18T07:59:59.384Z] Azure.Core: An error occurred while sending the request. System.Net.Http: An error occurred while sending the request. System.Net.Http: The response ended prematurely.

I do not want to use HTTP because i want to use DefaultAzureCredential (which in my case will fetch credential through managed identity) for my QueueClient which only works over HTTPS. However, over HTTPS the queue_trigger does not work. Also, fun thing to note is that i have to point my REQUESTS_CA_BUNDLE env var to my CA bundle to even make QueueClient from azure-storage-queue work (since i assumed it used requests under the hood) which is an annoyance but at least not a show stopper.

Steps to reproduce

I provided a minimally reproducible example over here: https://github.com/linde12/azure-functions-https-trigger-bug

Instructions in README.md. In short, im able to publish messages using QueueClient but @app.queue_trigger is unable to subscribe and times out (most likely due to certificates), but works if i instead use HTTP.

@linde12
Copy link
Author

linde12 commented Sep 18, 2024

I believe my local.settings.json as the cause - even though i had set Queue__queueServiceUri to the correct value, my value for AzureWebJobsQueue was still UseDevelopmentStorage=true which by points to HTTP, not HTTPS.

However, i was still able to publish messages just fine since QueueClient doesnt care about this (it uses the account_url from the constructor arguments) but for some reason @app.queue_trigger uses this connection string instead of my Queue__queueServiceUri

This is very confusing and i still see this as a bug (albeit not to do with certificates) - the documentation on these fields are also very brief to say the least, and i ended up having to look through source code.

Maybe we can clarify the documentation on these parameters? E.g. what "UseDevelopmentStorage=true" does, what the various "AzureWebJobsXXX" do and when they are used etc.

Why do i still have to create a "Queue__queueServiceUri"/pass a connection param to queue_trigger if now "AzureWebJobsQueue" is being used anyway?

@linde12 linde12 changed the title System certificate store ignored(?) AzureWebJobs keys and values documentation Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants