Closed solita-juusoma closed 3 years ago
Now that I look I think schema-registry need to be granted ACL DESCRIBE for __consumer_offsets, not DESCRIBE_CONFIGS. Even though documentation says
DescribeConfigs on the internal consumer offsets topic
Command list says
bin/kafka-acls --bootstrap-server localhost:9092 --command-config adminclient-configs.conf --add \ --allow-principal 'User:
' --allow-host '*' \ --operation Describe --topic __consumer_offsets
Describe makes more sense.
Describe the bug Conluent Schema registry documentation (https://docs.confluent.io/platform/current/schema-registry/security/index.html#authorizing-access-to-the-schemas-topic) says that following ACLs are needed for schema-registry principal:
Currently JulieOps is only adding DESCRIBE_CONFIGS, WRITE and READ ACLs for schema-registry topic (default _schemas). We need to add field for __consumer_offsets topic to descriptor file and add implementation to AclsBindingsBuilder (or just the implementation see expected behavior), additional ACLs for _schemas and GROUP ACL implementation to AclsBindingsBuilder.
Add ACL implementations here https://github.com/kafka-ops/julie/blob/master/src/main/java/com/purbon/kafka/topology/roles/acls/AclsBindingsBuilder.java#L213:
Add __consumer_offsets topic to https://github.com/kafka-ops/julie/blob/master/src/main/java/com/purbon/kafka/topology/model/users/platform/SchemaRegistryInstance.java
RBAC is creating GROUP ACL: https://github.com/solita-juusoma/julie/blob/master/src/main/java/com/purbon/kafka/topology/roles/rbac/RBACBindingsBuilder.java#L180
To Reproduce Steps to reproduce the behavior:
Run JulieOps with descriptor file that contains schema-registry platform: platform: schema_registry: instances:
See from julieops log that only DESCRIBE_CONFIGS, WRITE and READ ACLs were added to topic foo
Double-check with kafka-acls script that only those ACLs were added
Expected behavior If we do changes based on confluent documentation in addition to DESCRIBE_CONFIGS, WRITE and READ ACLs to _schemas topic, JulieOps should add also ACLs DESCRIBE to _schemas, DESCRIBE to __consumer_offsets and READ to GROUP schema-registry.
If we change descriptor file from this
for example to this
it's backwards compatible. But do we need to add consumer_offsets_topic to descriptor? Is it even possible to configure Kafka use different topic for offsets storing? If yes, we could just add DescribeConfig (or Describe? documentation is bit unclear for this) ACL always for __consumer_offsets topic for schema-registry.
Is adding DESCRIBE for _schemas topic necessary when it has DESCRIBE_CONFIGS?
GROUP implementation is totally missing so this is added.
It could also be something like this but it affects RBAC implementation as well which I guess is already working?
Screenshots In this case I have added required ACLs with kafka-acls script. JulieOps tries to remove them.
Runtime (please complete the following information):