API Authentication Model
Authentication answers one question for your APIs: who is calling?
Camel X covers the two usual situations:
| Who calls the API | How it proves who it is | What to set up |
|---|---|---|
| An application (a backend, a partner system, a scheduled job) | It obtains a token and sends it with each call | An auth gateway, a list of clients, and a JWT policy on the API |
| A person, in a browser | They sign in with your identity provider | A sign-in policy on the API |
Simpler means exist too (API keys, user name and password), described with the other policies.
Why tokens rather than keys
An API key is a shared secret that never expires and says nothing about what it may be used for. A token is issued for a short time, for named APIs, and is verified by the gateway from its signature alone: no lookup, no shared secret travelling with every call.
The price is one more component, an identity provider, and one more call for the application. The platform provides it as the Auth Gateway, an identity provider compatible with OpenID Connect that issues JWT access tokens.
A handful of internal callers, a tool that cannot run OAuth, a quick integration test: an API key is a reasonable choice. Move to tokens when callers multiply or when one credential must not open every API.
Client credentials flow in four steps
- Create an Auth Gateway. It is the identity provider of the environment.
- Register your applications as clients, in a list of clients, and attach the list to the auth gateway.
- Protect the API with a JWT policy that trusts the auth gateway.
- Call the API: the application asks the auth gateway for a token, then sends it with each request.

The application never talks to your service without going through the gateway, and your service never has to check a token itself.
Removing a client stops it from obtaining new tokens; tokens already issued stay valid until their expiry. Keep token lifetimes short for sensitive APIs.
Console locations
- Auth gateways are created in API Manager, under Auth Gateways.
- Lists of clients are stored configurations: they live in Secret Manager, and can be created from the auth gateway itself.
- Policies are attached from the page of an API instance or of a gateway.
Start with Auth Gateways.
What an auth gateway does
It is the identity provider of the environment, compatible with OAuth 2.0 and OpenID Connect. Its discovery document, token endpoint and JWKS follow those standards. An application presents its client credentials; the auth gateway answers with a signed token naming the APIs the client may call. The gateways in front of your APIs then verify that signature with the public keys the auth gateway publishes.
One auth gateway usually serves all the APIs of an environment. Create another one to keep two populations of clients strictly apart, internal applications and partners for example.