Azure / Azure/Azure-Functions

Fn V4 - service bus trigger - identity based connection - corporate proxy - local dev experience

Open
#2,209 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
PowerShell
Stars
1.1k
Forks
215
Avg merge
4h 2m
Merged PRs (30d)
1

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.