Blog / Security

How to enable 2FA in the Django admin

July 14, 2021

I remember the first time I've used 2FA (two-factor authentication) was over 12 years ago when I worked as a sysadmin/netadmin in a Windows environment.  We had to purchase this RSA appliance/server and pay separate licenses for each user in the system.

Back in those days, we also used these keyfobs with a simple screen showing the 6-digit number that automatically refreshes every x seconds.  I actually thought those were really cool and when they …

How to check if your Python app supports TLS 1.2

June 3, 2018

As you may have already heard, the Payment Card Industry (PCI) will be requiring everyone to use at least TLS 1.1 (1.2 is recommended) to meet their data security standard starting on June 30, 2018. Other services, such as PyPI, will be requiring only TLS 1.2 connections on the same date as well.

You need to make sure that the version of Python you're using and related packages support TLS 1.2 or a bunch …

Upgrading to Ubuntu 16.04, Python 3.6, and Django 1.11

August 12, 2017

I've finally decided to perform major version upgrades of the main components of this blog: the operating system (Ubuntu), the programming language (Python), and the web framework (Django). Doing these upgrades to the latest LTS (long-term support) versions will future-proof the stack for at least the next 3 years.

One of the main reasons you'd want to do this is to get the latest security updates. It's hard to keep up with security as vulnerabilities …

Generate random passwords on Linux with the "pwgen" command

February 26, 2017


With the recent Cloudflare hack ("CloudBleed"), I currently find myself resetting a bunch of passwords.

I tend to use very random passwords for most of my accounts, where each account uses a different random password. Thankfully, with tools like pwgen this is very quick and easy to do. Before using pwgen, I would normally go to a site like random.org to generate random passwords.

Using `pwgen` is very simple, just install it and type the …

Older