[ https://issues.apache.org/jira/browse/KAFKA-5735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rajini Sivaram reassigned KAFKA-5735: ------------------------------------- Assignee: Mickael Maison (was: Rajini Sivaram) > Client-ids are not handled consistently by clients and broker > ------------------------------------------------------------- > > Key: KAFKA-5735 > URL: https://issues.apache.org/jira/browse/KAFKA-5735 > Project: Kafka > Issue Type: Bug > Components: clients, core > Affects Versions: 0.11.0.0 > Reporter: Rajini Sivaram > Assignee: Mickael Maison > Fix For: 1.0.0 > > > At the moment, Java clients expect client-ids to use a limited set of > characters so that they can be used without quoting in metrics. > kafka-configs.sh allows quotas to be defined only for that limited set. But > the broker does not validate client-ids. And the documentation does not > mention any limitations. Existing non-Java clients do not place any > restrictions on client-ids and hence introducing restrictions on the > broker-side now will be a breaking change. So we should allow any characters > and treat them consistently in the same way as we handle user principals. > Changes required: > 1. Client-id in metrics should be sanitized using URL-encoding similar to the > encoding used for user principal in quota metrics. This leaves metrics for > client-ids using the current limited set of characters as-is, but will allow > arbitrary characters in encoded form. To avoid sanitizing multiple times and > to avoid unsanitized ids being used by mistake in some metrics, it may be > better to introduce a ClientId class that stores the sanitized id and uses > appropriate methods to retrieve the id for metrics etc. > 2. Quota metrics and sensors as well as ZooKeeper quota configuration paths > should use sanitized ids for client-ids (they already do for user principal). > 3. Remove client-id validation in kafka-configs.sh and allow any characters > for client-id similar to usernames, URL-encoding the names to generate ZK > path. -- This message was sent by Atlassian JIRA (v6.4.14#64029)