Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
2.0.0
-
None
-
None
Description
KIP-290 introduced a way to match ACLs based on prefix. Certain resource names like that for group id can be empty strings. When an empty string is passed into `getMatchingAcls`, it would throw a `StringIndexOutOfBoundsException` because of the following logic:
val prefixed = aclCache.range( Resource(resourceType, resourceName, PatternType.PREFIXED), Resource(resourceType, resourceName.substring(0, Math.min(1, resourceName.length)), PatternType.PREFIXED) ) .filterKeys(resource => resourceName.startsWith(resource.name)) .flatMap { case (resource, versionedAcls) => versionedAcls.acls } .toSet
This is a regression introduced in 2.0.
Attachments
Issue Links
- links to