tchiotludo / akhq

Kafka GUI for Apache Kafka to manage topics, topics data, consumers group, schema registry, connect and more...
https://akhq.io/
Apache License 2.0
3.41k stars 660 forks source link

Audit Logging of AKHQ actions #1992

Closed Kris686 closed 1 week ago

Kris686 commented 2 weeks ago

Discussed in https://github.com/tchiotludo/akhq/discussions/1888

Originally posted by **0nurulusoy** July 31, 2024 Got it! Here is the revised version of your question: I want to enable audit logging in AKHQ to log activities such as: - Logging in with different user accounts - Viewing topics and consumer groups - Creating or deleting topics - Modifying configurations I followed the documentation [here](https://akhq.io/docs/configuration/akhq.html#audit), first created the topic by hand on Kafka, and used the provided configuration. However, it does not log anything to the topic. Auto-create is enabled, so I also expected AKHQ to create the topic, but it didn't, what am i missing? It doesn't have example on the [https://github.com/tchiotludo/akhq/blob/dev/application.example.yml](url).
Kris686 commented 2 weeks ago

I've encountered the same issue with audit logs creation, I'm using helm chart installation method with following config:

  configuration:
    akhq:
      audit:
        enabled: true
        cluster-id: kafka-cluster-001
        topic-name: auditlogs

There are no errors and warnings in pod's logs.

AlexisSouquiere commented 1 week ago

@Kris686 can you provide a sample of your application.yml ? I just tried again on my side and it's working as expected with or without creating the auditlogs topic manually...

Are you running AKHQ 0.25.0 or 0.25.1 ? Any ACL that would prevent your Kafka user to produce to this topic ? AKHQ should log an error if the message can't be produced so for me the feature doesn't seem to be enabled

Kris686 commented 1 week ago

@AlexisSouquiere I've verified configuration and on my end and it works fine now. Thank you, and I'm sorry for troubling you.