Uploaded image for project: 'Sentry (Retired)'
  1. Sentry (Retired)
  2. SENTRY-2535

SentryKafkaAuthorizer throws Exception when describing ACLs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.2.0
    • Sentry
    • None

    Description

      ConsumerGroup resource type is not handled properly in SentryKafkaAuthorizer causing an exception when converting from Sentry consumer group resource type to Kafka's consumer group resource type.

       2019-10-25 12:30:17,992 ERROR kafka.server.KafkaApis: [KafkaApi-6] Error when handling request: clientId=adminclient-83, correlationId=1158, api=DESCRIBE_ACLS, body={resource_type=2,resource_name=null,resource_pattern_type_filter=1,principal=null,host=null,operation=1,permission_type=1}
      kafka.common.KafkaException: CONSUMERGROUP not a valid resourceType name. The valid names are Topic,Group,Cluster,TransactionalId,DelegationToken
              at kafka.security.auth.ResourceType$$anonfun$fromString$1.apply(ResourceType.scala:64)
              at kafka.security.auth.ResourceType$$anonfun$fromString$1.apply(ResourceType.scala:64)
              at scala.Option.getOrElse(Option.scala:121)
              at kafka.security.auth.ResourceType$.fromString(ResourceType.scala:64)
              at org.apache.sentry.kafka.binding.KafkaAuthBinding.rolePrivilegesToResourceAcls(KafkaAuthBinding.java:481)
              at org.apache.sentry.kafka.binding.KafkaAuthBinding.getAclsForRoles(KafkaAuthBinding.java:463)
              at org.apache.sentry.kafka.binding.KafkaAuthBinding.getAcls(KafkaAuthBinding.java:379)
              at org.apache.sentry.kafka.authorizer.SentryKafkaAuthorizer.getAcls(SentryKafkaAuthorizer.java:93)
              at kafka.server.KafkaApis.handleDescribeAcls(KafkaApis.scala:1911)
              at kafka.server.KafkaApis.handle(KafkaApis.scala:137)
              at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:74)
              at java.lang.Thread.run(Thread.java:748)
      

      Attachments

        1. SENTRY-2535.001.patch
          4 kB
          Kalyan Kalvagadda
        2. SENTRY-2535.002.patch
          9 kB
          Na Li
        3. SENTRY-2535.002.patch
          9 kB
          Gergo Wilder

        Issue Links

          Activity

            People

              gwilder Gergo Wilder
              wgergo Gergo Wilder
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: