Consumer, Credential and Plugin Relationship
A Consumer represents an application, integration or client that calls an API. A Credential proves that Consumer identity, while a Plugin defines the authentication, access-control or traffic policy that is enforced.
Creating only a Consumer does not protect a Route. The relevant authentication Plugin and a compatible Credential must be configured together.
Client sends Credential → Plugin validates the request → Consumer identity is resolved → scoped policies are applied.
Create a Consumer
- Open Consumers and select Create Consumer.
- Enter a Username, a Custom ID or both. At least one of these values is required during creation.
- Use Custom ID when the Consumer must be associated with an identifier from another system.
- Add optional comma-separated tags for ownership, environment or subscription grouping.
- Select Create, then open the Consumer detail page to manage Credentials.
| Field | Requirement | Description | Example |
|---|---|---|---|
| Username | Conditionally required | Readable Consumer identifier. Username or Custom ID must be present. | mobile-client |
| Custom ID | Conditionally required | External or business identifier associated with the Consumer. | customer-1042 |
| Tags | Optional | Comma-separated labels used for filtering and grouping. | production, premium |
The Consumer edit form displays existing identifiers as read-only. Choose stable Username and Custom ID values during creation.
Add a Credential
- Open the target Consumer and select Add Credential.
- Choose the Credential type required by the authentication policy.
- Complete the type-specific fields and store any generated secret in an approved secret-management location.
- Save the Credential and confirm that it appears under the Consumer.
- Test the Credential against a protected Route before distributing it to the client.
| Credential type | Fields | Behavior |
|---|---|---|
| Key Authentication | Optional Key, optional Tags | A key is generated automatically when the Key field is left empty. |
| JWT | Algorithm, optional Key, optional Secret | Supported algorithms are HS256, HS384, HS512, RS256 and ES256. The default is HS256. |
| Basic Authentication | Username, Password | Both fields are required. |
| ACL | ACL Group | Associates the Consumer with the named access-control group. |
Treat keys, JWT secrets and passwords as secrets. Do not place them in source control, screenshots, tickets or documentation examples.
Create and Scope a Plugin
- Open Plugins, select Add Plugin and choose one of the Plugins enabled in the connected environment.
- Optionally enter an Instance Name to distinguish this configuration from another instance of the same Plugin.
- Select Global, Service, Route or Consumer in Applied To.
- When a scoped option is selected, choose the exact Service, Route or Consumer record.
- Select the protocols on which the Plugin should run. HTTP and HTTPS are selected by default.
- Complete the Plugin-specific configuration fields generated from its schema, keep Enabled selected when the policy should become active, and save the configuration.
Plugin Scope Reference
| Scope | Where it applies | Typical use |
|---|---|---|
| Global | All matching traffic handled by the platform. | A common policy that must apply broadly. |
| Service | Every Route connected to one Service. | Apply the same authentication or traffic policy to an API. |
| Route | Only requests matched by one Route. | Protect a public path differently from an internal path. |
| Consumer | Requests resolved to one Consumer. | Apply a client-specific limit or transformation. |
Fields differ by Plugin. Boolean, numeric, list, nested record and JSON values are rendered according to the configuration schema supplied by the connected environment.
Validate an Authentication Policy
- Confirm that the Consumer exists and has a Credential compatible with the selected authentication Plugin.
- Confirm that the Plugin is enabled and scoped to the intended Service or Route.
- Send a request without credentials and verify that access is rejected.
- Send a request with an invalid credential and verify that access is rejected without exposing secret details.
- Send a request with the valid Consumer credential and verify that the API response is returned.
- Review Logging to confirm the request result and investigate unexpected failures.
Access Control Troubleshooting
| Problem | Likely cause | What to do |
|---|---|---|
| The Consumer cannot be created. | Both Username and Custom ID are empty. | Enter at least one stable Consumer identifier. |
| A valid client is rejected. | The Credential type does not match the Plugin or the Plugin is scoped elsewhere. | Compare the Credential type, Plugin name, enabled state and scope. |
| A client is not asked for credentials. | The authentication Plugin is disabled or does not cover the matched Route. | Enable the Plugin and correct its Service or Route scope. |
| The required Plugin is not listed. | The Plugin is not enabled in the connected environment. | Verify availability in the Plugins module before designing the policy. |
| Plugin configuration is rejected. | A required schema field is empty or a JSON/list value has the wrong shape. | Review field descriptions and correct the type and required values. |