use of io.strimzi.api.kafka.model.KafkaAuthorizationSimpleBuilder in project strimzi by strimzi.
the class KafkaBrokerConfigurationBuilderTest method testSimpleAuthorizationWithoutSuperUsers.
@ParallelTest
public void testSimpleAuthorizationWithoutSuperUsers() {
KafkaAuthorization auth = new KafkaAuthorizationSimpleBuilder().build();
String configuration = new KafkaBrokerConfigurationBuilder(Reconciliation.DUMMY_RECONCILIATION).withAuthorization("my-cluster", auth).build();
assertThat(configuration, isEquivalent("authorizer.class.name=kafka.security.authorizer.AclAuthorizer\n" + "super.users=User:CN=my-cluster-kafka,O=io.strimzi;User:CN=my-cluster-entity-topic-operator,O=io.strimzi;User:CN=my-cluster-entity-user-operator,O=io.strimzi;User:CN=my-cluster-kafka-exporter,O=io.strimzi;User:CN=my-cluster-cruise-control,O=io.strimzi;User:CN=cluster-operator,O=io.strimzi"));
}
use of io.strimzi.api.kafka.model.KafkaAuthorizationSimpleBuilder in project strimzi-kafka-operator by strimzi.
the class KafkaBrokerConfigurationBuilderTest method testSimpleAuthorizationWithSuperUsers.
@ParallelTest
public void testSimpleAuthorizationWithSuperUsers() {
KafkaAuthorization auth = new KafkaAuthorizationSimpleBuilder().addToSuperUsers("jakub", "CN=kuba").build();
String configuration = new KafkaBrokerConfigurationBuilder(Reconciliation.DUMMY_RECONCILIATION).withAuthorization("my-cluster", auth).build();
assertThat(configuration, isEquivalent("authorizer.class.name=kafka.security.authorizer.AclAuthorizer\n" + "super.users=User:CN=my-cluster-kafka,O=io.strimzi;User:CN=my-cluster-entity-topic-operator,O=io.strimzi;User:CN=my-cluster-entity-user-operator,O=io.strimzi;User:CN=my-cluster-kafka-exporter,O=io.strimzi;User:CN=my-cluster-cruise-control,O=io.strimzi;User:CN=cluster-operator,O=io.strimzi;User:jakub;User:CN=kuba"));
}
use of io.strimzi.api.kafka.model.KafkaAuthorizationSimpleBuilder in project strimzi by strimzi.
the class KafkaBrokerConfigurationBuilderTest method testSimpleAuthorizationWithSuperUsers.
@ParallelTest
public void testSimpleAuthorizationWithSuperUsers() {
KafkaAuthorization auth = new KafkaAuthorizationSimpleBuilder().addToSuperUsers("jakub", "CN=kuba").build();
String configuration = new KafkaBrokerConfigurationBuilder(Reconciliation.DUMMY_RECONCILIATION).withAuthorization("my-cluster", auth).build();
assertThat(configuration, isEquivalent("authorizer.class.name=kafka.security.authorizer.AclAuthorizer\n" + "super.users=User:CN=my-cluster-kafka,O=io.strimzi;User:CN=my-cluster-entity-topic-operator,O=io.strimzi;User:CN=my-cluster-entity-user-operator,O=io.strimzi;User:CN=my-cluster-kafka-exporter,O=io.strimzi;User:CN=my-cluster-cruise-control,O=io.strimzi;User:CN=cluster-operator,O=io.strimzi;User:jakub;User:CN=kuba"));
}
use of io.strimzi.api.kafka.model.KafkaAuthorizationSimpleBuilder in project strimzi-kafka-operator by strimzi.
the class KafkaBrokerConfigurationBuilderTest method testSimpleAuthorizationWithoutSuperUsers.
@ParallelTest
public void testSimpleAuthorizationWithoutSuperUsers() {
KafkaAuthorization auth = new KafkaAuthorizationSimpleBuilder().build();
String configuration = new KafkaBrokerConfigurationBuilder(Reconciliation.DUMMY_RECONCILIATION).withAuthorization("my-cluster", auth).build();
assertThat(configuration, isEquivalent("authorizer.class.name=kafka.security.authorizer.AclAuthorizer\n" + "super.users=User:CN=my-cluster-kafka,O=io.strimzi;User:CN=my-cluster-entity-topic-operator,O=io.strimzi;User:CN=my-cluster-entity-user-operator,O=io.strimzi;User:CN=my-cluster-kafka-exporter,O=io.strimzi;User:CN=my-cluster-cruise-control,O=io.strimzi;User:CN=cluster-operator,O=io.strimzi"));
}
Aggregations