Spring Security: Exploring JDBC Authentication 1. Overview In this short tutorial, we’ll explore the capabilities offered by Spring to perform JDBC Authentication using an existing DataSource configuration. In our Authentication with a Database-backed UserDetailsService post, we analyzed one approach to achieve this, by implementing the UserDetailService interface ourselves. This time, we’ll… Continue Reading spring-security-jdbc-authentication

New in Spring Security OAuth2 – Verify Claims 1. Overview In this quick tutorial, we’ll work with a Spring Security OAuth2 implementation and we’ll learn how to verify JWT claims using the new JwtClaimsSetVerifier – introduced in Spring Security OAuth 2.2.0.RELEASE. 2. Maven Configuration First, we need to add the… Continue Reading spring-security-oauth-2-verify-claims

DB Integration Tests with Spring Boot and Testcontainers 1. Overview Spring Data JPA provides an easy way to create database queries and test them with an embedded H2 database. But in some cases, testing on a real database is much more profitable, especially if we use provider-dependent queries. In this tutorial,… Continue Reading spring-boot-testcontainers-integration-test

Difference Between a Java Keystore and a Truststore 1. Overview In this quick article, we’ll provide an overview of the differences between a Java keystore and a Java truststore. 2. Concepts In most cases, we use a keystore and a truststore when our application needs to communicate over SSL/TLS. Usually,… Continue Reading java-keystore-truststore-difference

Consumer Driven Contracts with Pact 1. Overview In this quick article, we’ll be looking at the concept of Consumer-Driven Contracts. We’ll be testing integration with an external REST service through a contract that we define using the Pact library. That contract can be defined by the client, then picked up… Continue Reading pact-junit-consumer-driven-contracts