Azure/azure-relay-bridge

Cannot use non-authenticated hybrid connections

paveliak opened this issue · 0 comments

azbridge uses DefaultAzureCredentialTokenProvider when credentials are omitted. AzureIdentity library will then iterate over a set of different providers trying to find valid credentials. If none are found then it throws which you can see in the verbose log.

This can be reproduced on MacOS but I would expect it to fail on other platforms too, just make sure to run on the local machine (not an Azure VM) because Azure provides IMDS which would be used by AzureIdentity and no exception would be reported.

Repro:

  1. Create non-authenticated hybrid connection
  2. Start azbridge on MacOS ./azbridge -L 8080:myconnection -e sb://mynamespace.servicebus.windows.net -v
  3. Poke the connection with nc 127.0.0.1 8080 -v
  4. Observe exception in the azbridge output
LocalForwardBridgeConnectionFailed, 00000000-0000-0000-0000-000000000000, { bridgeActivity = Microsoft.Azure.Relay.Bridge.EventTraceActivity, exception = Microsoft.Azure.Relay.RelayException: DefaultAzureCredential failed to retrieve a token from the included credentials.
See the troubleshooting guide for more information.
https://aka.ms/azsdk/net/identity/defaultazurecredential/troubleshoot
<REST OF THE STACK REDACTED>