Inter-Service Authorization Flow
The primary technical hurdle was implementing secure communication chains. When a customer attempts to edit a product on the Product Management Service, the following internal requests are triggered:
- Client to Product Service: HTTP request with JWT in the header.
- Product Service to User Service (Internal): Requests validation of the JWT and confirmation of employee status.
- User Service: Decodes JWT, checks database for employee status, and returns boolean authorization result.
- Product Service: If authorized, proceeds with the database update and sends a log POST request to the Logging Service.
Dockerization and Deployment Pipeline
The solution required five separate `Dockerfile` configurations (`Dockerfile.users`, etc.) built off the same Python base image. The final deployment relied on a single `compose.yaml` file to orchestrate all five containers onto a shared network, ensuring they could resolve each other by their container names (e.g., `http://user:9000/auth_check`). This setup was essential for achieving a reliable, repeatable test environment.