Secure Your Spring Boot App With Spring Security and GitHub Using Keycloak

Secure Your Spring Boot App With Spring Security and GitHub Using Keycloak

How to integrate Spring Security with Keycloak to authenticate a Spring Boot app. Learn how to add GitHub as an Identity Provider. Secure Your Spring Boot App With Spring Security and GitHub Using Keycloak. Add a social media identity provider to securely authenticate your app.

Add a social media identity provider to securely authenticate your app

This article is an enhancement of my previous tutorial about how to authenticate a Spring Boot app with  Keycloak. If you’re not familiar with Keycloak’s basic concepts, I recommend going through the previous tutorial. But don’t worry — you can still follow along because we’re going to cover different topics now.

What you’ll learn from this tutorial:

  • How to integrate Spring Security with Keycloak
  • Identity brokering concepts
  • How to authenticate your app using a third-party social media identity provider (e.g. GitHub)

Let’s dive into it!

Add Spring Security to Your Spring Boot App

A quick recap of the previous tutorial:

  • We’ve developed a simple Spring Boot app running on localhost:8090.
  • The Keycloak server is running on localhost:9090 and authenticates users who want to log into the Spring Boot app.
  • Users with a visitor role can access the localhost:8090/visitor page and users with an admin role can access both localhost:8090/visitor and localhost:8090/admin.

We’ll use the simple Spring Boot app from our previous project. You can find the full source code in the GitHub repository linked at the end of the article.

software-architecture devops programming github

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Road to Simplicity: Hexagonal Architecture [Part One]

Software writing taught me that: a well written software is a simple software.

Software Developer vs Software Engineer — Differences: Bogus or Real?

In this article, see if there are any differences between software developers and software engineers. What you’re about to read mostly revolves around my personal thoughts, deductions, and offbeat imagination. If you have different sentiments, add them in the comment section, and let’s dispute! So, today’s topic…

How to Compare Multiple GitHub Projects with Our GitHub Stats tool

In this article we are going to compare three most popular machine learning projects for you.

How to Extend your DevOps Strategy For Success in the Cloud?

DevOps and Cloud computing are joined at the hip, now that fact is well appreciated by the organizations that engaged in SaaS cloud and developed applications in the Cloud. During the COVID crisis period, most of the organizations have started using cloud computing services and implementing a cloud-first strategy to establish their remote operations. Similarly, the extended DevOps strategy will make the development process more agile with automated test cases.

What Is DevOps and Is Enterprise DevOps Any Good?

What is DevOps? How are organizations transitioning to DevOps? Is it possible for organizations to shift to enterprise DevOps? Read more to find out!