Skip to content

🛠️ Refactor Authentication

Description

The current authentication implementation in the UserOrg component needs to be refactored to align with modern best practices in .NET Identity. This includes:

  1. Migration to JWT-based Authentication
    Replace the existing authentication mechanism with a secure and scalable JWT token-based approach using .NET Identity.
  2. RBAC Matrix Refactor
    Rework the current Role-Based Access Control (RBAC) matrix implementation to leverage .NET Identity policies. This will improve maintainability, scalability, and integration with ASP.NET Core's built-in authorization system.

Goals

  • Improve security and maintainability of the authentication flow.
  • Simplify role and permission management using policy-based authorization.

Tasks

  • Implement JWT token validation.
  • Integrate JWT authentication with .NET Identity.
  • Refactor RBAC matrix to use IAuthorizationPolicyProvider and custom policies.
  • Update UserOrg component to use the new authentication and authorization logic.
  • Add unit and integration tests for the new authentication flow.

References

image

Edited by Jan Křenek
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information