Showing posts with label https. Show all posts
Showing posts with label https. Show all posts

Tuesday, 17 November 2026

An AWS Emulator Practica

The instructions here can be used to install aws-emulator on WSL. 

By default the emulator serves HTTPS on 127.0.0.1:9297 so only your machine can reach it.  You can run multiple emulators side-by-side on different ports.

If you want to set this up in Docker you may need to play with the options. The -b option (or --bind) specifies the IP address (note: not hostname) that the emulator listens on, with -p (or --port) to tell the port.

The emulator keeps emulated resources in memory. It uses about 160 MiB (mebibytes) when idle. To cap the memory used by the emulator you must use the systemd-run command.

Monday, 16 November 2026

The Joy of Self-Signed HTTPS Certificates

A self-signed HTTPS certificate is an SSL/TLS certificate that you generate and sign yourself, not issued by a trusted CA. It enables encrypted HTTPS but is not trusted by browsers by default.

It contains the same stuff that you'd expect in a CA-signed certificate (public key - typically RSA or ECDSA), digital signature and algorithm, metadata) but lacks third-party validation.

What pray tell, is the use? Development environments, internal networks and local testing. The openssl command-line tool can be used to generate keys and certificates. 

Friday, 9 October 2026

What is HSTS?

HSTS is HTTP Strict Transport Security. This is a web security policy defined under RFC6797 forcing browsers to use HTTPS only. This protects users from attacks like protocol-downgrade and cookie hijacking.

Friday, 31 July 2026

Understanding HTTP Redirects

Introduction

If you want to program an HTTP request module (to make HTTP requests, to download web pages, or other data) there are a number of relevant concepts relating to HTTP that you must understand.

One of these concepts is HTTP redirects. What are they, why do they exist, and what a "reasonable" number of redirects looks like when sending an HTTP request to a server.

What is a redirect - technically speaking?

First the technical part. HTTP redirects occur when a server responds to a client request with the reply 3XX (status code). This is coupled with a location header of the URL it wants the client to load instead.

The browser or other HTTP client (which could be a Python program, for example) then follows the redirect, issuing a new request to the URL in the location header.

Why are they needed?

Examples:
301 Permanent redirect - e.g. for site reorganization, domain migration, SEO link preservation
Also temporary redirects - e.g. for load balancing
HTTP to HTTPS redirect

Redirects can be configure in Apache .htaccess and in nginx.

Pythons requests module allows by default 30 redirects.

Saturday, 18 July 2026

Revisiting Port 443

Port 443 is primarily known for handling HTTPS traffic over TCP, enabling secure communication between browsers and servers.  

It can be used with UDP in specific scenarios like QUIC (for lower latency secure communications) and HTTP/3.

When diagnosing why an HTTPS connection is failing, an in depth knowledge of port 443 is needed.