Skip to content

Commit

Permalink
Updated pylint badge
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and dmanoilo committed Oct 12, 2023
1 parent 166d5a3 commit 991f62d
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 72 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
![pylint](https://NAMESPACE.gitlab.io/pyling.svg)
![pylint](https://img.shields.io/badge/pylint-9.86-yellow?logo=python&logoColor=white)

# PKI-Playground README.md

## Introduction
This is the documentation for a Python 3 script that is used to generate self-signed certificates.
The script is named `pki-playground.py`, and this documentation explains its usage and functionality.
The script is named `pki_playground.py`, and this documentation explains its usage and functionality.

## Usage
To use `pki-playground.py`, you can run it from the command line as follows.
To use `pki_playground.py`, you can run it from the command line as follows.

### Unlocking the repository
The ./pkis directory in this repository is locked by default via git-crypt.
Expand All @@ -16,7 +16,7 @@ The key for the git-crypt is by default encrypted with AES-256 algorithm.
To get access this repository type as follows:
```shell
sudo apt-get update && apt-get install git-crypt
sudo python3 pki-playground.py --unlock KEY
sudo python3 pki_playground.py --unlock KEY
```

This command will decrypt the shipped with this repository git-crypt key and
Expand All @@ -25,7 +25,7 @@ unlock the pkis/ directory.
### Initialing the PKI
After this, you need to initialize the PKI toolchain by entering the following command:
```shell
sudo python3 pki-playground.py --pki-init PKI_NAME
sudo python3 pki_playground.py --pki-init PKI_NAME
```
This will initialize the root CA/CN with the provided name.

Expand All @@ -34,7 +34,7 @@ This will initialize the root CA/CN with the provided name.
To create the server certificates, you need to explicitly specify the root
certificates(PKI) name as follows:
```shell
sudo python3 pki-playground.py --create-server-cert PKI_NAME DOMAIN_NAME
sudo python3 pki_playground.py --create-server-cert PKI_NAME DOMAIN_NAME
```
This will create the server certificates that are based on the PKI with the provided name.

Expand All @@ -44,13 +44,13 @@ After that, you need to create the so-called deployment, which is a docker-compo
the text, that will be temoparily added to the /etc/hosts file.
To do this, type as follows:
```shell
sudo python3 pki-playground.py --create-deployment DEPLOYMENT_NAME HTTPS_PORT PKI_NAME DOMAIN_NAME
sudo python3 pki_playground.py --create-deployment DEPLOYMENT_NAME HTTPS_PORT PKI_NAME DOMAIN_NAME
```

This will initialise the deployments/DEPLOYMENT_NAME directory in the root of the repository,
and create docker-compose.yaml and the host_additions files.

To execute the deployment proceed with the following commands:
```shell
sudo python3 pki-playground.py --start-deployment DEPLOYMENT_NAME
sudo python3 pki_playground.py --start-deployment DEPLOYMENT_NAME
```
11 changes: 8 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

import os
import sys

sys.path.append(os.path.abspath('../..'))

project = 'Pki-Playground'
copyright = '2023, DD'
author = 'DD'
Expand All @@ -14,15 +19,15 @@
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = []
extensions = ['sphinx.ext.autodoc', 'm2r']

templates_path = ['_templates']
exclude_patterns = []


# source_suffix = '.rst'
source_suffix = ['.rst', '.md']

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_static_path = ['_static']
62 changes: 15 additions & 47 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,60 +1,28 @@
PKI-Playground Documentation
==============================


.. toctree::
:maxdepth: 2
:caption: Contents:

pki-playground
:maxdepth: 2
:caption: Contents:


.. automodule:: pki-playground
APP main
===================
.. automodule:: pki_playground
:members:
:undoc-members:
:show-inheritance:

Introduction
------------

This is the documentation for a Python 3 script that is used to generate self-signed certificates. The script is named `pki-playground.py`, and this documentation explains its usage and functionality.

Usage
-----

To use `pki-playground.py`, you can run it from the command line as follows.

First of all you need to unlock the repository, to get access to the generated files:

sudo apt-get update && apt-get install git-crypt
sudo python3 pki-playground.py --unlock KEY

This command will decrypt the shipped with this repository git-crypt key and
unlock the pkis/ directory.

After this, you need to initialize the PKI toolchain by entering the following command:

sudo python3 pki-playground.py --pki-init PKI_NAME

This will initialize the root CA/CN with the provided PKI_NAME.

To create the server certificates, you need to explicitly specify the root
certificates(PKI) name as follows:

sudo python3 pki-playground.py --create-server-cert PKI_NAME DOMAIN_NAME

This will create the server certificates that are based on the PKI with the provided name.

After that, you need to create the so-called deployment, which is a docker-compose file and
the text, that will be temoparily added to the /etc/hosts file.
To do this, type as follows:

sudo python3 pki-playground.py --create-deployment DEPLOYMENT_NAME HTTPS_PORT PKI_NAME DOMAIN_NAME

This will initialise the deployments/DEPLOYMENT_NAME directory in the root of the repository,
and create docker-compose.yaml and the host_additions files.
Tutorial
--------
.. mdinclude:: ../../README.md

To execute the deployment proceed with the following commands:

sudo python3 pki-playground.py --start-deployment DEPLOYMENT_NAME
Indices and tables
==================

This will initialize the deployment. After that you can locate to the https://DOMAIN_NAME:HTTPS_PORT
and enjoy the secured connection made by the self-signed certificates.
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
7 changes: 0 additions & 7 deletions docs/source/modules.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/source/pki-playground.rst

This file was deleted.

File renamed without changes.

0 comments on commit 991f62d

Please sign in to comment.