We're trying to figure out a best practice for IPC authentication and authorization. I'll explain. We have a micro-services based architecture SaaS with a dedicated service for authentication. This service is responsible for doing the authentication and managing auth tokens (JWTs).
Everything works perfectly good with users that login and start to consume resources from the different services.
The question now is how to authentication and authorize requests which being initiated by other services (without the context of a specific user)?
- Should we generate a dedicated user per service and treat it like any other user in the system (with appropriate permissions)?
- Should we have a "hard coded"/dynamic token deployed among the services?
- Any other ideas?
Our biggest concern is such tokens/passwords will be compromised at some point since requests from one service to another is treated with high level of permissions.
Cheers,