Kafka gateway: authorization per principal, and ACL and quota admin

Open
#4,518 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
12/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
kafka, rust

Research direction

Start with gateways/kafka/docs/AUTHENTICATION.md and gateways/kafka/docs/ACL_MAPPING.md, then the Kafka gateway handlers that serve Produce, Fetch, CreateAcls (30) and DeleteAcls (31). The open question is whether the gateway acts per principal on one session or opens one Iggy session per principal, and that must be settled before coding. Done means a principal without read permission gets TOPIC_AUTHORIZATION_FAILED (29) on Fetch, and kafka-acls --add changes what the next request is allowed to do.

Written by the indexing model from the issue text.

Description

gateways

Follow-up to #3549.

Summary

Produce, Fetch, offsets and CreateTopics act as the bridge's Iggy user for every client. Only DeleteTopics and AlterConfigs test manage_topics. CreateAcls (30) and DeleteAcls (31) are not served. DescribeAcls answers only with SASL on, and only for the caller.

Who hits it:

  • Deployments where teams must not read each other's topics. Today any authenticated client reads and writes all that the bridge user can, and nothing reports it.
  • kafka-acls --add and --remove, the Strimzi User Operator, Terraform kafka_acl and kafka_quota, JulieOps, and MirrorMaker 2 ACL sync.

Open question

How does the gateway act for a user on each request: with an Iggy way to act for a user on one session, or with one Iggy session per principal?

Scope

  • Carry the principal to the data plane, as gateways/kafka/docs/AUTHENTICATION.md intends
  • Map Kafka operations to Iggy permissions, and CreateAcls and DeleteAcls to permission changes. The mapping loses detail, so define what is refused
  • Client quotas (48 and 49) only on request
  • Update gateways/kafka/docs/ACL_MAPPING.md

Acceptance criteria

  • A principal without read permission on a topic gets TOPIC_AUTHORIZATION_FAILED (29) on Fetch
  • kafka-acls --add grants a permission that the next request honors

References

  • gateways/kafka/docs/AUTHENTICATION.md, gateways/kafka/docs/ACL_MAPPING.md
  • #4340, "Out of scope": requests still run as the bridge's service account
Dominant language
Rust
Stars
5.3k
Forks
548
Avg merge
2d 20h
Merged PRs (30d)
194

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/iggy

All issues in apache/iggy

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.