Charles Chan

13 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