Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat audit #1675

Merged
merged 22 commits into from
Apr 4, 2024
Merged

Feat audit #1675

merged 22 commits into from
Apr 4, 2024

Conversation

ebrard
Copy link
Contributor

@ebrard ebrard commented Feb 23, 2024

This PR adds audit information about any Kafka related actions that performs a change (creation, modification, deletion). Out of scope are schema registry and connect.

The audit event are triggered to a configurable kafka cluster which needs to be one of the cluster under akhq managament.

This addresses the issue 1474.

Tests on the TopicRepository have been slightly modified so that topics which are created during audit tests are not considered.

@ebrard
Copy link
Contributor Author

ebrard commented Feb 23, 2024

@tchiotludo Could I get a quick pair of 👁️ on this? What I am not too sure of is how to set the to turn audit off by default (although this seems to work), and also I am not too sure how to unit test this, unless I use a mock of the class.

@ebrard ebrard marked this pull request as ready for review March 8, 2024 13:47
@ebrard
Copy link
Contributor Author

ebrard commented Mar 8, 2024

@tchiotludo Ok I found how I could add tests.

@ebrard
Copy link
Contributor Author

ebrard commented Mar 13, 2024

@tchiotludo Do you think you could review this PR soon? That's a feature we will need to rely on.

@tchiotludo
Copy link
Owner

tchiotludo commented Mar 13, 2024

Seems to be a good one, but I think you should use a better enum to be sure to be explicit:

    public enum ActionType {
        UPDATE_OFFSETS_CONSUMER_GROUP,
        DELETE_OFFSETS_CONSUMER_GROUP,
        DELETE_CONSUMER_GROUP,
        NEW_TOPIC,
        CONFIG_CHANGE,
        INCREASE_PARTITION,
        DELETE_TOPIC
    }

could be:

    public enum ActionType {
        CONSUMER_GROUP_UPDATE_OFFSETS,
        CONSUMER_GROUP_DELETE_OFFSETS,
        CONSUMER_GROUP_DELETE,
        TOPIC_CREATE,
        CONFIG_CHANGE, //?? 
        TOPIC_INCREASE_PARTITION,
        TOPIC_DELETE
    }

also is it possible to handle others one? (schema, etc ...)?

@jonasvoelcker
Copy link
Contributor

Hey @tchiotludo, as I changed everything towards vite, vitest and jsx it would be good to know whether this feature will be part of the 0.25.0 or not. Anyways this will need an upgrade to fit in our new frontend setup. FYI: @AlexisSouquiere

@tchiotludo
Copy link
Owner

@jonasvoelcker it seems to be only backend update, does this PR has impact on the vite upgrade?

@jonasvoelcker
Copy link
Contributor

@tchiotludo You are right, I thought there were some js-files, but it's java instead. Next time I need to scroll to the right ^^

@ebrard
Copy link
Contributor Author

ebrard commented Mar 15, 2024

@tchiotludo speaking of which, any deadline for the PR to be part of the next release? I'll work on it again next week.

@ebrard
Copy link
Contributor Author

ebrard commented Mar 21, 2024

Ok, I've renamed the enum values. I'll see what I can do about the schema and connect components.

@ebrard
Copy link
Contributor Author

ebrard commented Mar 21, 2024

Hey @tchiotludo I've added audit for the schema registry and the kafka connect clusters. Let me know what you think.

@tchiotludo tchiotludo merged commit fbf48b0 into tchiotludo:dev Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants