Skip to content

Commit 54395b2

Browse files
authored
Disable local auth on Azure SignalR (#9891)
* Disable local auth by default * Fix tests
1 parent 7a1078b commit 54395b2

File tree

5 files changed

+8
-3
lines changed

5 files changed

+8
-3
lines changed

playground/signalr/SignalR.AppHost/signalrDefault.module.bicep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ resource signalrDefault 'Microsoft.SignalRService/signalR@2024-03-01' = {
1010
'*'
1111
]
1212
}
13+
disableLocalAuth: true
1314
features: [
1415
{
1516
flag: 'ServiceMode'

playground/signalr/SignalR.AppHost/signalrServerless.module.bicep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ resource signalrServerless 'Microsoft.SignalRService/signalR@2024-03-01' = {
1010
'*'
1111
]
1212
}
13+
disableLocalAuth: true
1314
features: [
1415
{
1516
flag: 'ServiceMode'

src/Aspire.Hosting.Azure.SignalR/AzureSignalRExtensions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ public static IResourceBuilder<AzureSignalRResource> AddAzureSignalR(this IDistr
8383
}
8484
],
8585
CorsAllowedOrigins = ["*"],
86-
Tags = { { "aspire-resource-name", infrastructure.AspireResource.Name } }
86+
Tags = { { "aspire-resource-name", infrastructure.AspireResource.Name } },
87+
DisableLocalAuth = true,
8788
});
8889

8990
infrastructure.Add(new ProvisioningOutput("hostName", typeof(string)) { Value = service.HostName });

tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureSignalRExtensionsTests.AddAzureSignalR#00.verified.bicep

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@description('The location for the resource(s) to be deployed.')
1+
@description('The location for the resource(s) to be deployed.')
22
param location string = resourceGroup().location
33

44
resource signalr 'Microsoft.SignalRService/signalR@2024-03-01' = {
@@ -10,6 +10,7 @@ resource signalr 'Microsoft.SignalRService/signalR@2024-03-01' = {
1010
'*'
1111
]
1212
}
13+
disableLocalAuth: true
1314
features: [
1415
{
1516
flag: 'ServiceMode'

tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureSignalRExtensionsTests.AddServerlessAzureSignalR#00.verified.bicep

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@description('The location for the resource(s) to be deployed.')
1+
@description('The location for the resource(s) to be deployed.')
22
param location string = resourceGroup().location
33

44
resource signalr 'Microsoft.SignalRService/signalR@2024-03-01' = {
@@ -10,6 +10,7 @@ resource signalr 'Microsoft.SignalRService/signalR@2024-03-01' = {
1010
'*'
1111
]
1212
}
13+
disableLocalAuth: true
1314
features: [
1415
{
1516
flag: 'ServiceMode'

0 commit comments

Comments
 (0)