pki-tomcatd restart timeout during installation of KRA on FreeIPA master using LDAPS
by Martin Babinsky
Hi List,
I have encountered a strange behavior in Dogtag when working on
https://fedorahosted.org/freeipa/ticket/5570
I have set the deployment config for KRA to use LDAPS for communication
with IPA dirsrv backend during spawn. Everything works perfectly, except
that I see the following timeout during ipa-kra-install on FreeIPA master:
http://fpaste.org/329271/45641447/
However the installation finishes as usual and pki-tomcatd service is
running in the end, albeit showing the following traceback:
http://fpaste.org/329260/56413840/
The KRA subsystem is also recognized by subsystem-find:
http://fpaste.org/329335/20387145/
Our upstream XMLRPC tests excersizing KRA and CA subystem also pass, so
clearly functionality is not affected.
Nevertheless something is preventing Dogtag to start up given our 300 s
timeout (i have tried longer intervals up to 1200 s to no avail). In the
IPA KRA install log, I can see our code polling CA's REST interface
unsuccessfully: http://fpaste.org/329294/15776145/
After some few additional installation steps when Dogtag instance is
shutdown and started up again, it goes up just fine and REST api reports
ready status.
I would like to know if this is issue on Dogtag side or some
misconfiguration from my side. I have CA and KRA subsystem logs at hand.
If anyone is interested ping me on IRC and I will give them to you. Endi
an Christian (CC'ed) should also have them at hand.
I should also mentioned that I was only able to reproduce this in my
local vagrant/libvirt environment. Also, deploying CA subsystem on
hardened CA-less FreeIPA server using LDAPS works fine without any timeouts.
Thank you for your help.
--
Martin^3 Babinsky
9 years, 1 month
[PATCH] 689 Added pki-server commands to export system certificates.
by Endi Sukma Dewata
Some pki-server commands have been added to simplify exporting
the required certificates for subsystem installations. These
commands will invoke the pki pkcs12 utility to export the
certificates from the instance NSS database.
The pki-server ca-cert-chain-export command will export the
the certificate chain needed for installing additional
subsystems running on a separate instance.
The pki-server <subsystem>-clone-prepare commands will export
the certificates required for cloning a subsystem.
https://fedorahosted.org/pki/ticket/1742
--
Endi S. Dewata
9 years, 2 months
[PATCH] 688 Updated PKCS12Util.
by Endi Sukma Dewata
The PKCSUtil has been updated to match the functionality provided
by JSS.
In order to import a certificate properly, the certificate needs
to be exported with its private key and certificate chain, so the
option to export without key or without the certificate chain has
been removed. The option to export only the certificate chain has
also been removed since it can be done by exporting the complete
certificate chain, then remove the leaf certificate while keeping
the chain.
The pki pkcs12-cert-add has been modified to provide an option
to create a new PKCS #12 file to store the certificate.
The pki pkcs12-export has been modified to always overwrite
existing file to match the behavior of PKCS12Export. It also has
been modified to accept a list of nicknames of certificates to
export.
https://fedorahosted.org/pki/ticket/1742
--
Endi S. Dewata
9 years, 2 months
Python integration tests with betamax, Vagrant and Ansible
by Christian Heimes
Hi,
I have made some progress with integration tests of our Python API. You
can find my experiments at https://github.com/tiran/pki/commits/betamax
. The integration tests are using pytest fixtures and betamax.
What is betamax?
----------------
https://betamax.readthedocs.org/en/latest/
Betamax is recorder and player. More precisely it is a testing library
for python-requests to record requests and replay responses. In
recording mode it records all requests and stores the requests and
responses in cassettes (JSON files). In replay mode (aka off-line) it
intercepts requests and serves responses from pre-recorded cassettes.
With betamax we can run integration tests against a life Dogtag
installation. Once our tests have been recorded, we don't need a Dogtag
server any more. The recorded test cases become self-sustained and fully
reproducible.
Betamax is in Fedora 23!
How to record?
--------------
Of course we also need a simple to record the initial set, new tests or
to update recordings. Please welcome Ansible and Vagrant! I wrote a
Vagrant file and Ansible playbook that do all the heavily lifting in the
background. The code is currently located at
https://github.com/tiran/pki-vagans .
Once you installed and set up Vagrant and Ansible on your machine, it
takes just one command and about 7 to 10 minutes to install a VM with
Dogtag. The command 'vagrant up' will download Fedora 23, upgrade the
box, set up 389 DS and a Dogtag instance with CA and KRA. With 'vagrant
provision' you can update the machine and even install custom builds
from a directory with RPMs.
What's left to do?
------------------
* write more tests (obviously)
* pki-vagans and integration tests are tuned to my machine. The setup
might not work on your box.
* Tests are currently read-only. I need to figure out a good way for
tests that create data, probably a fixture on module or class level.
Please test :)
Christian
9 years, 2 months