Azure-Functions
Azure-Functions copied to clipboard
Fn V4 - service bus trigger - identity based connection - corporate proxy - local dev experience
We are looking into switching over to use (user) identity when connecting to service bus namespace - as part of this exercise we are also investigating local development experience
looking at https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference?tabs=blob#local-development-with-identity-based-connections, we see that az cli option is supported - we already use it for other clients that we manage within the app (e.g. key vault client etc.)
I have configured in the ServiceBusConnection__fullyQualifiedNamespace property so I can see that the runtime is attempting to connect to the namespace
during handshake, we get the following - it would almost seem that default azure credential chain token is used internally and it tries its chain - attempting to reach managed identity endpoint first - proxy however does not cooperate (service bus namespace redacted); it seems that the sequence as per the link above is not attempted first
Message processing error (Action=Receive, EntityPath=mcr.domain.eventing.commands.ipc.closeipctransactionwithactuals/Subscriptions/CloseIPCTransactionFunction, Endpoint=XXX.servicebus.windows.net) [2022-05-11T10:22:03.499Z] Azure.Identity: ManagedIdentityCredential authentication failed: Managed Identity response was not in the expected format. See the inner exception for details. [2022-05-11T10:22:03.501Z] Status: 407 (Proxy Authentication Required) [2022-05-11T10:22:00.406Z] Content-Type: text/html [2022-05-11T10:22:00.407Z] Content-Type: text/html [2022-05-11T10:22:02.722Z] [2022-05-11T10:22:02.729Z] Content-Length: 2578
proxy configured via environment variables at machine level (HTTP_PROXY, HTTPS_PROXY) azure core tools - 4.0.3928 service bus extension package at version 5.3.0
Is this supported scenario at all? Any additional setting/config I need to provide?
I'm also at the same point, did someone managed to achieve to connect?