Keycloak on Docker hub is an open-source tool that will make securing our application easier.
Bobcares responds to all questions, big and small, as part of our Docker hosting support.
Let’s take a closer look at Keycloak on Docker Hub.
Docker Hub Keycloak
Before we start make sure we have Docker installed.
Start Keycloak
Start Keycloak with the following command from a terminal:
docker run -p 8080:8080 -e KEYCLOAK_ADMIN=bobcares -e KEYCLOAK_ADMIN_PASSWORD=bobcares quay.io/keycloak/keycloak:18.0.0 start-dev
This will start Keycloak on port 8080 on the local machine. It will also create an admin user with the username bobcares
and the password bobcares.
.
- Log in with the username and password we created earlier to the Keycloak Admin Console.
Create a realm
In Keycloak, a realm is the equivalent of a tenant. It allows users and applications to be divided into separate groups. In Keycloak, there is only one realm called master by default. This is only for Keycloak management and should not be used for our own apps.
Let’s start by making our first realm.
- Firstly, Launch the Keycloak Administration Console.
- Then, Hover our mouse over the MASTER dropdown in the top-left corner, then select ADD REALM.
- Fill in the value name: bobcaresrealm in the form.
- Finally, click CREATE.
Create a user
There are no users in a new realm at first, so let’s make one.
- Firstly, Launch the Keycloak Administration Console.
- Then click USERS and click ADD USER
- Fill in the form with USERNAME, FIRST NAME and LAST NAME
- Finally, click SAVE
To login, the user will need to create an initial password. To do so, first:
- Firstly, click CREDENTIALS
- Then, set a password in the SET PASSWORD form.
- Click ON next to TEMPORARY to prevent having to update password on first login
Login to account console
To make sure the user is configured correctly, try logging into the account console.
- Firstly, Open the Keycloak Account Management Console.
- Then, login with username and the password we created earlier
We should now be in the account console, which allows users to manage their accounts.
Secure our first app
Let’s see if we can make our first application secure. The first step is to connect this app to our Keycloak instance:
- Firstly, launch the Keycloak Administration Console.
- Then, click ‘Clients’
- Fill in the Client ID, Client Protocol, and Root URL fields on the form. “openid-connect” is the client protocol, and the root URL is “https://www.keycloak.org/app/.”
- Finally, click SAVE
- Now we can use the Keycloak server we started earlier to authenticate to this application by clicking Sign in.
[Looking for a solution to another query? We are just a click away.]
Conclusion
To sum up, our Skilled engineers went over Keycloak on Docker Hub in greater detail.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
var google_conversion_label = "owonCMyG5nEQ0aD71QM";
0 Comments