abp icon indicating copy to clipboard operation
abp copied to clipboard

Hangfire Dashboard - Unauthorized response.

Open agustinsilvano opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Description

I was not able to configure the AbpHangfireAuthorizationFilter on the UseAbpHangfireDashboard method. I read the documentation about the Dashboard setup, I followed all the steps described there but I'm still getting 401 when trying to access to the '/hangfire' path.

Reproduction Steps

  1. Download the code sample.
  2. Configure the database connection.
  3. Run migrations and launch the application.
  4. Login through swagger (using the default abp's admin account)
  5. By having a session logged in(having the corresponding session cookies properly configured), go to the {api_url}/hangfire
  6. You will get a 401 - Unauthorized error.

Question: Is that the expected flow to get access to the dashboard?

Expected behavior

By following the steps described above, the dashboard should be available for the current logged user.

Actual behavior

Is redirecting to a 401 Unauthorized page.

Regression?

No response

Known Workarounds

No response

Version

8.1.1

User Interface

Common (Default)

Database Provider

EF Core (Default)

Tiered or separate authentication server

Separate Auth Server

Operation System

macOS

Other information

I've been inspecting the AbpHangfireAuthorizationFilter (and also created a custom Authorization filter) and the information of the user's information is not available in the HttpContext

agustinsilvano avatar Apr 26 '24 20:04 agustinsilvano

hi

Your app only uses JwtBeareras authentication method. Please refer to qa links below:

https://support.abp.io/QA/Questions/5167/Hangfire-Authorization-Problem https://support.abp.io/QA/Questions/3199/Hangfire-Dashboard-Authorization-is-not-working

maliming avatar Apr 29 '24 02:04 maliming

Hi, do you know if this issue is still open?

Pantex9 avatar Aug 26 '24 23:08 Pantex9