External authentication and authorization

Set up an external authentication and authorization to protect the workloads in your cluster. For example, you can set up basic, passthrough, API key, OAuth, OPA, or LDAP authentication.

About external auth

API gateways act as a control point for the outside world to access the various application services that run in your environment, whether monoliths, microservices, or serverless functions. In microservices or hybrid application architecture, these workloads accept an increasingly large number of requests.

Requests can be anonymous or authenticated. You can use external authentication to establish and validate who the client is, which service the client is requesting, and what authorization the request has.

Gloo Platform external auth architecture

Gloo Platform provides two resources to help you manage external auth: an external auth server and policy.

ExtAuthServer: To enforce external auth, each workspace must have an external auth server. You can let Gloo Platform create a default configuration for you within your cluster. The default setup gives the you benefits of running within the cluster, including observability, telemetry, and mutual TLS. Also, each team gets its own server to use, as you must have one external auth server per workspace. You can also configure your own external auth server within your Gloo environment or external to the Gloo environment.

ExtAuthPolicy: The external auth server uses external auth policies to enforce authentication and authorization of matching traffic. You can match traffic by selecting routes or destinations. If you don't select any routes or destinations, an external auth policy is applied to all destinations by default. You cannot apply more than one external auth policy to the same route or destination. Currently, destinations can be backed by Kubernetes services or Gloo external services.

Supported types of external auth policies

Select the external auth type that meets your security requirements.

The external auth policy spec consists of a series of configs that are executed in sequence. If any of the authentication configs fail, the request is denied by default.

Mesh external auth:

Gateway external auth: The following external auth policies are most commonly applied to ingress traffic, so they are included in the Gloo Gateway documentation.

Key benefits

Gloo Mesh provides a set of custom resources to make it even easier to set up external auth for all of the microservices in your environment.

External auth API reference

For more information, see the API docs for the external auth server and policy resources.

External auth guides

Server setup

Set up the default or customize your own external auth server.

Basic external auth policy

Authenticate requests with a basic dictionary of usernames and passwords.

API keys

Authenticate requests by using an API key.

LDAP

Authenticate requests against membership information that is stored in a Lightweight Directory Access Protocol (LDAP) server.

OPA

Enforce Open Policy Agent (OPA) policies for more fine-grained access control.