provectus / kafka-ui

Open-Source Web UI for Apache Kafka Management
Apache License 2.0
9.81k stars 1.19k forks source link

Audit is not working with LDAP authentication #4131

Closed gfdsa closed 1 year ago

gfdsa commented 1 year ago

Issue submitter TODO list

Describe the bug (actual behavior)

Audit topic is created and the audit service is being called correctly but fails with the following:

reactor.core.Exceptions$ErrorCallbackNotImplemented: java.lang.ClassCastException: Cannot cast org.springframework.security.ldap.userdetails.LdapUserDetailsImpl to com.provectus.kafka.ui.config.auth.RbacUser
Caused by: java.lang.ClassCastException: Cannot cast org.springframework.security.ldap.userdetails.LdapUserDetailsImpl to com.provectus.kafka.ui.config.auth.RbacUser
    at java.base/java.lang.Class.cast(Class.java:3889)
    at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:113)
    at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129)
    at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:158)
    at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1839)
    at reactor.core.publisher.MonoCacheTime.subscribeOrReturn(MonoCacheTime.java:151)
    at reactor.core.publisher.Mono.subscribe(Mono.java:4480)
    at reactor.core.publisher.Mono.subscribeWith(Mono.java:4561)
    at reactor.core.publisher.Mono.subscribe(Mono.java:4323)
    at com.provectus.kafka.ui.service.audit.AuditService.audit(AuditService.java:163)

nothing is being published into the __kui-audit-log

Expected behavior

messagges in __kui-audit-log

Your installation details

ca2d53f

LDAP login is configured and is working correctly Kafka cluster is visible and all is working

Steps to reproduce

login with ldap and do some auditable action

Screenshots

No response

Logs

redacted

Additional context

No response

github-actions[bot] commented 1 year ago

Hello there gfdsa! 👋

Thank you and congratulations 🎉 for opening your very first issue in this project! 💖

In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. 👀