Multiple external clients for users on identityserver4

Viewed 1499

I am working on a project that allows a user to create a user to create app keys or secrets so that specific services can be used by external clients. A user can create multiple secrets that they can choose to use across multiple clients.

For this I am planning to create a decoupled auth server that will use identityserver4.

What really holding me back is that I am not sure whether or not I should create an API layer at the auth server. The reason I am considering API at auth server is so that I can create sort of an admin portal client that will give the users a front-end for creating, renewing, and accessing their app keys/secrets. Even the admin portal is going to be a de-coupled angular application.

There are two things that are holding me back at the moment:

  1. I am not sure if it's a good or safe idea to serve this data via an api layer. From what I understand, identityserver will not be able to provide functionality that allows me to access a list of a user's clients through an endpoint but please correct me if I'm wrong and there's a better way to approach this.
  2. I know we can easily create new clients and persist it into the database with identityserver4 and I am planning to use ClientCredentials grant types for user clients, but is there a link at the database and identity level between a user and a client? Or will I need to create that functionality by myself?

So far I've looked but I have not bee able to find examples that are similar to my situation with identityserver4

Sorry for the noob question, I am just getting into identityserver and web security in general so many of these concepts are still very new to me.

1 Answers

For number 1, I would say yes you can create an API layer to server data. If you check the IdenttiyServer4 AdminUI, Rock Solid has also use the admin API behind the UI. But you must consider encryption, TLS and other security mechanism to keep this safe.

AFIK for number 2, there are no links at identity level between a user and a client. You have to create that by yourselves.

Basically, you need a system that supports Multitenancy. I have achieved that by adding a TenantId field in the AspNetIdentity user table. And also added the tenant Id to claim list.

Please do not hesitate to correct me if i am wrong.

Related