kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajini Sivaram (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KAFKA-5735) Client-ids are not handled consistently by clients and broker
Date Tue, 15 Aug 2017 22:16:00 GMT

     [ https://issues.apache.org/jira/browse/KAFKA-5735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rajini Sivaram updated KAFKA-5735:
----------------------------------
    Description: 
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.


  was: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. We need to either limit characters used in client-ids, document
and validate them or we should allow any characters and treat them consistently in the same
way as we handle user principals.


> 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: Rajini Sivaram
>             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)

Mime
View raw message