sahansera / securing-hangfire-dashboard

Securing Hangfire Dashboard in ASP.NET Core 3.1 with Endpoint Routing in Production

Home Page:https://sahansera.dev/securing-hangfire-dashboard-with-endpoint-routing-auth-policy-aspnetcore/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Securing Hangfire Dashboard in ASP.NET Core with a Custom Auth Policy

Securing Hangfire Dashboard in ASP.NET Core 3.1 with Endpoint Routing in Production.

Introduction

By default, if you try to access your Hangfire dashboard, it will work perfectly fine on your localhost because local requests are allowed. However, things can get a bit tricky when you want to secure your Dashboard.

This repo targets on providing a starting point to securing your Hangfire dashboard in production with .NET Core 3.1

With this approach, you can have a nicely decoupled way of protecting your Hangfire dashboard route. You can also move the authorisation logic to a custom extension method and inject your custom services as opposed to using a Hangfire’s authorisation filter.

Related Blog Post

https://sahansera.dev/securing-hangfire-dashboard-with-endpoint-routing-auth-policy-aspnetcore/

Questions? Bugs? Suggestions for Improvement?

Having any issues or troubles getting started? Get in touch with me

Support

Has this Project helped you learn something new? or helped you at work? Do Consider Supporting.

Buy Me A Coffee

Share it!

Please share this Repository within your developer community, if you think that this would make a difference! Cheers.

About the Author

Sahan Serasinghe

About

Securing Hangfire Dashboard in ASP.NET Core 3.1 with Endpoint Routing in Production

https://sahansera.dev/securing-hangfire-dashboard-with-endpoint-routing-auth-policy-aspnetcore/


Languages

Language:C# 67.5%Language:HTML 22.9%Language:CSS 8.2%Language:JavaScript 1.4%