Latest Posts

Spring Boot Testing Signed JWT with a mock Authorization Server

So you need to configure your Spring Application to use JWT and an OAuth Resource server. You researched on the web and decided that using a simple security filter and setting a specific property spring.security.oauth2.resourceserver.jwt.jwk-set-uri will be enough to fulfill the requirement. For example: @Configuration @EnableWebSecurity public class WebSecurityConfig { public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http.authorizeHttpRequests(...) .oaut

Java Consultant Tip #2: Use OpenTelemetry Java Agent to learn a new application

As Java consultants, when we land on a new gig with an unknown application, we need to come up to speed as quickly as possible. Going through codes is inefficient and can easily miss an important interaction. In my experience, one of the best ways to learn a new Java application is to add automatic instrumentation using the OpenTelemetry’s Java Agent. This article will show up step-by-step how to use it. Getting Started with OpenTelemetry Java Agent Downloading Java Agent First, we need to

Java Consultant Tip: SSL Certificates and Man in the Middle SSL Proxy

It’s your first day at your new gig. Everything is new and you have to adjust quickly to the environment. However, you notice your favorite Java applications are barking with exceptions about certificates. Here’s a sample Exception: sun.security.validator.ValidatorExeption: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target This was because the company you are working with has installed an SSL prox