Unable to install Magic-link Extension in Keycloak Kubernetes installation

Hi team,

I have installed the Keycloak using the bitnami/keycloak chart and it seems working fine, but I couldn’t find an option to install an additional Extensions like keycloak-magic-link. We need to install an add on.

I could see a git to build the jar file, but not sure how can we use it inside the Kubernetes pods, can you please add the instruction to install Extensions also. I can’t fins an example for the same, no documentations available on public internet to solve this issue.

Kindly provide me an update as soon as possible.

Extensions link from the official Keycloak site. GitHub - p2-inc/keycloak-magic-link: Magic Link Authentication for Keycloak

Where can I get the file show we build it using mvm clean install command as instrected in the doc. if so we have the jar file how to build it inside the keycloak container.

I cound’t see an standalone/deployment directory inside the Keycloak directory. please help me

Thanks,
Adarsh K

If you are using the Quarkus-based keycloak version you need to copy the jar to the providers folder.

Release jars are available in Maven Central: Central Repository: io/phasetwo/keycloak/keycloak-magic-link

And you add them to the providers/ dir in your Keycloak distribution.

Hi,

I have downloaded the file (keycloak-magic-link-0.8.jar) and put it under the /opt/bitnami/keycloak/providers directory also, ran ${kc.home.dir}/bin/kc.sh build commnd. But I cantn’t see magic link execution added when I click on Add execution in the Flow details. Should I do any thing more on this ?

I haven’t used the bitnami keycloak image before, but I was able to create a simple docker compose file that uses that image and adds the magic link jar. Note you will have to replace the location of the magic link jar to suit your environment in order to run this:

version: '3'

services:
  keycloak:
    image: docker.io/bitnami/keycloak:21
    volumes:
      - ${PWD}/target/keycloak-magic-link-0.8-SNAPSHOT.jar:/opt/bitnami/keycloak/providers/keycloak-magic-link.jar
    environment:
      KEYCLOAK_ADMIN: admin
      KEYCLOAK_ADMIN_PASSWORD: admin
    ports:
      - 8080:8080
    entrypoint: /opt/bitnami/keycloak/bin/kc.sh start-dev

Let me try it, but should we always start it in dev mode?

It is not necessary to start in dev mode, but I wanted to give you a working example.

To start in production mode, some other environment variables must be set. Those are documented in the Keycloak guides Guides - Keycloak