PKI testing tool
Project description
Certomancer
Quickly construct, mock & deploy PKI test configurations using simple declarative configuration. Includes CRL, OCSP and time stamping service provisioning.
Requires Python 3.7 or later.
Quick start
Certomancer is available on PyPI. See example.yml
for an example config file.
$ pip install 'certomancer[web-api]'
$ certomancer --config example.yml animate
This will run the Certomancer Animator WSGI app on your local machine, behind a development web
server. Point your browser to http://localhost:9000
and take a look around.
For more information, see the documentation below.
Installing the development version
To build and install an (unreleased) development version, you can proceed as follows.
$ git clone https://github.com/MatthiasValvekens/certomancer
$ cd certomancer
$ python -m build
$ pip install dist/certomancer*.whl
Demo
There's a demo on asciinema.org, demonstrating some of the core features of Certomancer. See link below.
FOSDEM '22 talk
I gave a lightning talk on testing & mocking PKI services in the Testing & Automation devroom at FOSDEM 2022. Certomancer was (of course) featured in the presentation. If you want to learn more, or watch the recording, have a look at the talk page for further info. Slides are included as well.
Features
- Certomancer's core APIs are stateless: the same request should always return the same result.
This property makes it very useful for automated testing.
- Note that "the same result" does not necessarily mean "byte-for-byte equal". This is because some signing schemes (like ECDSA) involve random nonces. In addition to that, time is also a factor in certain cases (but Certomancer does permit time manipulation).
- Declarative, YAML-based configuration.
- Minimal input validation, so you can generate deliberately broken certificates if you need to.
requests-mock
integration.- Attribute certificate support (
0.7.0
and up) - Ultra-lightweight WSGI application: the Certomancer Animator serves CRLs, OCSP responses, timestamps and more. This component requires Werkzeug, and optionally Jinja2 for the index view. Other than a web server and WSGI application server, there are no application dependencies.
- Plugin framework to support arbitrary certificate / CRL extensions and additional services.
These plugins are compatible with the WSGI and
requests-mock
integrations without additional configuration. - Certomancer is composable: since the Certomancer Animator is a bare-bones WSGI application, you can plug it into whatever web application framework you want with minimal overhead. Hence, for particularly complicated scenarios where the plugin API or existing integrations aren't sufficient, it is very easy to use Certomancer as a library, or wrap it as a component of some other WSGI application.
- With pyca/cryptography installed, Certomancer can also output PKCS#12 files if your tests require those.
- With python-pkcs11 installed, Certomancer can write keys and certificates to PKCS#11 tokens as well.
Non-features
Certomancer is a testing tool for developers that write software to interface with public-key infrastructure. It is NOT intended to be used to manage production PKI deployments. Certomancer is very much garbage-in garbage-out, and happily ignores validation & security best practices in favour of allowing you to abuse your codebase in the worst possible ways. Consider yourself warned.
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file certomancer-0.12.2.tar.gz
.
File metadata
- Download URL: certomancer-0.12.2.tar.gz
- Upload date:
- Size: 74.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fd3ba45e9790fc98e1a3458fbafe61aa1f468f3a34c1ebc2f1ebadbfbcae30e |
|
MD5 | e4efc06f6e7ff81c00bde0daddf087ed |
|
BLAKE2b-256 | 13bb9bd7b33de2c9138b33095cbcf2f80fba0616360a34d512f9e2001548e9b6 |
Provenance
The following attestation bundles were made for certomancer-0.12.2.tar.gz
:
Publisher:
release.yml
on MatthiasValvekens/certomancer
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
certomancer-0.12.2.tar.gz
- Subject digest:
5fd3ba45e9790fc98e1a3458fbafe61aa1f468f3a34c1ebc2f1ebadbfbcae30e
- Sigstore transparency entry: 149354435
- Sigstore integration time:
- Predicate type:
File details
Details for the file certomancer-0.12.2-py3-none-any.whl
.
File metadata
- Download URL: certomancer-0.12.2-py3-none-any.whl
- Upload date:
- Size: 72.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ee9224a4b3706f95475d75bc754cf96792b7931d2c293c2fce7b5108eb5e472 |
|
MD5 | cbefa8f63150c7b8193d655e3420afdf |
|
BLAKE2b-256 | ae6e6d475c75023bacb43b841cb7497878380d6ea8044bbe457701eb84c94476 |
Provenance
The following attestation bundles were made for certomancer-0.12.2-py3-none-any.whl
:
Publisher:
release.yml
on MatthiasValvekens/certomancer
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
certomancer-0.12.2-py3-none-any.whl
- Subject digest:
7ee9224a4b3706f95475d75bc754cf96792b7931d2c293c2fce7b5108eb5e472
- Sigstore transparency entry: 149354436
- Sigstore integration time:
- Predicate type: