Skip to content

hadiubaidillah/demo-spring-boot-3-java-21-keycloak-22

Repository files navigation

Demo - Spring Boot 3 - Java 21 - Keycloak 22+

This project demonstrates how to secure a Spring Boot application using Keycloak, a powerful open-source Identity and Access Management tool.

Features

  • Single Sign-On (SSO) with OpenID Connect
  • Role-Based Access Control (RBAC)
  • Fine-Grained Authorization

Prerequisites

  • Spring Boot 3.2.0-RC2
  • Java 21
  • Keycloak Server 22+
  • Gradle

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Installation

  1. Clone the repository:
    git@github.com:hadiubaidillah/demo-spring-boot-3-java-21-keycloak-22.git
  2. Navigate into the project directory:
    cd your-repository-name
  3. Use Maven to build the project:
    mvn clean install
  4. You can then run the Spring Boot application using:
    mvn spring-boot:run

Keycloak Setup

  1. Run the docker-compose file:
    docker-compose up -d
  2. Navigate to Keycloak Admin UI Console
  3. Create a new Real and name ut Hadi or update the application.yml file and specify your Realm name
  4. Create Roles
  5. Create Users
  6. Assign roles to users

Usage

TBD

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages