Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Documentation Updates #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions docs/source/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ settings block, as found in the configuration file, is shown below:
[client]
host=127.0.0.1
port=5696
certfile=/path/to/certificate/file
keyfile=/path/to/certificate/key/file
ca_certs=/path/to/ca/certificate/file
keyfile=/etc/pykmip/certs/key.pem
certfile=/etc/pykmip/certs/cert.pem
cert_reqs=CERT_REQUIRED
ssl_version=PROTOCOL_SSLv23
ca_certs=/etc/pykmip/certs/cert.pem
do_handshake_on_connect=True
suppress_ragged_eofs=True
username=example_username
Expand Down Expand Up @@ -95,17 +95,17 @@ specifying the different configuration values:
>>> import ssl
>>> from kmip.pie.client import ProxyKmipClient, enums
>>> client = ProxyKmipClient(
... hostname='127.0.0.1',
... port=5696,
... cert='/path/to/certificate/file',
... key='/path/to/certificate/key/file',
... ca='/path/to/ca/certificate/file',
... ssl_version=ssl.PROTOCOL_SSLv23,
... username='example_username',
... password='example_password',
... config='client',
... config_file='/etc/pykmip/pykmip.conf',
... kmip_version=enums.KMIPVersion.KMIP_1_2
... host=127.0.0.1
... port=5696
... keyfile=/etc/pykmip/certs/key.pem
... certfile=/etc/pykmip/certs/cert.pem
... cert_reqs=CERT_REQUIRED
... ssl_version=PROTOCOL_SSLv23
... ca_certs=/etc/pykmip/certs/cert.pem
... do_handshake_on_connect=True
... suppress_ragged_eofs=True
... username=example_username
... password=example_password
... )

Settings specified at runtime, as in the above example, will take precedence
Expand Down
22 changes: 19 additions & 3 deletions docs/source/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,20 @@ All PyKMIP documentation is written in `RST`_ format and managed using
If you are interested in contributing to the project documentation, install
the project documentation requirements:

Python 2.7
~~~~~~~~~~

.. code:: console

$ pip install -r doc-requirements.txt

Python 3.4+
~~~~~~~~~~

.. code:: console

$ pip3 install -r doc-requirements.txt

To build the documentation, navigate into the ``docs`` directory and run:

.. code:: console
Expand Down Expand Up @@ -115,6 +125,12 @@ provided for security, style, and documentation checks.
the root of the PyKMIP repository, in the same directory as the
``tox.ini`` configuration file.

To setup tox please run the following:

.. code-block:: console

$ ./.travis/run.sh

The style checks leverage ``flake8`` and can be run like so:

.. code-block:: console
Expand Down Expand Up @@ -188,19 +204,19 @@ when invoking the integration tests.

To run the integration test suite, the configuration file section name for
the client settings must be passed to the test suite using the ``--config``
configuration argument. Assuming the section name is ``server_1``, the
configuration argument. Assuming the section name is ``client``, the
following ``tox`` command will set up and execute the integration tests:

.. code-block:: console

$ tox -r -e integration -- --config server_1
$ tox -r -e integration -- --config client

Like the unit tests, use the ``-k`` flag to specify a specific test suite
method or class.

.. code-block:: console

$ tox -r -e integration -- --config server_1 -k TestProxyKmipClientIntegration
$ tox -r -e integration -- --config client -k TestProxyKmipClientIntegration

Functional Tests
~~~~~~~~~~~~~~~~
Expand Down
10 changes: 10 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,20 @@ Installation
------------
You can install PyKMIP via ``pip``:

Python 2.7
~~~~~~~~~~

.. code-block:: console

$ pip install pykmip

Python 3.4+
~~~~~~~~~~~

.. code-block:: console

$ pip3 install pykmip

See :doc:`Installation <installation>` for more information.

Layout
Expand Down
39 changes: 35 additions & 4 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
Installation
============
You can install PyKMIP via ``pip``:
Python 2.7
~~~~~~~~~~
You can install PyKMIP via ``pip``

.. code-block:: console

$ pip install pykmip

Python 3.4+
~~~~~~~~~~~
You can install PyKMIP via ``pip3``:

.. code-block:: console

$ pip3 install pykmip

Supported platforms
-------------------
PyKMIP is tested on Python 2.7, 3.4, 3.5, 3.6, and 3.7 on the following
Expand All @@ -18,21 +28,42 @@ officially supported or tested.

Building PyKMIP on Linux
------------------------

Python 2.7
~~~~~~~~~~
You can install PyKMIP from source via ``git``:

.. code-block:: console

$ git clone https://github.com/openkmip/pykmip.git
$ python pykmip/setup.py install

Ubuntu
******
If you are on a fresh Linux build, you may also need several additional system
dependencies, including headers for Python, OpenSSL, ``libffi``, and
``libsqlite3``.

.. code-block:: console

$ apt-get install python-dev libffi-dev libssl-dev libsqlite3-dev


Python 3.4+
~~~~~~~~~~~
You can install PyKMIP from source via ``git``:

.. code-block:: console

$ git clone https://github.com/openkmip/pykmip.git
$ python3 pykmip/setup.py install

Ubuntu
~~~~~~
Replace ``python-dev`` with ``python3-dev`` if you are using Python 3.0+.
******
If you are on a fresh Linux build, you may also need several additional system
dependencies, including headers for Python, OpenSSL, ``libffi``, and
``libsqlite3``.

.. code-block:: console

$ sudo apt-get install python-dev libffi-dev libssl-dev libsqlite3-dev
$ apt-get install python3-dev libffi-dev libssl-dev libsqlite3-dev
2 changes: 1 addition & 1 deletion docs/source/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ to collect additional information and work with you to address the security
issue. If applicable, a new library subrelease will be produced across all
actively supported releases to address and fix the issue.

If the developerment team decides the issue does not warrant the sensitivity
If the development team decides the issue does not warrant the sensitivity
of a security issue, you may file a public GitHub issue on the project
`issue tracker`_.

Expand Down
61 changes: 33 additions & 28 deletions docs/source/server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,12 @@ as found in the configuration file, is shown below:
[server]
hostname=127.0.0.1
port=5696
certificate_path=/path/to/certificate/file
key_path=/path/to/certificate/key/file
ca_path=/path/to/ca/certificate/file
auth_suite=Basic
policy_path=/path/to/policy/file
enable_tls_client_auth=True
tls_cipher_suites=
TLS_RSA_WITH_AES_128_CBC_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
logging_level=DEBUG
certificate_path=/etc/pykmip/certs/cert.pem
key_path=/etc/pykmip/certs/key.pem
ca_path=/etc/pykmip/certs/cert.pem
auth_suite=TLS1.2
enable_tls_client_auth=False
policy_path=/etc/pykmip/policies/
database_path=/tmp/pykmip.db

The server can also be configured manually via Python. The following example
Expand All @@ -47,23 +42,15 @@ different configuration values:

>>> from kmip.services.server import KmipServer
>>> server = KmipServer(
... hostname='127.0.0.1',
... port=5696,
... certificate_path='/path/to/certificate/file/',
... key_path='/path/to/certificate/key/file/',
... ca_path='/path/to/ca/certificate/file/',
... auth_suite='Basic',
... config_path='/etc/pykmip/server.conf',
... log_path='/var/log/pykmip/server.log',
... policy_path='/etc/pykmip/policies',
... enable_tls_client_auth=True,
... tls_cipher_suites=[
... 'TLS_RSA_WITH_AES_128_CBC_SHA256',
... 'TLS_RSA_WITH_AES_256_CBC_SHA256',
... 'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384'
... ],
... logging_level='DEBUG',
... database_path='/tmp/pykmip.db'
... hostname=127.0.0.1
... port=5696
... certificate_path=/etc/pykmip/certs/cert.pem
... key_path=/etc/pykmip/certs/key.pem
... ca_path=/etc/pykmip/certs/cert.pem
... auth_suite=TLS1.2
... enable_tls_client_auth=False
... policy_path=/etc/pykmip/policies/
... database_path=/tmp/pykmip.db
... )

The different configuration options are defined below:
Expand Down Expand Up @@ -159,6 +146,8 @@ integration, see :ref:`third-party-auth-integration`.

Usage
-----
Python 2.7
~~~~~~~~~~
The software server can be run using the ``bin/run_server.py`` startup script.
If you are currently in the PyKMIP root directory, use the following command:

Expand All @@ -173,6 +162,22 @@ to it:

$ python bin/run_server.py -h

Python 3.4+
~~~~~~~~~~~
The software server can be run using the ``bin/run_server.py`` startup script.
If you are currently in the PyKMIP root directory, use the following command:

.. code-block:: console

$ python3 bin/run_server.py

If you need more information about running the startup script, pass ``-h``
to it:

.. code-block: console

$ python3 bin/run_server.py -h

.. note::
You may need to run the server as root, depending on the permissions of the
configuration, log, and certificate file directories.
Expand Down