cmccabe commented on a change in pull request #11806:
URL: https://github.com/apache/kafka/pull/11806#discussion_r815011139
##########
File path:
metadata/src/test/java/org/apache/kafka/metadata/authorizer/StandardAuthorizerTest.java
##########
@@ -250,14 +253,57 @@ public void testSimpleAuthorizations() throws Exception {
withId(newBarAcl(ALTER_CONFIGS, ALLOW)));
fooAcls.forEach(a -> authorizer.addAcl(a.id(), a.acl()));
barAcls.forEach(a -> authorizer.addAcl(a.id(), a.acl()));
- assertEquals(Collections.singletonList(ALLOWED),
+ assertEquals(singletonList(ALLOWED),
authorizer.authorize(new MockAuthorizableRequestContext.Builder().
setPrincipal(new KafkaPrincipal(USER_TYPE, "bob")).build(),
- Collections.singletonList(newAction(READ, TOPIC,
"foo_"))));
- assertEquals(Collections.singletonList(ALLOWED),
+ singletonList(newAction(READ, TOPIC, "foo_"))));
+ assertEquals(singletonList(ALLOWED),
authorizer.authorize(new MockAuthorizableRequestContext.Builder().
setPrincipal(new KafkaPrincipal(USER_TYPE,
"fred")).build(),
- Collections.singletonList(newAction(ALTER_CONFIGS, GROUP,
"bar"))));
+ singletonList(newAction(ALTER_CONFIGS, GROUP, "bar"))));
+ }
+
+ @Test
+ public void testTopicAclWithOperationAll() throws Exception {
+ StandardAuthorizer authorizer = new StandardAuthorizer();
+ authorizer.configure(Collections.emptyMap());
+ List<StandardAcl> acls = Arrays.asList(
Review comment:
Can we add a test of DENY logic when ALL is in use? Can probably just
add an additional test assert or something
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]