Search code examples
authenticationarchitecturemicroservices

Authorize Curl requests to microservices


I have microservices architecture and want to add authorization and authentication (JWT/Oauth2) for curl/Postman requests.
Microservices running inside docker containers.
I don't want to modify existing services and prefer such schema: enter image description here

Questions:

  • Is there another ready-to-use solution?
  • Can you suggest direction or technology to continue research?
  • Or it will be easer to write own auth service, working in pair with reverse-proxy and Auth Provider (Keycloak)

Solution

  • Input data: oauth2-proxy, keycloak, nginx, one API - service - working together in docker containers. Authentication by OAuth2.

    Solution: I simulated web logging in by python according to this video Python Requests login and persistent sessions tutorial
    It is more simple than using python requests-oauthlib library or Postman, curl requests.