Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
ai
cam
Commits
d82b2c9a
Commit
d82b2c9a
authored
10 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
extend the documentation a bit
parent
da1f62a6
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.rst
+143
-20
143 additions, 20 deletions
README.rst
with
143 additions
and
20 deletions
README.rst
+
143
−
20
View file @
d82b2c9a
=====================================================
cam - minimal X509 Certification Authority management
=====================================================
`cam` is a tiny Python program that can be used to manage a X509
c
ertification
a
uthority for a small organization. It can only create
server certificates, so t
his
is not going to be useful to manage an
`
`cam`
`
is a tiny Python program that can be used to manage a X509
C
ertification
A
uthority for a small organization. It can only create
server certificates, so
i
t is not going to be useful to manage an
X509-based client authentication infrastructure.
The intended usage involves describing the list of certificates to
generate in a configuration file, and using the `cam
'
tool to create
generate in a configuration file, and using the
`
`cam
``
tool to create
and renew them.
Installation
------------
``cam`` has few requirements:
* A moderately recent version of Python 2;
* OpenSSL (>=1.0.0) - specifically, the ``openssl`` binary.
Once you have downloaded the source code, system-wide installation is
simply a matter of::
$ sudo python setup.py install
Configuration
-------------
The configuration file uses INI-like syntax, consisting of a number of
sections. There are two special sections: `ca` and `global`, any other
section is interpreted as a certificate definition.
The configuration file uses a standard INI-like syntax, consisting of
a number of sections. There are two special sections: ``ca`` and
``global``, any other section is interpreted as a certificate
definition.
The `ca` section contains the attributes of the CA itself, see the
The
`
`ca`
`
section contains the attributes of the CA itself, see the
example configuration file to see which attributes are supported.
The `global` section contains configuration parameters for `cam`. The
only configuration parameter supported is `root_dir`, which is where all
the CA private data will be stored. If you leave this parameter empty,
or if you don't define a `global` section at all, this will default to
the directory containing the configuration file.
The ``global`` section contains configuration parameters for ``cam``.
The only configuration parameter supported is ``root_dir``, which is
where all the CA private data will be stored.
Certificates are i
nt
entified by a
''
tag
'',
(the section name), so for
Certificates are i
d
entified by a
*
tag
*
(the section name), so for
example given the following configuration snippet::
[web]
...
...
@@ -38,20 +52,129 @@ you would use the following command to generate it::
$ cam --config=my.config gen web
Certificates and private keys are saved within the CA data directory,
you can obtain their path with::
Global
++++++
The ``global`` section contains options that affect the behavior of
the ``cam`` tool itself. You can usually leave this out altogether.
Available options:
``root_dir``
This is where the CA private data will be stored. If you leave this
parameter empty, or if you don't define a ``global`` section at all,
this will default to the directory containing the configuration file.
Certification Authority
+++++++++++++++++++++++
The ``ca`` section specifies parameters for the Certification
Authority. Some of these are mandatory as they uniquely identify each
CA.
The following parameters specify options of the CA certificate itself.
They are only used once, at CA initialization time (when running ``cam
init``). Subsequent changes to these options will be ignored.
``cn``
Value of the Common Name (CN) field in the X509 Subject.
``org``
Value of the Organization (O) field in the X509 Subject.
``country``
Value of the Country (C) field in the X509 Subject.
``email``
Contact email, added to the X509 CA certificate.
``days``
Number of days that the CA certificate will be valid for (default:
3650, or 10 years).
``crl_url``
Public URL where the CA Certificate Revocation List will be
accessible (optional).
Other options:
``default_days``
Number of days that a new certificate will be valid for (default: 365).
``bits``
Size of the RSA key for the CA certificate, and also default key
size for all newly created certificates (default: 2048).
``signature_algorithm``
Digest algorithm to use for CA signatures (default: sha256).
Certificates
++++++++++++
Every other section defines options for a certificate. Some of these
options can be left unset, in which case a default value will be
provided by the ``ca`` section. ``cn`` must be always specified.
The following options are available:
``days``
Number of days that this certificate will be valid for. If unset,
will use ``ca.default_days``.
``cn``
Common Name (CN) for the X509 Subject.
``ou``
Organizational Unit (OU) for the X509 Subject (optional).
``alt_names``
Space-separated list of alternate names for this certificate. These
will be encoded as DNS entries in the certificate's X509v3 Subject
Alternative Name field.
Usage
-----
Once you have created a configuration file, initialize the CA by
running::
$ cam --config=my.config init
This will create the CA certificate and private key, and it will ask
you to set a passphrase for the key. Pick something secure.
Once this is done, you will be able to generate the certificates
described in the configuration using the ``cam gen`` command. For
example, if the configuration defines a certificate with a tag of
``web``::
$ cam --config=my.config gen web
The tool will ask you for the CA passphrase, and it will create a
certificate and a private key in the CA private data directory. You
can obtain their path with::
$ cam --config=my.config files web
/your/ca/dir/public/certs/web.pem
/your/ca/dir/private/web.key
At any time you can inspect the status of the configured certificates
(and see which ones are about to expire) using the ``cam list``
command::
Installation
------------
$ cam --config=my.config list
Standalone Install
------------------
The CA private keys are very sensitive information, so you'll want to
store them in some encrypted removable storage. You can bundle the
`cam`
application itself with the CA data by using `virtualenv`::
store them in some encrypted removable storage. You can bundle the
``cam``
application itself with the CA data by using
`
`virtualenv`
`
::
$ virtualenv --no-site-packages /secure/cam
$ virtualenv --relocatable /secure/cam
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment