How to install keycloak in Docker and configure keys

 Hi, I have installed docker in my local machine.


I have opened the cursor, and ran the below command in terminal


docker run -p 8080:8080 -e KC_BOOTSTRAP_ADMIN_USERNAME=admin -e KC_BOOTSTRAP_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:latest start-dev


You can see, keycloak is installed and running in port 8080.



We can able to access the keycloak from 8080



We can login with below default credentials

username: admin

password admin


This is the default user, go to Users tab and create your own user with  realm access


Click on Create realm to create new realm

In the world of Keycloak and Identity Management, a Realm is basically a "Security Domain" or an "Isolated Space."

Think of Keycloak as a large apartment building. Each Realm is a separate apartment. Even though they are in the same building (the same Keycloak installation), what happens inside Apartment A stays in Apartment A.


To generate Client ID and Client Secret, click on create client


Fill below details, 



To generate client secret, enable client authentication. click next.


Fill the login details like below and save.



In credentials tab, we can see the client secret.



To get the public key, go to realm settings menu and click on keys tab.


In RS256 row, click on public key button, a popup will open with public key to copy.


Thank you.!



Comments

Popular posts from this blog

How to install Redis in Windows using Docker