kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject kafka git commit: MINOR: Improve scaladoc for Authorizer
Date Mon, 23 Jan 2017 16:25:12 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 1eb1e2f60 -> a32175064


MINOR: Improve scaladoc for Authorizer

Author: Magnus Reftel <magnus.reftel@skatteetaten.no>

Reviewers: Sriharsha Chintalapani <harsha@hortonworks.com>, Ismael Juma <ismael@juma.me.uk>

Closes #2151 from reftel/feature/authorizer_name_reference


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/a3217506
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/a3217506
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/a3217506

Branch: refs/heads/trunk
Commit: a321750646733aa0a2e6346b5e785a4dd5d7675c
Parents: 1eb1e2f
Author: Magnus Reftel <magnus.reftel@skatteetaten.no>
Authored: Mon Jan 23 16:17:55 2017 +0000
Committer: Ismael Juma <ismael@juma.me.uk>
Committed: Mon Jan 23 16:25:01 2017 +0000

----------------------------------------------------------------------
 .../main/scala/kafka/security/auth/Authorizer.scala | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/a3217506/core/src/main/scala/kafka/security/auth/Authorizer.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/security/auth/Authorizer.scala b/core/src/main/scala/kafka/security/auth/Authorizer.scala
index 4c708b2..6f4ca0e 100644
--- a/core/src/main/scala/kafka/security/auth/Authorizer.scala
+++ b/core/src/main/scala/kafka/security/auth/Authorizer.scala
@@ -22,13 +22,15 @@ import org.apache.kafka.common.Configurable
 import org.apache.kafka.common.security.auth.KafkaPrincipal
 
 /**
- * Top level interface that all plugable authorizer must implement. Kafka server will read
"authorizer.class" config
- * value at startup time, create an instance of the specified class and call initialize method.
- * authorizer.class must be a class that implements this interface.
- * If authorizer.class has no value specified no authorization will be performed.
+ * Top level interface that all pluggable authorizers must implement. Kafka will read the
`authorizer.class.name` config
+ * value at startup time, create an instance of the specified class using the default constructor,
and call its
+ * `configure` method.
  *
- * From that point onwards, every client request will first be routed to authorize method
and the request will only be
- * authorized if the method returns true.
+ * From that point onwards, every client request will first be routed to the `authorize`
method and the request will only
+ * be authorized if the method returns true.
+ *
+ * If `authorizer.class.name` has no value specified, then no authorization will be performed,
and all operations are
+ * permitted.
  */
 trait Authorizer extends Configurable {
 
@@ -36,7 +38,7 @@ trait Authorizer extends Configurable {
    * @param session The session being authenticated.
    * @param operation Type of operation client is trying to perform on resource.
    * @param resource Resource the client is trying to access.
-   * @return
+   * @return true if the operation should be permitted, false otherwise
    */
   def authorize(session: Session, operation: Operation, resource: Resource): Boolean
 


Mime
View raw message