provectus / kafka-ui

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

Basic Auth and multiple instances of Kafka-UI - deployed - Authentication failure #4444

Closed javapapo closed 1 month ago

javapapo commented 1 month ago

Issue submitter TODO list

Describe the bug (actual behavior)

Hello folks I am not sure if this is a bug or in general how its supposed to be but this is on the intersection of Ops and Dev.

So my case is that I deploy kafka-ui on a k8s cluster, with basic auth enabled.

AUTH_TYPE: "LOGIN_FORM"
SPRING_SECURITY_USER_NAME: admin
  SPRING_SECURITY_USER_PASSWORD: ${PROD_PWD}

Everything is fine - Until I try to naively scale the deployment from 1 instance to 2. Replicas to K8s lingo on the helm deployment.

replicas: 1

What I think is happening is that you get 2 identical instances of Kafka-UI - (pods) deployed.

Expected behavior

Naively I would expect It would work,

Your installation details

Steps to reproduce

Deploy 2 instances of kafka-ui under the same k8s service or behind a Load Balancer no sticky sessions.

replicas: 2

What I think is happening is that you get 2 identical instances of Kafka-UI - (pods) deployed.

Screenshots

Not Available

Logs

Authentication failures

Additional context

No response

github-actions[bot] commented 1 month ago

Hello there javapapo! πŸ‘‹

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. πŸ‘€

javapapo commented 1 month ago

I guess there is no solution - since the Spring Security context is not shared... so you can not loadbalance.

Haarolean commented 1 month ago

Hi, this repo is not maintained (#4255). Glad to help you here though: https://github.com/kafbat/kafka-ui

javapapo commented 1 month ago

oops!

javapapo commented 1 month ago

Thanks @Haarolean - will try to migrate to the new-deployment.