Skip to content

Commit

Permalink
Add CI test for OCSP self crl check
Browse files Browse the repository at this point in the history
When LDAP store is used the OCSP can be configured to check certificate
using the stored CRL. This is implemented in PR dogtagpki#4545.
  • Loading branch information
fmarco76 committed Aug 23, 2023
1 parent 3a0c755 commit 8731324
Show file tree
Hide file tree
Showing 22 changed files with 933 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/ocsp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,36 @@ jobs:
uses: ./.github/workflows/ocsp-hsm-test.yml
with:
db-image: ${{ needs.init.outputs.db-image }}

ocsp-crl-ldap-self-verification-test:
name: OCSP with self certificate verification test
needs: [init, build]
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Retrieve PKI images
uses: actions/cache@v3
with:
key: pki-images-${{ github.sha }}
path: pki-images.tar

- name: Load PKI images
run: docker load --input pki-images.tar

- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install ansible
run: |
python -m pip install --upgrade pip
pip install --user -r tests/ansible/requirements.txt
- name: Execute est playbook
run: |
ansible-playbook -e 'pki_subsystem="ocsp"' tests/ansible/pki-playbook.yml
env:
ANSIBLE_CONFIG: ${{ github.workspace }}/tests/ansible/ansible.cfg
27 changes: 27 additions & 0 deletions tests/ansible/ca_signing.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN CERTIFICATE-----
MIIEfTCCAuWgAwIBAgIQavVXHCitBbcwDsABcEu5fjANBgkqhkiG9w0BAQsFADBI
MRAwDgYDVQQKDAdFWEFNUExFMRMwEQYDVQQLDApwa2ktdG9tY2F0MR8wHQYDVQQD
DBZDQSBTaWduaW5nIENlcnRpZmljYXRlMB4XDTIzMDgyMzEwMDYxNVoXDTQzMDgy
MzEwMDYxNVowSDEQMA4GA1UECgwHRVhBTVBMRTETMBEGA1UECwwKcGtpLXRvbWNh
dDEfMB0GA1UEAwwWQ0EgU2lnbmluZyBDZXJ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I8o6cDUEm8NurG60QH67bLZPsrsL09YXNCppDms2y223DDiJ
Fbz4nw5DmzJPYLI4ASPyOrKKaRIv5kjd2VFaQJSJ432wA8AdKbjwhmQxx22g71At
q60YXW0PxYegDiqHqlgyjBCR88JperwCmXkyl2WwE6xMFvkWvBRY4QQKe+jSDBOO
Tw==
-----END CERTIFICATE-----
2 changes: 1 addition & 1 deletion tests/ansible/est/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# defaults file for est

shared_workspace: /tmp/workdir/pki
github_workspace: ./
github_workspace: ../../

#DS
ds_container: ds
Expand Down
37 changes: 37 additions & 0 deletions tests/ansible/ocsp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
OCSP
=========

OCSP tests for CI

Requirements
------------

The only requirement is the `community.docker` module


Role Variables
--------------

A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.



Example Playbook
----------------

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

- hosts: servers
roles:
- ocsp

License
-------

GPL-2-and-later

Author Information
------------------

Marco Fargetta (mfargett@redhat.com)

33 changes: 33 additions & 0 deletions tests/ansible/ocsp/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
# defaults file for ocsp

shared_workspace: /tmp/workdir/pki
github_workspace: ../../

#CA-DS
cads_container: cads
cads_image: pki-runner
cads_hostname: cads.example.com
cads_password: Secret.123

#CA
ca_container: ca
ca_image: pki-runner
ca_hostname: ca.example.com

#OCSP-DS
ocspds_container: ocspds
ocspds_image: pki-runner
ocspds_hostname: ocspds.example.com
ocspds_password: Secret.123

#OCSP
ocsp_container: ocsp
ocsp_image: pki-runner
ocsp_hostname: ocsp.example.com


#Client
client_container: client
client_image: quay.io/dogtagpki/libest
client_hostname: client.example.com
2 changes: 2 additions & 0 deletions tests/ansible/ocsp/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
# handlers file for ocsp
24 changes: 24 additions & 0 deletions tests/ansible/ocsp/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
galaxy_info:
author: Marco Fargetta (mfargett@redhat.com)
description: OCSP tests for CI
company: Red Hat


license: GPL-2.0-or-later

min_ansible_version: 2.1


platforms:
- name: Fedora
versions:
- all
- name: Ubuntu
versions:
- 22.04

galaxy_tags:
- dogtag
- pki

dependencies: []
Loading

0 comments on commit 8731324

Please sign in to comment.