Struggling with managing users in your Keycloak instance or deploying Keycloak on your OpenStack cloud environment? You're not alone. Many organizations face challenges in efficiently handling these tasks, especially when dealing with large numbers of users.
This Keycloak Management App is designed to streamline these processes, saving you time and effort. It provides a user-friendly web interface for two key functionalities:
- Mass User Insertion: Effortlessly add multiple users to your Keycloak instance at once. Simply upload a CSV file containing user information, and the app takes care of the rest.
- Seamless Keycloak Deployment on OpenStack: Deploy Keycloak on your OpenStack cloud environment with ease. The app guides you through configuring a Heat stack template to automate the deployment process.
This app is ideal for organizations that use Keycloak for user management and authentication. It's particularly useful for administrators who need to manage large numbers of users or deploy Keycloak on OpenStack.
The Keycloak Management App is built using the following technologies:
- Next.js: A React framework for building web applications.
- TypeScript: A statically typed superset of JavaScript.
- Tailwind CSS: A utility-first CSS framework for quickly styling web applications.
- Keycloak Admin REST API: An API for managing Keycloak users and clients.
- Openstack Compute API: An API for managing OpenStack cloud resources.
- Openstack Networking API: An API for managing OpenStack networking resources.
- OpenStack Heat: An orchestration service for managing cloud resources.
- Docker: A platform for developing, shipping, and running applications in containers.
The app allows you to upload a CSV file containing user information and add multiple users to your Keycloak instance at once. This feature is particularly useful for organizations that need to onboard large numbers of users quickly.
Deploying Keycloak on OpenStack can be a complex process, involving multiple steps and configurations. The app simplifies this process by guiding you through configuring a Heat stack template to automate the deployment. This feature is ideal for organizations that want to deploy Keycloak on their OpenStack cloud environment.
To get started with the Keycloak Management App, follow these steps:
git clone https://github.com/ZineddineBk09/Keycloak-Users-Management-App.git
cd Keycloak-Users-Management-App
npm install
npx prisma migrate dev
npm run dev
git clone https://github.com/ZineddineBk09/Keycloak-Users-Management-App.git
sudo docker run -d --name postgres-db --network pfe -e POSTGRES_USER=cerist -e POSTGRES_PASSWORD=cerist -e POSTGRES_DB=PFE -p 5432:5432 postgres:13
sudo docker build -t "keycloak-users-management-and-auto-deploy-app" .
sudo docker run -p 3000:3000 -d keycloak-users-management-and-auto-deploy-app
-
-
-
Configure OpenStack API access: Go to the
/start-deploy
page to check for the steps needed to configure the deployment. -
Register the OpenStack API access in the app: Go to the
/deploy
page and enter the OpenStack API access information (OpenStack Username, OpenStack Password, OpenStack Project Name, OpenStack Domain, OpenStack Identity API Base URL). -
Configure the Keycloak server deployment: on the
2nd
step in the/deploy
page enter the Keycloak server deployment information (Keycloak Server Name, Keycloak Server Flavor, Keycloak Server Network Name, Keycloak Running Port, Keycloak Server Key Pair Name). -
Configure the Keycloak deployment: on the
3rd
step in the/deploy
page enter the Keycloak deployment information (Keycloak Realm, Keycloak Admin Username, Keycloak Admin Password). -
Review the deployment: Finally, review the deployment information and click on the "Deploy" button to start the deployment process.
-
Once the deployment starts, you can monitor the progress, and once it's completed, you can view the Keycloak server URL.
-
-
-
Configure Keycloak client to allow the app to access the Keycloak Admin REST API.
- First, you need to create a client in Keycloak. To do this, click on the "Clients" tab in the app and then click on the "Create Client" button. Enter the client information and click "Save."
- Next, you need to configure the client with the appropriate roles and permissions. To do this, click on the "Services accounts roles" tab in the app and then click on the "Assign role" button. Change the filter to "Filter by clients" and select the roles (manage-users, view-users, query-users, manage-clients, view-clients, query-clients) you want to assign to the client.
-
Register the client in the app: Go to the
/register
page and enter the client information (Client ID, Client Secret, Realm, Authentication Protocol, Keycloak Admin Username, Keycloak Server URL). -
Upload the CSV file: Go to the
/upload
page and upload a CSV file containing user information.
-
Tip
You can use the file MOCK_DATA.csv
provided in the repository as an example.
- The users
/users
, and clients/clients
page both contains the list of users and clients respectively.
The Keycloak Management App is a powerful tool for simplifying user management and Keycloak deployment on OpenStack. By providing a user-friendly interface and automating complex processes, the app saves time and effort for administrators. Whether you need to onboard multiple users quickly or deploy Keycloak on your OpenStack cloud environment, this app has you covered.
This project was developed as part of my final year project at the University of Science and Technology Houari Boumediene (USTHB). I would like to thank my supervisor, Dr. BOUABID Mohamed Amine , for his guidance and support throughout the project. and my collegue @Nouri-redouane for his hard work and dedication to the project.