By Marone: December 2019

Secure Spring boot Rest APIs with client certificate

Goal

This is part III of a series of articles on Spring security topic. In this part, we will use X.509 certificate authentication.
For creating certificates stuff, please take a look on this tutorial

Used technologies

JDK 1.8
Maven 3.2 (Spring boot 2.x and Spring security 5.x)

Maven



Configuration


Configure application.properties


The API



Project structure

project structure

Let's test



References


The complete code can be found in GitHub