Multitenant JWT Validation

George Waters 21 Reputation points
2023-01-09T23:56:36.72+00:00

Hi,

I'm working on a multi-tenant net core 7 webapi, where each customer has its own database and I want each customer to have its own key to generate the jwt token, instead of having one for all.

I thought of having these keys in a database, but this means that, each request will have to check database and retrieve the key to validate jwt, this doesn't sounds good to me.

What would be the right way to achieve this?

Thanks in advance.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,158 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,422 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
294 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 55,686 Reputation points
    2023-01-10T19:04:39.913+00:00

    typically you would cache the keys.

    0 comments No comments