The aim of this tool is to provide a GUI to user to (1) generate a CSR and private key (2) automatically sends the CSR the AFRINIC BPKI RA to retrieve the CERTIFICATE.
It's a pretty simple Flask webapp which generates a Certificate Signing Request for creating SSL certificates. Of course, if you are smart, you can run the same thing on command-line.
- Ensure you have python 3 and pip3 installed.
- Clone project.
- Create a virtual environment for the project.
- Run
pip3 install -r requirements.txt
in your virtual environment to install requirements - Use
python3 firefox_bpki.py
to run the version that uses firefox driver orpython3 chrome_bpki.py
to run the version that uses chrome driver.
Note: You need to have chrome or firefox browser installed before you can use its driver. Following the above instructions will start Flask's inbuilt server which is for development only.
Note: This tutorial uses apt as package manager so kindly use the appropriate package manager of the linux distribution the deployment is happening on. Only one browser is used at a time and hence, you can choose to install either Chrome or Firefox. However you need to run the appropriate file for the browser.
- Download and install Chrome manually or install Firefox using
sudo apt install firefox
- Install Python 3 and related packages if not already installed using
sudo apt install python3 python3-venv python3-dev
- Install nginx server using
sudo apt install nginx
- Clone project into the directory you want to deploy to.
- Create a virtual Python environment and activate it.
- In the activated Python environment, run
pip3 install -r requirements.txt
- The production server used is Green Unicorn(gunicorn) and the documentation for server configuration can be found here. Use it to complete the server configuration as required.
- Configure supervisor to restart app when it crashes. You can also use any other application as deemed fit to achieve the same purpose to ensure that the application is always running.
- Configure Nginx server as required.
- Start the required services thus, Nginx and the gunicorn server.
Note Please ensure you create a cron job to delete all the files in downloads periodically.