- I have several worker services that are running background tasks.
- I have an Identity Service that authenticates and create JWT tokens.
- The worker services need to consume REST API's that are authorized through the JWT tokens (step 2).
- My problem: I need to authenticate the worker service at the Identity Service in order to get a valid JWT token so that it can consume the REST API's.
What is the best solution for this problem?
- The authentication of the worker service should be a traditional user/password login, just like any "human" user?
OR
- The worker service authenticates with an API Key and receives a JWT token with all the predefined roles? In this case, functionalities like the refresh token doesn't make sense, right?
Thanks for your help!