Closed Alexander-ac closed 6 months ago
Hi Alexander-ac! 👋
Welcome, and thank you for opening your first issue in the repo!
Please wait for triaging by our maintainers.
As development is carried out in our spare time, you can support us by sponsoring our activities or even funding the development of specific issues. Sponsorship link
If you plan to raise a PR for this issue, please take a look at our contributing guide.
Hi can you take a look at your browser's dev console for the errors?
Unfortunately, nothing can be seen under the Dev Console. All you can see is the URL in the browser:
As if the browser was stuck in the load loop.
Yesterday I experimented with Keycloak and WebUI locally on my computer. I built the whole thing using Docker and simulated it without using reverse proxy. And look, it works! So I strongly suspect that the cause of the problem is the reverse proxy settings.
Can someone tell me what I'm doing wrong with the Ingress settings?
I think I have now found the real reason for the problem. If I remove the SERVER_SERVLET_CONTEXT_PATH variable, the forwarding works properly. And the WEB-UI interface appears.
So is it solved? Please comment here if there's anything else
I have found the workaround for the problem. Of course it's not a real solution to the problem. I would like to use the prefix. But it doesn't work! Namely if you want to use AzureAd or Outh as authentication together with the prefix. In my opinion the problem still exists and needs to be fixed. The whole thing can be recreated with Docker and Keycloak.
@Alexander-ac can you provide a minimal reproducible example then? As you mentioned, a docker compose with keycloak would work. Feel free to attach even the volume contents for the keycloak setup.
Further user feedback is requested. Please reply within 7 days or we might close the issue.
version: '2'
services:
kafbat-ui:
container_name: kafkaui
image: ghcr.io/kafbat/kafka-ui:latest
ports:
- 8099:8080
environment:
KAFKA_CLUSTERS_0_NAME: test
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: 192.168.1.12:19092
AUTH_TYPE: "OAUTH2"
AUTH_OAUTH2_CLIENT_KEYCLOCK_CLIENTID: kafkaui
AUTH_OAUTH2_CLIENT_KEYCLOCK_SCOPE: "openid"
AUTH_OAUTH2_CLIENT_KEYCLOCK_ISSUER-URI: "http://192.168.1.12:8089/auth/realms/Cinnamon"
AUTH_OAUTH2_CLIENT_KEYCLOCK_USER-NAME-ATTRIBUTE: "preferred_username"
AUTH_OAUTH2_CLIENT_KEYCLOCK_CLIENT-NAME: "keycloak"
AUTH_OAUTH2_CLIENT_KEYCLOCK_PROVIDER: "keycloak"
SERVER_SERVLET_CONTEXT_PATH: "/ui"
#AUTH_OAUTH2_CLIENT_KEYCLOAK_CLIENTSECRET: AZ8QVYRmNRaJMNE8UijQCWMWUEkPNgtQ
AUTH_OAUTH2_CLIENT_KEYCLOCK_CUSTOM-PARAMS_TYPE: "oauth"
AUTH_OAUTH2_CLIENT_KEYCLOCK_CUSTOM-PARAMS_ROLES-FIELD: "realm_roles"
LOGGING_LEVEL_COM.PROVECTUS.KAFKA.UI.SERVICE.RBAC.EXTRACTOR: "trace"
LOGGING_LEVEL_ORG.SPRINGFRAMEWORK.SECURITY: "debug"
SPRING_CONFIG_ADDITIONAL-LOCATION: "/roles.yaml"
volumes:
- /home/alex/kafkaui/roles.yaml:/roles.yaml
Keycloak:
image: quay.io/keycloak/keycloak:22.0.5
command: ['start-dev']
environment:
KC_DB: postgres
KC_DB_URL_DATABASE: keycloak
KC_DB_SCHEMA: public
KC_DB_URL: jdbc:postgresql://postgres/keycloak
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: password
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: password
KC_HTTP_RELATIVE_PATH: /auth
ports:
- "8089:8080" # Externe-Portnummer:Interne-Portnummer
postgres:
image: postgres
container_name: postgres
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
zookeeper:
image: confluentinc/cp-zookeeper:7.3.0
container_name: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- 2181:2181
broker:
image: confluentinc/cp-kafka:7.3.0
container_name: kafka
ports:
# To learn about configuring Kafka for access across networks see
# https://www.confluent.io/blog/kafka-client-cannot-connect-to-broker-on-aws-on-docker-etc/
- "19092:19092"
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT,CONNECTIONS_FROM_HOST:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,PLAINTEXT_INTERNAL://broker:29092,CONNECTIONS_FROM_HOST://192.168.1.12:19092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
Roles:
rbac:
roles:
- name: "admin"
clusters:
- test
subjects:
- provider: oauth
type: role
value: "admin"
permissions:
- resource: applicationconfig
actions: all
- resource: clusterconfig
actions: all
- resource: topic
value: ".*"
actions: all
- resource: consumer
value: ".*"
actions: all
- resource: schema
value: ".*"
actions: all
- resource: connect
value: ".*"
actions: all
- resource: ksql
actions: all
- resource: acl
actions: [ view ]
Is it enough?
Thanks for the additional feedback! We'll get back to your issue soon.
Unable to resolve Configuration with the provided Issuer of "http://keycloak:8080/auth/realms/Cinnamon"
Can you please provide a dump of keycloak
volume contents?
Further user feedback is requested. Please reply within 7 days or we might close the issue.
No feedback received within 7 days. Auto closing.
A docker-compose example with RBAC and keycloak: https://github.com/kafbat/ui-config-examples/tree/main/rbac-keycloak
I have same problem and my url is sth like: https://abc.com/kafka If I go to the url with / at the end like https://abc.com/kafka/ the login will forward correctly and work
Issue submitter TODO list
main
-labeled docker image and the issue still persists thereDescribe the bug (actual behavior)
Dear team, we are currently trying to get kafka-ui running in kubernetes. We want to perform authentication via Azure. This works so far, we see the following log lines:
2024-05-02 15:02:37,811 DEBUG [reactor-http-epoll-4] i.k.u.s.r.e.OauthAuthorityExtractor: Token's groups: [admin,veib] 2024-05-02 15:02:37,813 DEBUG [reactor-http-epoll-4] i.k.u.s.r.e.OauthAuthorityExtractor: Matched roles: [admin] 2024-05-02 15:02:55,303 DEBUG [parallel-1] i.k.u.s.ClustersStatisticsScheduler: Start getting metrics for kafkaCluster: test 2024-05-02 15:02:55,953 DEBUG [parallel-1] i.k.u.s.ClustersStatisticsScheduler: Metrics updated for cluster: test
To us, it looks like azure response is being evaluated by Kafka-UI, but the page doesn't display afterwards. So you only see a white background.
Can you help us.
With kind regards
Alex
Expected behavior
No response
Your installation details
Steps to reproduce
Start application Start login process with azure
Screenshots
No response
Logs
No response
Additional context
No response