dockerkeycloakjhipster-registry

Jhipster registry "Status: (Unauthorized)" page after keycloak login


Jhipster registry:v3.3.0
Keycloak: 4.5.0.Final (https enabled)

There is a jhipster registry setup using docker-compose as shown in picture. Registry talks to Keycloak for authentication.

jhipster registry docker setup

jhipster-registry.yml We have two keycloak instances.

When configured with one keycloak instance it successfully logins and opens the registry page.

successful login

When configured with other keycloak instance it show the following page: login not successful

After entering keycloak credentials, the url in the browser is http://localhost:8761/login?state=Swy20H&session_state=c6853b18-42f3-4ad9-9ad0-14615aa576bd&code=eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2In0..xtptsARyYJPbqrhZD4ZF7A.yKur_w3c5H-ybHcpXeBSca1W7N3XxRzQXaUs383Kqh57wzaWt3FhBglGf-w154GRTM93F5oa2grE8HzVyrRpDadQs5FCjpNDZuD86KZy5JVI4RnlYOFvsTMcO-fFi_bWl2ByvNy7QARglrwGQOTeYndvrYluuC57OJGKm8819gIb9a5wvZ9oeiJLuDPwkcefs2J-xnUvEde3yAyVKGxe_oGdA8jJbbwRDQQvCI2e3FLyiKJ1F2P2iHFT5g_QaQxv.7k__JisYiWQrQpjgxJ8m5Q

Same keycloak client was imported in Keycloak realm for instances. Any idea what could be the reason?


Solution

  • I had faced similar issue.

    In my case I was getting it because of two reasons.

    1. The keycloak was SSL enabled and the keystore file used in this process did not include Root certificate. Refer this SOS.
    2. Our network firewall was blocking the requests to Auth Server. In your case it could be Jhipster registry's backend