Certificates, TLS, Client and Server

October 11, 2024

Problem Statement

You are running a java application in a containerized environment such as AKS or ACA, how can you initiate a one way TLS connection to a server that is running outside the containerized environment?

Scenario

You have a server running in a VM or a physical machine. You want to establish a one way TLS connection from a client running in a containerized environment to the server. The server is running a web server that is listening on port 443. The server has a self signed certificate. The client is a java application that is running in a containerized environment. The client needs to establish a one way TLS connection to the server. The client should be able to trust the server certificate. The client should be able to authenticate the server certificate. The client should be able to establish a secure connection to the server.

Steps

In order to test this easily, it deploys a server and a client in the same containerized environment. The server is a simple python web server that listens on port 443. The client is a simple python client that initiates a one way TLS connection to the server. The server has a self signed certificate. The client trusts the server certificate. The client authenticates the server certificate. The client establishes a secure connection to the server.

alt text

Review this Github repository for the code and the steps to establish a one way TLS connection from a client running in a containerized environment to a server.

Refer to this link for a detailed step by step guide on how to establish a one way TLS connection from a client running in a containerized environment to a server.

https://github.com/srinman/azureexamples/tree/main/aca2extwithtls


Profile picture

Written by Sridher Manivel Based out of Charlotte, NC. Linkedin