Description
We have a goal to disable local auth by default in our Azure integrations and only use managed identity.
AddAzureSignalR
should set the SignalRService
to have DisableLocalAuth=true
by default.
aspire/src/Aspire.Hosting.Azure.SignalR/AzureSignalRExtensions.cs
Lines 69 to 87 in fe64638
I attempted to do this myself, but when testing it with the signalr
playground app, the app was unable to make a connection. It kept spitting out this log:
info: Microsoft.Azure.SignalR.Connections.Client.Internal.WebSocketsTransport[1]
Starting transport. Transfer mode: Binary. Url: 'wss://signalrdefault-l4r7g7ruqcqbg.service.signalr.net/server/?hub=chathub&cid=7d6abec8-d857-49ce-ab97-9f30d6f378a8'.
info: Microsoft.Azure.SignalR.Connections.Client.Internal.WebSocketsTransport[6]
Transport is stopping.
info: Microsoft.Azure.SignalR.ServiceConnection[2]
Failed to connect to '(Primary)https://signalrdefault-l4r7g7ruqcqbg.service.signalr.net(hub=ChatHub)', will retry after the back off period. Error detail: The server returned status code '403' when status code '101' was expected.. The server returned status code '403' when status code '101' was expected.. Id: 7d6abec8-d857-49ce-ab97-9f30d6f378a8
warn: Microsoft.Azure.SignalR.StrongServiceConnectionContainer[2]
Hub 'ChatHub' is now disconnected from '(Primary)https://signalrdefault-l4r7g7ruqcqbg.service.signalr.net(hub=ChatHub)'. Please check log for detailed info.
info: Microsoft.Azure.SignalR.Connections.Client.Internal.WebSocketsTransport[1]
Starting transport. Transfer mode: Binary. Url: 'wss://signalrdefault-l4r7g7ruqcqbg.service.signalr.net/server/?hub=chathub&cid=3389cceb-fde5-4946-bb39-c42066131455'.
info: Microsoft.Azure.SignalR.Connections.Client.Internal.WebSocketsTransport[1]
Starting transport. Transfer mode: Binary. Url: 'wss://signalrdefault-l4r7g7ruqcqbg.service.signalr.net/server/?hub=chathub&cid=338d1cc3-9c97-413a-b197-d5c12c6cd708'.
info: Microsoft.Azure.SignalR.Connections.Client.Internal.WebSocketsTransport[1]
Starting transport. Transfer mode: Binary. Url: 'wss://signalrdefault-l4r7g7ruqcqbg.service.signalr.net/server/?hub=chathub&cid=a5e84e59-69ce-4c98-b6cf-525ce1b3bd60'.
info: Microsoft.Azure.SignalR.Connections.Client.Internal.WebSocketsTransport[1]
Starting transport. Transfer mode: Binary. Url: 'wss://signalrdefault-l4r7g7ruqcqbg.service.signalr.net/server/?hub=chathub&cid=b33992a8-6b46-49ba-80e5-32f0079f044a'.
info: Microsoft.Azure.SignalR.Connections.Client.Internal.WebSocketsTransport[6]
Transport is stopping.
info: Microsoft.Azure.SignalR.ServiceConnection[2]
Failed to connect to '(Primary)https://signalrdefault-l4r7g7ruqcqbg.service.signalr.net(hub=ChatHub)', will retry after the back off period. Error detail: The server returned status code '403' when status code '101' was expected.. The server returned status code '403' when status code '101' was expected.. Id: a5e84e59-69ce-4c98-b6cf-525ce1b3bd60
cc @vicancy