Enable Apache Kafka® REST proxy authorization
REST proxy authorization applies Apache Kafka Access Control Lists (ACLs) to requests made through the Karapace REST proxy.
When authorization is enabled, Karapace forwards HTTP basic authentication credentials to Apache Kafka®. Apache Kafka authenticates the user and authorizes operations based on the ACLs defined for the service.
When authorization is disabled, the REST proxy bypasses Apache Kafka ACLs, so REST API calls are not restricted by those rules.
REST proxy authorization is disabled by default.
Prerequisites
- An Aiven for Apache Kafka® service
- REST proxy enabled on the
service (
kafka_rest)
Enable REST proxy authorization
Enabling REST proxy authorization can disrupt access if Kafka ACLs are not configured to allow the operations your clients need. Configure Access Control Lists before you enable authorization.
- Console
- CLI
- In the Aiven Console, select your project and choose your Aiven for Apache Kafka® service.
- Click Service settings.
- In Advanced configuration, click Configure.
- Click Add configuration options.
- Find
kafka_rest_authorizationand set it to Enabled. - Click Save configuration.
Enable REST proxy authorization with the Aiven CLI:
avn service update -c kafka_rest_authorization=true SERVICE_NAME
To disable it:
avn service update -c kafka_rest_authorization=false SERVICE_NAME
Replace SERVICE_NAME with the name of your Aiven for Apache Kafka® service.
Related pages