Back to Blog

Microservices Authorization using Open Policy Agent and Traefik (API Gateway)

Microservices Authorization using Open Policy Agent and Traefik (API Gateway)

Appsecco Team Appsecco Team
April 7, 20201 min read
The need for Centralized Authorization Controls

Authentication and authorization in a microservices environment is non-trivial to implement correctly. This becomes especially true when identity and authorization controls are distributed across different applications. There has been multiple cases where authorization controls implemented for one application was missed for another application with similar feature and data access resulting in a breach.

One of our clients had similar requirements in their SaaS platform where they needed to call multiple APIs from a single frontend using ID Token. The ID Token was obtained using a conventional OAuth2 Authorization Code flow from an external provider such as Auth0. While OpenID Connect serves as an excellent standard for sharing verifiable user identity across microservices, we did not find a standard approach for enforcing authorization controls before a request hits a backend microservice.

Appsecco Team

Written by

Appsecco Team

Product Security Testing

Technical insights from the Appsecco security research and testing team.

Ready to find your gaps?

Get a Security Assessment

We'll test your product like a real attacker would.

Get a security assessment