Skip to content

johnf/division42llc-dotnet-webca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

division42llc/dotnet-webca

Docker Image: microsoft/aspnetcore-build:latest image with a custom CA web application hosted on port 8080, running as a non-privileged user. This is a web application which hosts a self-signed Certificate Authority. You can create/re-create the CA, and issue/delete leaf certificates at-will.

Overview

The purpose of this project is to make it simple and easy to stand up a new Certificate Authority. That is, a system which can dispense x.509/SSL/TLS "certificates".

If you work within a big company, you can likely get certificates (with some ceremony) from your security area. If you host internet-facing applications, you can automate certificates via Let's Encrypt.

However, for many other scenarios, it would be ideal to have your own CA. For example:

  • For simple/quick testing
  • For your home-lab (your router, NAS, Raspberry Pi's, etc.)
  • For smaller companies, for your intranet.
  • For infrastructure-facing uses - like a private CA for Docker Swarm.

The point is, in the year 2017, you should be able to have a simple and easy way to have a Certificate Authority, and now, you can!

Getting Started...

Running as a daemon

To run this headless, as a daemon, exposing the website on http://localhost:8080, and mapping /var/localCA/ in the container, to your $HOME/Desktop/localCA/ directory, and limiting the container to use only 40MB of RAM (usually runs ~27MB), run:

On Linux or macOS:

$ docker run -d -p 8080:8080 -v ~/Desktop/localCA/:/var/localCA/ 
	--memory=40m division42llc/dotnet-webca

On Windows:

$ docker run -d -p 8080:8080 -v %UserProfile%/Desktop/localCA/:/var/localCA/ 
	--memory=40m division42llc/dotnet-webca

Running interactively

To run this headless, as a daemon, exposing the website on http://localhost:8080, and mapping /var/localCA/ in the container, to your $HOME/Desktop/localCA/ directory, and limiting the container to use only 40MB of RAM (usually runs ~27MB), run:

On Linux or macOS:

$ docker run -it -p 8080:8080 -v ~/Desktop/localCA/:/var/localCA/ 
	--memory=40m division42llc/dotnet-webca

On Windows:

$ docker run -it -p 8080:8080 -v %UserProfile%/Desktop/localCA/:/var/localCA/ 
	--memory=40m division42llc/dotnet-webca

Using the application

As of this writing, this basically works. You can create/delete/re-create the CA, and it will list certificates in the leaf folder. You can also create/delete/view leaf certificates.

Screenshots

Below are some screenshots of the application. First, working with the CA, itself:

Home - without a CA CA - setup CA - View 1 CA - View 2 Home - with a CA CA - delete

Then, working with leaf certificates, signed by the CA:

Leaf - create leaf certificates Leaf - list of leaf certificates Leaf - view 1 leaf certificates Leaf - view 2 leaf certificates Leaf - delete leaf certificates

About

Docker Image: Standard microsoft/aspnetcore:latest image with openssl, and a custom CA application hosted on port 80.

Resources

License

Stars

Watchers

Forks

Packages

No packages published