title: Kafka ACL authorization issue using Java code
body: <p>I want to grant access to kafka topic through java application as we does through kafka-acls.sh. I just wanted to run below command through java api.</p>
  
  <pre><code>kafka-acls.sh --add --allow-principals User:ctadmin --operation ALL --topic test --authorizer-properties zookeeper.connect=localhost:2181
  </code></pre>
  
  <p>I use these Java instruction to do it (topicName has test as value):</p>
  
  <pre><code>String[] cmdPArm = {"--add", "--allow-principals", "User:ctadmin", "--operation", "ALL","--topic", topicName ,"--authorizer-properties", "zookeeper.connect=localhost:2181"};
  AclCommand.main(cmdPArm);
  </code></pre>
  
  <p>The command works without any issue. The ACL authorization is set but I have a little issue on how this command works. When I try to get the current permissions for my topic, instead of this output:</p>
  
  <pre><code>Current ACLs for resource `Topic:test`: 
      User:ctadmin has Allow permission for operations: All from hosts: localhost
  </code></pre>
  
  <p>I have this:</p>
  
  <pre><code>Current ACLs for resource `Topic:test`: 
      user:ctadmin has Allow permission for operations: All from hosts: localhost
  </code></pre>
  
  <p>You can see the difference between <code>user:ctadmin</code> and <code>User:ctadmin</code> which does not grant permissions correctly for my user, and I'm not authorized to consume on this topic.</p>
  
  <p>How can I fix this?</p>