HTTPS with mutual authentication

If you want to secure your existing Tomcat server or don’t use Spring Boot there’s quite a lack of up-to-date configuration information, especially because all existing examples were made invalid by the arrival of Tomcat 10 (yes it already happened).

So because I needed a future proof SSL configuration that is also understandable to the security beginner (also me), here’s what I come up with:

Continue reading
Advertisement

Reading in from CSV numbers into strings with Jackson

Reading data from CSV, nothing simpler in Java with all those Jackson tutorials out there. Unless you want to read everything as string, that is. CsvMapper will take anything looking like a number and try to map it into some Integer or whatever, and if you needed strings in that field, well, too bad. Crash.

Continue reading

Building Quarkus native images. You can do it too!

If you read the Quarkus native build page, it should be a breeze: enable -Pnative and there we go! Well… not so fast. Not so fast at all, as they recognize in another “Quarkus native tips” page, unfortunately not linked from the first one (so good luck googling for it). And boy do you need those tips…

I had this application happily running for months and while at the beginning there were some recognized issues with native generation on Windows, nowadays the general expectation was it should work. So I updated all dependencies and started a painful three days long trip, but hey no pain no gain right?

Here’s what it required:

Continue reading

AWS SDK for Java v2 – so simple they saved on documentation

The version 2 of the AWS Java SDK is much less documented than the first one. Okay it’s newer so there are less blogs and projects, obviously, but finding official code examples with v2 on AWS sites is a real struggle. Luckily, using the SDK has become much simpler and straightforward.

Continue reading