Navigating the HTTPS “VIP Club”

Navigating the HTTPS “VIP Club”: How to Handle Certificates in Isolated Environments

If you’ve ever built a secure, distributed application, you know the drill: modern authentication services demand HTTPS. Try passing OpenID or Keycloak tokens over plain HTTP, and the system will—rightfully—refuse to work.

But how does your device (Windows, Android, iOS, or even a Docker container) actually know if a secure connection is trustworthy?

It all comes down to an exclusive “VIP Club” of Certificate Authorities (CAs).

Every HTTPS connection relies on two distinct properties:

● Trust — does the client trust the CA that signed the server’s certificate?

● Identity — is the server’s certificate valid for the hostname that the client is actually using?

On most devices, operating system vendors ship and maintain a default set of trusted CAs. It is actually an exclusive “VIP Club” of Certificate Authorities (CAs).

When a server certificate chains back to one of those trusted roots from the “VIP Club”, HTTPS works without additional configuration. If you want zero configuration headaches, you simply get a certificate from a CA in the Club.

certificate-authority-https

When Public CAs Aren't an Option

Imagine an internal network, or an infrastructure that are intentionally not exposed to the public Internet, for reasons of strict secrecy or privacy and use private hostnames, e.g. .internal or .local or unroutable private IP addresses.

In these cases, the solution is often to operate a private CA with self-signed certificates: you are forced to become your own Certificate Authority.

While setting up a private Local CA is straightforward, managing the “chain of trust” across containerized microservices is where things often break down.

The Edge Node Scenario

If an internal server is signed by your private CA, every client that needs to talk to that server must also trust that CA. That includes containers.

A Docker container is not merely “the host, but smaller”. It may have its own filesystem, its own CA trust store, and its own view of the network. Your host may trust the private CA while your application container does not. So this can happen:

  • Browser on the host → HTTPS works

  • Application inside Docker → certificate verification fails.

The fix is conceptually simple: make the private CA available to the container and install it in the container’s trust store. But there is a second trap: trusting the CA is not enough.

Suppose the certificate was issued for: reserved-host.local-net.internal:

Why? Because TLS does not only verify who signed the certificate. It also verifies who the certificate says it belongs to. An IP address, localhost, and a DNS hostname are different identities.

This becomes especially important for authentication systems such as OpenID Connect and Keycloak. The issuer URL, authorization endpoint, token endpoint, redirects, and application configuration must consistently refer to the same valid HTTPS identity.

So the general rule is: Private HTTPS requires both a trusted chain of authority and a consistent naming model.

autorita-certificazione-https-afa-systems-01

One final engineering-lesson

And one final engineering lesson:

Do not hard-code environment-specific CAs, certificate paths, hostnames, or URLs into your application image.

Certificates and trust anchors belong to deployment configuration. Hostnames belong to the environment. The application should be portable across installations without rebuilding it around the identity of a specific context.

HTTPS failures are often described as “certificate problems”. More precisely, they are usually trust and identity problems. And in distributed systems, those two things must be correct everywhere.

#HTTPS #TLS #Docker #PKI #CyberSecurity #DevOps #OpenIDConnect #Keycloak #DistributedSystems #EdgeNode

Altri post