Skip to main content
JWT (JSON Web Token) Authentication is a security feature that allows you to validate and authenticate JSON tokens in HTTP requests. Multiple JWT providers can be configured for use. Claims inside the JWT can be assigned to headers that will be included in the request received by the Workloads. Rules are used to define which requests must provide valid tokens and from which Provider.

Configuration

JWT Authentication is configured as part of the Workload or GVC sidecar.envoy settings, specifically within the http filters array. The configuration includes a name, a typed config, and providers for JWT authentication. When configured on the GVC layer, the settings are applied to all Workloads in the GVC.

JWT Provider Configuration

Each JWT Provider is configured using a dictionary key of the provider name and the following parameters:

Claim to Headers

Each object represents a mapping between claims in the JWT and the header. It will be mapped to when the request is forwarded to the workload.

Remote JWKS

Configuration for JWT public key resolution and cache behavior.

HTTP URI

The JWKS public key lookup for this Provider.

Rules

Rules are evaluated in order using details from the request. The first matching rule will be used.

Clusters

A Cluster for each provider is required to detail out how the request will be made to the JWT Provider. Since most providers must use https the cluster configuration will be similar to the following. Replace ${providerName} with the name of the provider. Replace ${providerEndpoint} with the endpoint of the provider, ex mydomain.auth.us-east-1.amazoncognito.com.

Notes

  • Provider names starting with “cpln_” are configured by the UI and will have more restricted configurations.
  • The cache_duration and http_uri.timeout must be equal when configured using the UI.
  • All settings are available from envoyproxy JWT Authentication when configured manually, contact support for details.

Example Configuration