Skip to content

nikhiljohn10/ca-worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ca-worker

A Cloudflare worker which can be deployed by a CA to publish certificates and fingerprint securely to users for bootstrapping.

Installation

git clone https://github.com/nikhiljohn10/ca-worker
cd ca-worker
make install

The above will configure python environment using poetry and make. make install is not neccessary if not using poetry or make for deployment.

Configuration

While using make, these environment variables are required.

export CA_NAME="YOUR_CA_NAME"
export FINGERPRINT="YOUR_ROOT_CA_FINGERPRINT"
export CA_URL="YOUR_ROOT_CA_SERVER_URL"
export ROOT_CA_CERT="YOUR_ROOT_CA_CERT_FILE"

Optional Variables

export WORKER="YOUR_WORKER_NAME"

By default this value is set as ca

Worker file is set as build/index.js. This file is generated by merging index.html and worker,js files inside worker directory. This is performed using make build command. It is always ran before deployment.

Deployment

Using make

make deploy

Using python

python3 deploy.py \
--name "YOUR_CA_NAME" \
--fingerprint "YOUR_ROOT_CA_FINGERPRINT" \
--ca-url "YOUR_ROOT_CA_SERVER_URL" \
--root-ca "YOUR_ROOT_CA_CERT_FILE" \
--worker "ca" \
--location "./build/index.js"

About

A Cloudflare worker which can be deployed by a CA to publish certificates and fingerprint securely to users for bootstrapping.

Resources

License

Stars

Watchers

Forks