kafka-proxy
Carries the SASL credentials a Kafka upstream is dialled with.
kafka-proxyPriority 508What it does
kafka-proxy holds the SASL username and password the gateway signs in to Kafka brokers with, under SASL. It acts on a route whose upstream speaks Kafka, with the scheme kafka, through the gateway's pub/sub bridge.
On any other route the plugin runs and nothing reads the username and password, so a route that does not speak Kafka signs in nowhere.
When to use it
- A web app reads order events from the orders team's Kafka topics through the gateway, and the brokers take only signed-in users.
- The Kafka team gives the gateway a user of its own,
gateway, so its reads are told apart from those of other services. - The password of the gateway's Kafka user changes, and the route must sign in with the new one.
Not for sending request records to a Kafka topic — see kafka-logger (Sends request logs to a Kafka topic).
Set it up
Sign in to the Kafka brokers with a SASL username and password
Acts only on a route whose upstream speaks Kafka, with scheme kafka.
Fill SASL as in the JSON below.
{
"sasl": {
"username": "gateway",
"password": "<secret>"
}
}
Things to know
- SASL — Only read on a route whose upstream scheme is kafka. On any other route the plugin runs and nothing uses them.
- SASL — Both halves are needed: a SASL without a Password is refused when you save.
- SASL — A SASL without a Username is refused when you save.
- AdviceGive the gateway a Kafka user of its own, allowed to read only the topics its routes offer.
Settings
The fields as the console shows them, section by section.
saslobjectsasl.usernamestringRequiredsasl.passwordstringRequiredThe SASL password of the Kafka user above. Stored on the engine and shown only to roles that manage this object.