kafka-ui icon indicating copy to clipboard operation
kafka-ui copied to clipboard

FE: Fixed the issue where audit was not working

Open moremagic opened this issue 1 year ago • 0 comments

  • [ ] Breaking change? (if so, please describe the impact and migration path for existing application instances)

What changes did you make? (Give an overview) Fixes https://github.com/provectus/kafka-ui/issues/4312

There was a possibility that the user information acquisition part within AuditService might not work properly, so we fixed it to abstract it to RbacUser or UserDetails.

A user who can use RBAC is RbacUser. For other users, I used the UserDetails provided by SpringSecurity.

Also, although not mentioned in the documentation, if RBAC was enabled, messages in AuditLogTopic could not be viewed unless the following permissions were added:

permissions:
  - resource: audit
  - actions: all

Is there anything you'd like reviewers to focus on?

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

  • [ ] No need to
  • [ ] Manually (please, describe, if necessary)
  • [ ] Unit checks
  • [ ] Integration checks
  • [x] Covered by existing automation

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • [x] My changes generate no new warnings (e.g. Sonar is happy)
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [x] Any dependent changes have been merged

Check out Contributing and Code of Conduct

A picture of a cute animal (not mandatory but encouraged)

moremagic avatar Nov 15 '23 02:11 moremagic