question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UI won't load after successful keycloak authentication

See original GitHub issue

Hello,

I have a problem where apicurio-registry UI won’t load after successful keycloak authentication. I have the message “Loading, please wait…” displayed and nothing more happens

I have configured apicurio-registry to use keycloak for authent mechanism. Here is the compose file I use :

version: '3.4'

services:

  postgres-keycloak:
    image: postgres
    environment:
      POSTGRES_USER: keycloak
      POSTGRES_PASSWORD: keycloak
      POSTGRES_DB: keycloak

  keycloak:
    image: jboss/keycloak
    ports:
      - 8090:8080
    environment:
      DB_VENDOR: postgres
      DB_ADDR: postgres-keycloak
      DB_USER: keycloak
      DB_PASSWORD: keycloak
      KEYCLOAK_IMPORT: /apicurio-keycloak-config/apicurio-realm.json
      KEYCLOAK_USER: admin
      KEYCLOAK_PASSWORD: admin
    volumes:
      - ./config/keycloak:/apicurio-keycloak-config
    depends_on:
      - postgres-keycloak

  postgres-apicurio:
    image: postgres
    environment:
      POSTGRES_USER: apicurio
      POSTGRES_PASSWORD: apicurio
      POSTGRES_DB: apicurio-registry

  apicurio:
    image: apicurio/apicurio-registry-sql:2.1.1.Final
    ports:
      - 8080:8080
    environment:
      REGISTRY_DATASOURCE_URL: 'jdbc:postgresql://postgres-apicurio/apicurio-registry'
      REGISTRY_DATASOURCE_USERNAME: apicurio
      REGISTRY_DATASOURCE_PASSWORD: apicurio
      AUTH_ENABLED: "true"
      # Beware : URL must be accessible by apicurio container and by client browser
      KEYCLOAK_URL: http://Ubuntu-VirtualBox:8090/auth
      KEYCLOAK_REALM: registry
      KEYCLOAK_API_CLIENT_ID: registry-api
      KEYCLOAK_UI_CLIENT_ID: apicurio-registry
    depends_on:
      - postgres-apicurio
      - keycloak

When compose has started, I log to keycloak admin UI with admin user. Then I add a “apicurio” user and I give the “sr-admin” role.

Then I log to apicurio-registry UI with this “apicurio” user and this is when I have the “Loading, please wait…” message.

I should add that when I disable authentication “AUTH_ENABLED: “false””, I am able to correctly display UI.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Bewi42commented, Oct 26, 2021

Yes it is 😃 Actually issue has been resolved. It was a configuration problem with the KEYCLOAK_URL parameter. I had configured a hostname that apicurio was not able to connect to. I have replaced the value with my host external IP and it works. I am concerned about the lack of errors in the console though.

0reactions
Bewi42commented, Nov 3, 2021

Hello, Thanks for your concern.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Server Administration Guide - Keycloak
Controlling login options. Enabling forgot password; Enabling Remember Me; ACR to Level of Authentication (LoA) Mapping. Configuring realm keys.
Read more >
Show Authentication Flow-Bindings in Flow list #2509 - GitHub
Description. After creating a custom flow and binding it to a flow-type (e.g. Browser Flow) Actual: ... the user does not see the...
Read more >
keycloak - Why do I get 502 when trying to authenticate
The problem might be in Nginx configuration. Try setting proxy_buffers to a higher number. e.g.: listen 80; listen [::]:80; server_name auth.
Read more >
User Authentication with Keycloak - Part 1: React front-end
Running a Keycloak server · the port you need to expose is 8080, · Keycloak doesn't have an initial admin account by default;...
Read more >
How to implement Keycloak authentication in React
Jumpstart your Keycloak authentication, from login/logout to ... After the successful installation, the admin server will open up at ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found