Welcome to the Configuration Creation Guide for PyPkiPractice! This document is intended to guide you through the process of creating autoconfiguration and manual configuration files for running the program.
The program is intended to be built in a way where the user’s only interaction with the functionality is the initial runtime of the file, with any other interactions being the viewing of the runtime processes and exploring the state of each holder.
Because this, the environment that is passed in is the most important part of the process. There are two different types of files that can be passed, called autoconfiguration and manual configuration. An autoconfiguration is recognized as any file that has the word “auto” in it, while a manual configuration is any file that has the word “manual” in it.
Autoconfiguration files only set up the environment itself. The actual details of the holders in the network are randomly generated, but top-level details are specified. You can use the Default_Configs folder to find examples to guide this reading.
level_count
parameter.level_count
.
This detail will be usually be entered in as a list of numbers in the
syntax of [x, y, z]
, where each number corresponds to a
level going from the top-down. For example, given that
level_count
is equal to 3, the amount x
is the
number of root CAs, the number y
is the number of
second-level intermediate CAs, and the number z
is the
number of end devices. This detail is specified using the
count_by_level
parameter and must be written in a way where
every next number has to be larger than the last. There is never more
top-level CAs than bottom-level CAs. In addition, there must be as many
settings in the list as there are levels.uid_hash
and sig_hash
parameters respectively.
encrypt_alg
parameter.count_by_level
.
revoc_probs
is the detail that sets the probability
that a holder in a specific level will revoke a lower certificate or
their own certificate. This setting must be a decimal value
inclusively between 0 and 1. Inclusively means that it can also
be 0 and 1, but it cannot be outside the range any more than that. A
setting of 0 correlates to 0% chance and means that a holder will never
revoke a certificate, while a setting of 1 correlates to a 100% chance
and means that a holder will revoke a certificate every time.cert_valid_durs
is the detail that states how long the
certificate’s validity would last for. It can either be a time in the
HH:MM:SS time format, or the word “none” in all
lowercase. The first number (setting for root CAs) MUST BE NONE.cache_durs
is the detail that states how long a
validated certificate would reside in the local holder’s certificate
cache. The first number (setting for root CAs) MUST BE NONE. All other
numbers must be a time in the MM:SS time format.cooldown_durs
is the detail that states how long a
holder would wait before trying to send another message after a
rejection or unexpected response. It must be a number in seconds.timeout_durs
is the detail that states how long a
holder would wait before timing out a sent message. It must be a number
in seconds.log_save_filepath
parameter.runtime
parameter and must be specified
in the HH:MM:SS time format, or the word “none” in all
lowercase.db_folder_path
parameter.These thirteen details are the settings needed to run a PKI network simulation. However, if you wish for more detail, you can also create a manual configuration file.
Manual configuration files do not replace autoconfiguration files. A manual configuration file is more of an add-on to an autoconfiguration file. It can be used to set the details of specific holders in the hierarchy. The specific format will vary from file format to file format, but it will generally be organized by the name of the holder, followed by details about its place in the environment and other details. You can use the Default_Configs folder to find examples to guide this reading.
The following information describes everything that can be set for a specific holder.
As stated earlier, the name of the holder is the “key” in the key-value organization of the manual configuration file. This name is a useful way to identify a specific holder in the environment to the user.
The holder location is the first major detail specified in the
“values” of the holder. It is specified using the location
parameter and specifies where the holder being set is in the
environment. The level
states the level in the hierarchy
from top to bottom. This is used to identify where in the environment
hierarchy the holder will be. If this detail is not specified, the
entire key will be ignored.
The holder environment overrides is the second major detail specified
in the “values” of the holder. It is specified using the
env_overrides
parameter and is used if the default
configuration in the autoconfiguration file is not desired for a
specific holder. This detail is optional, meaning if it is not there,
the holder will use the autoconfiguration settings. Much of the
parameter names set in here are the same names as the ones in the
autoconfiguration file except for the last five where the ‘s’ is
removed. level_count
and count_by_level
are
not recognized in env_overrides
since we only care about
where now.
The hardware, software, and account type of the holder is the third
major detail specified in the “values” of the holder. It is specified
using the holder_type_info
parameter and describes the
underlying details of the device holding the certificate. This detail is
optional, meaning if it is not there, the holder will auto generate the
information. If it is there, and you wish to use the default parameters,
be sure to spell everything correctly, else the program will either
back-fill an unrecognized value or overwrite it.
You can use the all default parameters section in this file to aid you with creating a manual configuration. This section will start with a list of rules that govern the random generation. This will be the logic the program uses to autofill whatever you don’t enter in. Afterward, the list of default values will begin.
hardware_type
specifies what type of device it is in
general, and is categorized as one of the following:
hardware_subtype
specifies what type of device it is
specifically, and has its own categories based on the
hardware_type
:
hardware_brand
specifies the brand of the device. Each
device can be made by a number of companies, and each subtype has its
own list of default companies. They won’t be listed here for brevity,
but you can check the default parameters section at the end of this file
to find the information.os_category
specifies what category of operating system
it is in general, and is categorized as one of the following:
os_subcategory
specifies what type of operating system
it is specifically, and has its own categories based on
os_category
:
os_dist
specifies the distribution of the operating
system and is based off of os_subcategory
. As there are a
lot of distributions, we won’t list them here, but you can check the
default parameters section to find the information.os_subdist
specifies the sub-distribution or edition of
the operating system and is based off of os_dist
. As there
are a lot of these as well, we won’t list them here, but you can check
the default parameters section to find the information.Some rules to note that will be expressed in random generation:
account_type
specifies what type of account it is in
general, and is categorized as one of the following:
account_subtype
specifies what type of account it is
specifically, and has its own categories based on
account_type
:
ca_status
specifies the status of the certificate
authority and is categorized as one of the following:
Some rules to note that will be expressed in random generation:
The details about the holder’s organization itself is the fourth and
last major detail specified in the “values” of the holder. It is
specified using the holder_info
parameter. This detail is
optional, meaning if it is not there, the holder will auto generate the
information. In addition, if subkeys that are not found within the
parameter will be interpreted as missing and the program will
autogenerate.
common_name
specifies the common name of the
certificate authority or device.country
specifies the country of the certificate
authority or device.state
specifies the state or region of the certificate
authority or device.locality
specifies the city, town, or locality of the
certificate authority or device.org
specifies the organization of the certificate
authority or device.org_unit
specifies the organizational unit of the
certificate authority or device.email
specifies the email address of the certificate
authority or device.url
specifies the URL of the certificate authority or
device.The above parameters are everything that can be manually set for a specific holder. Each default manual configuration example (except for the JSON one) also has comments that explain everything in depth. Please refer to them for guidance on how to set up manual configuration.
In addition, it must be emphasized that the manual configuration file is OPTIONAL. This means that you can also decide to not specify some parameters, or only specify the ones you WANT to change. You will see this if looking the examples, as while some are fully specified, others leave many details up to the random generation and environment parameters.
Account parameters indented as follows-
OS parameters indented as follows-
Hardware parameters indented as follows-