You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Status

Current stateUnder Discussion

Discussion thread: here [Change the link from the KIP proposal email archive to your own email thread]

JIRA: KAFKA-12916

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

Currently Kafka supports creation new topics through a CreateTopicsRequest or by auto creation during a topic MetadataRequest (if enabled on the cluster). Kafka supports ACLs for creation but currently the CREATE acl is used to grant access to both types of topic creations. This is problematic because it may be desirable to allow a user to auto create topics but not to be able to submit a create topic request. The difference is that auto creation will use the cluster defaults for the new topic settings but a topic creation request would allow the user to have control to configure all of the different topic settings which may not be what was intended.

Public Interfaces

Changes to AclOperation

The AclOperation class needs to have a new value added to the Enum:


enum AclOperation {

...
/**
* AUTO_CREATE operation.
*/
AUTO_CREATE((byte) 13);

}

Proposed Changes

The proposed change is to create a new ACL operation called AUTO_CREATE that will be checked to see if a user is authorized to auto create topics instead of using the existing CREATE operation. This new operation will apply both cluster wide (allowed to create a topic of any name) or topic wide (will validate by topic name or prefix). The CREATE operation will still be used for the existing CreateTopicsRequest command. Going forward this will allow an administrator to grant permission to auto create topics with cluster defaults but not to explicitly create topics.

Compatibility, Deprecation, and Migration Plan

This change will be fully backwards compatible and will not break existing users. The AclAuthorizer class will be updated so that any user that is granted the CREATE operation will also imply AUTO_CREATE. This means that any existing configurations that grant CREATE will still work because when the new check is done for AUTO_CREATE the CREATE operation will be implied and return true.

Rejected Alternatives

None currently.

  • No labels