brucearctor opened a new pull request, #14976: URL: https://github.com/apache/gravitino/pull/14976
### What changes were proposed in this pull request? - Add a new `authorizations/authorization-kafka` plugin module (`authorization-provider = kafka`) implementing `BaseAuthorization` and `AuthorizationPlugin`. - Reuse Kafka catalog `bootstrap.servers` and `gravitino.bypass.*` client settings (including SASL/OAuthBearer/SSL) with optional `authorization.kafka.bootstrap.servers` and `authorization.kafka.admin.*` overrides. - Translate Gravitino RBAC grants (`PRODUCE_TOPIC`, `CONSUME_TOPIC`, `CREATE_TOPIC`) for `ALLOW` and `DENY` conditions and `USER`/`GROUP` ownership across `METALAKE`, `CATALOG`, `SCHEMA`, and `TOPIC` objects into Kafka `AclBinding` entries via `AdminClient`. - Preserve shared ACL bindings across multi-role grants, ownership transfers, role updates, and topic drops while cleaning up orphaned `GROUP` and `CLUSTER` (`IDEMPOTENT_WRITE` / `CREATE`) auxiliary ACLs. - Register `"kafka"` catalog provider support in `ChainedAuthorization` and document `authorization-kafka` configuration in `docs/kafka-catalog.md`. ### Why are the changes needed? KRaft-based Apache Kafka and Kafka-compatible brokers (such as AutoMQ) use Kafka's built-in `StandardAuthorizer` managed via `AdminClient` (`createAcls` / `deleteAcls` / `describeAcls`) without requiring Apache Ranger. Previously, Gravitino defined topic-level RBAC privileges but had no native Kafka authorization plugin to push them down to Kafka brokers. Fixes: #14968 ### Does this PR introduce _any_ user-facing change? Yes. Users can set `authorization-provider = kafka` (or compose it in `authorization-chain`) on a Kafka catalog and configure `authorization.kafka.*` properties as documented in `docs/kafka-catalog.md`. ### How was this patch tested? - Unit tests in `:authorizations:authorization-kafka:test` (`TestKafkaAuthorization`, `TestKafkaAuthorizationProperties`, `TestKafkaAuthorizationPlugin`) and `:catalogs:catalog-kafka:test`. - End-to-end Testcontainers KRaft `StandardAuthorizer` integration test (`KafkaAuthorizationIT`) verifying `ALLOW` and `DENY` enforcement on real Kafka producer/consumer clients, role revocations, ownership transfers, and topic rename/drop ACL cleanup. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
