Authentication in microservices

Consideration:

Code reuse VS. Fast operation

Code reuse can come at the cost of more time consuming transactions.

Logon

 

Partner Admin

Sensors

Interaction stats

User

Requests without valid token  are redirected to partner admin which presents logon screen

Distribute token

 

Partner Admin

Sensors

Interaction stats

User

Upon login token are distributed to user and stored by partner admin.

Requests with a token are checked against partner admin. Non valid tokens results in logon screen

Answering requests

 

Partner Admin

Sensors

Interaction stats

User

Valid tokens result in processing and answering requests. User id provided to apps by Partner Admin

The apps have  have their own databases, containing permissions for different users.

Alternative

 

Partner Admin

Sensors

Interaction stats

User

Upon login token is distributed to user and all apps, along with user id.

This reduces transactions, but requires to write token handling multiple times.

Authentication in microservices

By jmmodin

Authentication in microservices

  • 227