Skip to content

Certifier documentation#5

Open
dyrock wants to merge 1 commit intomasterfrom
certifier_documentation
Open

Certifier documentation#5
dyrock wants to merge 1 commit intomasterfrom
certifier_documentation

Conversation

@dyrock
Copy link
Owner

@dyrock dyrock commented Sep 6, 2018

No description provided.

Description
===========

The ``certifier`` performs two basic tasks: 1) Load SSL certificates from file storage on demand. The total number of loaded certificates kept in memory can be configured. 2) Generates SSL certificates on demand. Generated certificates will be written to file storage for later retrieval.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basic tasks:

#. Load SSL ...
#. Generate SSL ...


The ``certifier`` performs two basic tasks: 1) Load SSL certificates from file storage on demand. The total number of loaded certificates kept in memory can be configured. 2) Generates SSL certificates on demand. Generated certificates will be written to file storage for later retrieval.

To use this plugin, configure it in a :file:`plugin.config` rule, specifying certificates storage path, max number of certificates in memory, and signing cert+key+serial. For example:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"configure it" -> "enable it"


To use this plugin, configure it in a :file:`plugin.config` rule, specifying certificates storage path, max number of certificates in memory, and signing cert+key+serial. For example:

certifier.so --store=/home/zeyuan/certifier/certs --max=1000 --sign-cert=/home/zeyuan/certifier/root-ca.crt --sign-key=/home/zeyuan/certifier/root-ca.key --sign-serial=/home/zeyuan/certifier/ca-serial.txt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want to use the program and options Sphinx macros.

Certificates management is done by `SslLRUList` (a Least-Recently-Used (LRU) list with a lookup map). The structure holding all info related to a given SNI is `SslData`. On lookup/insertion, the lookup map will be accessed and the corresponding `SslData` pointer will be moved to the head in the list. If on lookup/insertion the internal count exceeds the given limit on number of files, the tail node will be removed from both the list and the map.

When the plugin sees an incoming HTTPS request, it does:
1) Look up the SNI in `SslLRUList` and set up the context if a valid context exists. Otherwise, it will schedule a thread to retrieve such context from disk (or generate). If such a thread is already scheduled, it will put this SSL connection onto the queue.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use

#. Look up ...

#. The retriever ...


Setup
=====
* Signing cert, key, and serial

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certificate and key
   For example, ...

Serial number
   A text file containing ...


certifier.so --store=/home/zeyuan/certifier/certs --max=1000 --sign-cert=/home/zeyuan/certifier/root-ca.crt --sign-key=/home/zeyuan/certifier/root-ca.key --sign-serial=/home/zeyuan/certifier/ca-serial.txt

Implementation

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put this as the last section, it is of the least general interest.

====================

* Specify certificate generation related files. If any of the following parameters is missing, the dynamic generation will be disabled.
* ``--sign-cert=<path_to_certificate>`` (`optional`, default:empty/unused) - specifies the path to the root CA certficate. In most cases, this would be a self-signed certificate that is configured to be trusted by all potential clients. Path should be the path and file name of the cert. If it is relative, it is relative to the Traffic Server configuration directory.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be tempted to use the definition list style instead of bulleted list.

*  Specify certificate ...

   ``--sign-cert=<path_to_certificate>``
      specifies the path to the root ...


Example Usage
=============
One use case would be routing incoming CONNECT request to another port on traffic server. With the certifier generating a trusted certificate, other plugins can act with a similar behavior to Man-In-The-Middle (logging interesting data for example).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs more depth in terms of operational set up. A plantuml sequence diagram would be nice.

@dyrock dyrock force-pushed the certifier_documentation branch from ae4e291 to 166b368 Compare September 18, 2018 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants