Convert a JWT expiration date to a cookie max age

JSON Web Token expiration times - a JWT exp - are sent in UTC as a time since the UNIX epoc. Problem You need to set a cookie max age to match the JWT's expiration time. Solution Use Java 8's new time library to generate a duration in seconds. private ... Read more »

A Secure Docker 2.0 Registry with Basic Authentication

There are many guides on web about how to run a v2 Docker Registry, including the offical documentation. However, I couldn't get a secure, password protected registry to start up after reading offical documentation. Other guides recommend using nginx as a proxy to implment basic authentication, but the offical documention ... Read more »

Proper Git Commit Messages

Maybe it's a bit pedantic, but it really bugs me to see poor Git commit messages. We've all seen them, they run on to two or three lines or they're just a single lazy word like "fix". Maybe they just don't summarize the change coherently. Or they're just written in ... Read more »

Simple Privileged Port Binding on Solaris

Binding to a privileged port (1-1024) on UNIX and Linux operating systems typically requires root permissions. However, for security reasons, you want to avoid running daemons as root. This typically means UNIX daemons are coded to start as root to bind to a privileged port, then drop to a less ... Read more »

Advanced search queries with Spring Data Solr

The Spring Data family of projects provide a great way to interact with underlying data stores in a consistent and well structured fashion. We've been using Spring Data MongoDB and Spring Data Solr extensively. Among Spring Data's core strengths are the ability to map POJOs to and from their backing ... Read more »

Recent Posts