Disable SignalR and add authorization to WorkflowInstanceHub

SignalR functionality is temporarily disabled until Elsa Studio sends authenticated requests. Additionally, added the [Authorize] attribute to WorkflowInstanceHub to enforce authorization on workflow events.
This commit is contained in:
Sipke Schoorstra 2024-10-31 20:10:06 +01:00
parent 575892c44f
commit fa2e615eb2
2 changed files with 3 additions and 1 deletions

View file

@ -63,7 +63,7 @@ const bool useMemoryStores = false;
const bool useCaching = true;
const bool useAzureServiceBus = false;
const bool useReadOnlyMode = false;
const bool useSignalR = true;
const bool useSignalR = false; // Disabled until Elsa Studio sends authenticated requests.
const WorkflowRuntime workflowRuntime = WorkflowRuntime.ProtoActor;
const DistributedCachingTransport distributedCachingTransport = DistributedCachingTransport.ProtoActor;
const MassTransitBroker massTransitBroker = MassTransitBroker.Memory;

View file

@ -1,6 +1,7 @@
using Elsa.Workflows.Api.RealTime.Contracts;
using Elsa.Workflows.Runtime;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.SignalR;
namespace Elsa.Workflows.Api.RealTime.Hubs;
@ -9,6 +10,7 @@ namespace Elsa.Workflows.Api.RealTime.Hubs;
/// Represents a SignalR hub for receiving workflow events on the client.
/// </summary>
[PublicAPI]
[Authorize]
public class WorkflowInstanceHub : Hub<IWorkflowInstanceClient>
{
private readonly IWorkflowRuntime _workflowRuntime;