3

I am looking for a way how to implement authentication and authorization fo several applications.

  • I have one main application and several child application.
  • I have only one domain so I access my child applications like a mydomain.com/app1.

My goal:

  • Use one account for all web applications
  • Have specific permission for each user, for each application
  • Implement register, login views only once.

My thoughts are: - Create one WebApp/API which will maintain user accounts - Call this webapp from other apps

I was googling a lot and I found some technologies which could be useful:

  • Jwt bearer token - generate token with claims and in each app implement logic which claims are necessary for specific policy
  • Identity server 4

I am so confused from identity server so I don't undestand how to use it (but according to description I thnik it could help to solve my problem)

Something like this scenario:

  1. Request web page
  2. WebApp checks authentication (proprably Jwt token?) if user is not authenticated call auth server --> some login page
  3. After authentication Jwt is generated, Jwt & webpage from web app is returned to user

enter image description here

I saw lot of samples, but most of them are for fronted backend solutions, mobile applications etc..

I would like to use simple MVC, Razor pages apps..

Are my thoughts right or it should be done in other way? Could you recommend me some technologies, tutorials how to achieve this?

Thank you very much!

  • 1
    A bunch of tutorials is available in the end of IdentityServer documentation. Take a look here: - http://docs.identityserver.io/en/latest/misc/training.html - http://docs.identityserver.io/en/latest/misc/videos.html Also, here is a post that I found interesting few days ago: - https://stackoverflow.com/a/42475868/1319086 Hope it helps you a little. – Jonatan Dragon Apr 05 '19 at 08:35
  • If you want specific permissions then you need to look into externalized authorization / [tag:abac] / [tag:xacml]. identityserver will only give you OIDC and OAuth which is great for identity but not for authorization. – David Brossard Apr 08 '19 at 16:32

0 Answers0