Skip to content

Commit

Permalink
Update sub CA tests
Browse files Browse the repository at this point in the history
The latest NSS requires the client to have the full cert chain
in order to validate a cert, so most of the sub CA tests have
been updated to install the sub CA signing cert in addition to
the root CA signing cert. For some reason the sub CA tests with
HSM still work without these changes. That will be investigated
separately later.
  • Loading branch information
edewata committed Aug 23, 2024
1 parent 0b10570 commit cf27359
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 4 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/ipa-subca-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,19 @@ jobs:
- name: Check Sub-CA admin
run: |
docker exec ipa pki client-cert-import ca_signing --ca-cert root-ca_signing.crt
docker exec ipa pki nss-cert-import \
--cert root-ca_signing.crt \
--trust CT,C,C \
root-ca_signing
docker exec ipa pki nss-cert-import \
--cert ipa.crt \
ca_signing
docker exec ipa pki pkcs12-import \
--pkcs12 /root/ca-agent.p12 \
--pkcs12-password Secret.123
docker exec ipa pki -n ipa-ca-agent ca-user-show admin
- name: Gather artifacts
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/subca-basic-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,19 @@ jobs:

- name: Verify CA admin
run: |
docker exec subordinate pki client-cert-import ca_signing --ca-cert ${SHARED}/root-ca_signing.crt
docker exec subordinate pki nss-cert-import \
--cert $SHARED/root-ca_signing.crt \
--trust CT,C,C \
root-ca_signing
docker exec subordinate pki nss-cert-import \
--cert ca_signing.crt \
ca_signing
docker exec subordinate pki pkcs12-import \
--pkcs12 /root/.dogtag/pki-tomcat/ca_admin_cert.p12 \
--pkcs12-password Secret.123
docker exec subordinate pki -n caadmin --ignore-banner ca-user-show caadmin
- name: Check cert requests in subordinate CA
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/subca-clone-hsm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ jobs:
docker exec primary-subca pki pkcs12-import \
--pkcs12 $SHARED/caadmin.p12 \
--pkcs12-password Secret.123
docker exec primary-subca pki -n caadmin ca-user-show caadmin
- name: Set up secondary DS container
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/subca-clone-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,15 @@ jobs:
docker exec primary-subca pki client-cert-import \
--ca-cert $SHARED/root-ca_signing.crt \
root-ca_signing
docker exec primary-subca pki nss-cert-import \
--cert $SHARED/subca_signing.crt \
ca_signing
docker exec primary-subca pki pkcs12-import \
--pkcs12 $SHARED/caadmin.p12 \
--pkcs12-password Secret.123
docker exec primary-subca pki -n caadmin ca-user-show caadmin
- name: Export primary sub-CA certs
Expand Down Expand Up @@ -241,9 +247,15 @@ jobs:
docker exec secondary-subca pki client-cert-import \
--ca-cert $SHARED/root-ca_signing.crt \
root-ca_signing
docker exec secondary-subca pki nss-cert-import \
--cert $SHARED/subca_signing.crt \
ca_signing
docker exec secondary-subca pki pkcs12-import \
--pkcs12 $SHARED/caadmin.p12 \
--pkcs12-password Secret.123
docker exec secondary-subca pki -n caadmin ca-user-show caadmin
- name: Check users in primary sub-CA and secondary sub-CA
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/subca-cmc-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,19 @@ jobs:

- name: Verify subordinate CA admin cert
run: |
docker exec subordinate pki client-cert-import ca_signing --ca-cert $SHARED/ca_signing.p7b
docker exec subordinate pki nss-cert-import \
--cert $SHARED/root-ca_signing.crt \
--trust CT,C,C \
root-ca_signing
docker exec subordinate pki nss-cert-import \
--cert ca_signing.crt \
ca_signing
docker exec subordinate pki pkcs12-import \
--pkcs12 /root/.dogtag/pki-tomcat/ca_admin_cert.p12 \
--pkcs12-password Secret.123
docker exec subordinate pki -n caadmin ca-user-show caadmin
- name: Check cert requests in subordinate CA
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/subca-external-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,19 @@ jobs:

- name: Verify CA admin
run: |
docker exec pki pki client-cert-import ca_signing --ca-cert root-ca_signing.crt
docker exec pki pki nss-cert-import \
--cert root-ca_signing.crt \
--trust CT,C,C \
root-ca_signing
docker exec pki pki nss-cert-import \
--cert ca_signing.crt \
ca_signing
docker exec pki pki pkcs12-import \
--pkcs12 /root/.dogtag/pki-tomcat/ca_admin_cert.p12 \
--pkcs12-password Secret.123
docker exec pki pki -n caadmin ca-user-show caadmin
- name: Check cert requests in CA
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/subca-hsm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ jobs:
docker exec pki pki pkcs12-import \
--pkcs12 /root/.dogtag/pki-tomcat/ca_admin_cert.p12 \
--pkcs12-password Secret.123
docker exec pki pki -n caadmin ca-user-show caadmin
- name: Check CA certs and requests
Expand Down

0 comments on commit cf27359

Please sign in to comment.