# JWE Decrypt Configuration

The `jwe-decrypt` plugin decrypts a JWE compact serialization token and forwards the plaintext in a configured request header.<!-- --> <!-- -->Configuration covers consumer fields and route and service fields.

## Parameters[​](#parameters "Direct link to Parameters")

See plugin [common configurations](https://docs.api7.ai/apisix/reference/plugin-common-configurations.md) for configuration options available to all plugins.

### Consumers[​](#consumers "Direct link to Consumers")

The following are plugin attributes available for configurations on [consumers](https://docs.api7.ai/apisix/key-concepts/consumers.md).

* key

  string

  required

  ***

  A unique key that identifies the credential for a consumer.

* secret

  string

  required

  valid value:

  32 bytes

  ***

  A shared symmetric key for A256GCM. A literal plaintext value must be exactly 32 bytes. If `is_base64_encoded` is true, the value must be base64url encoded and decode to 32 bytes. You can also use a `$env://` or `$secret://` gateway reference; the resolved value, rather than the reference string, must meet the same requirement. A reference can be accepted before resolution, but decryption fails if it resolves to a key of the wrong size.

* is\_base64\_encoded

  boolean

  default: `false`

  ***

  Set to true if the secret is base64url encoded. The decoded secret must still be 32 bytes.

### Routes or Services[​](#routes-or-services "Direct link to Routes or Services")

The following are plugin attributes available for configurations on [routes](https://docs.api7.ai/apisix/key-concepts/routes.md) or [services](https://docs.api7.ai/apisix/key-concepts/services.md).

* header

  string

  required

  default: `Authorization`

  ***

  The header to get the token from.

* forward\_header

  string

  required

  default: `Authorization`

  ***

  Name of the header that passes the plaintext to the upstream.

  In APISIX 3.20.0 and API7 Enterprise 3.10.10, the gateway removes any client-supplied value before it forwards decrypted plaintext or continues on the optional-token path. When `strict` is `false` and the token is absent, the upstream receives neither a decrypted value nor the client-supplied value.

* strict

  boolean

  default: `true`

  ***

  If true, return a 403 error when the encrypted plugin token is missing. If false, continue when the token is not found.
