Rafaqat Ali
Rafaqat Ali

Reputation: 718

How to add authentication to ELSA dashboard?

Can anyone guide me on how can we add authentication to Elsa's dashboard? Right now, anonymous users can see the workflows and create. I want to restrict this behavior to specific users?

Upvotes: 4

Views: 1886

Answers (1)

Zoltan Grose
Zoltan Grose

Reputation: 51

The specifics probably depend on your .net version, but I believe what you want to do is set a fallback policy so that pages/controllers without [Authorize] attribute still require authentication.

Grabbed from https://learn.microsoft.com/en-us/aspnet/core/security/authorization/secure-data?view=aspnetcore-5.0

services.AddAuthorization(options =>
    {
        options.FallbackPolicy = new AuthorizationPolicyBuilder()
            .RequireAuthenticatedUser()
            .Build();
    });

Upvotes: 1

Related Questions