-
Notifications
You must be signed in to change notification settings - Fork 139
744 lines (622 loc) · 24.5 KB
/
ocsp-container-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
name: OCSP container
on: workflow_call
env:
DS_IMAGE: ${{ vars.DS_IMAGE || 'quay.io/389ds/dirsrv' }}
jobs:
# https://github.com/dogtagpki/pki/wiki/Deploying-OCSP-Container
test:
name: Test
runs-on: ubuntu-latest
env:
SHARED: /tmp/workdir/pki
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install libxml2-utils
# replace docker with podman
sudo apt-get -y purge --auto-remove docker-ce-cli
sudo apt-get -y install podman-docker
- name: Clone repository
uses: actions/checkout@v4
- name: Retrieve PKI images
uses: actions/cache@v4
with:
key: pki-images-${{ github.sha }}
path: pki-images.tar
- name: Load PKI images
run: docker load --input pki-images.tar
- name: Create network
run: docker network create example
- name: Create shared folders
run: |
mkdir -p ca/certs
mkdir -p ca/conf
mkdir -p ca/logs
mkdir -p ocsp/certs
mkdir -p ocsp/conf
mkdir -p ocsp/logs
- name: Set up client container
run: |
tests/bin/runner-init.sh \
--hostname=client.example.com \
--network=example \
client
- name: Set up CA container
run: |
docker run \
--name ca \
--hostname ca.example.com \
--network example \
--network-alias ca.example.com \
-v $PWD/ca/certs:/certs \
-v $PWD/ca/conf:/conf \
-v $PWD/ca/logs:/logs \
-e PKI_DS_URL=ldap://cads.example.com:3389 \
-e PKI_DS_PASSWORD=Secret.123 \
--detach \
pki-ca
# wait for CA to start
docker exec client curl \
--retry 180 \
--retry-delay 0 \
--retry-connrefused \
-s \
-k \
-o /dev/null \
https://ca.example.com:8443
- name: Check CA info
run: |
docker exec ca pki-server cert-export \
--cert-file ca_signing.crt \
ca_signing
docker cp ca:ca_signing.crt .
docker exec client pki nss-cert-import \
--cert $SHARED/ca_signing.crt \
--trust CT,C,C \
ca_signing
docker exec client pki \
-U https://ca.example.com:8443 \
info
- name: Set up CA DS container
run: |
tests/bin/ds-create.sh \
--image=${{ env.DS_IMAGE }} \
--hostname=ds.example.com \
--network=example \
--network-alias=cads.example.com \
--password=Secret.123 \
cads
# https://github.com/dogtagpki/pki/wiki/Setting-up-CA-Database
- name: Initialize CA database
run: |
docker exec ca pki-server ca-db-init -v
docker exec ca pki-server ca-db-index-add -v
docker exec ca pki-server ca-db-index-rebuild -v
docker exec ca pki-server ca-db-vlv-add -v
docker exec ca pki-server ca-db-vlv-reindex -v
- name: Import CA signing cert into CA database
run: |
docker exec ca pki-server cert-export \
--cert-file /conf/certs/ca_signing.crt \
ca_signing
docker exec ca pki-server ca-cert-import \
--cert /conf/certs/ca_signing.crt \
--csr /conf/certs/ca_signing.csr \
--profile /usr/share/pki/ca/conf/caCert.profile
- name: Import CA OCSP signing cert into CA database
run: |
docker exec ca pki-server cert-export \
--cert-file /conf/certs/ca_ocsp_signing.crt \
ca_ocsp_signing
docker exec ca pki-server ca-cert-import \
--cert /conf/certs/ca_ocsp_signing.crt \
--csr /conf/certs/ca_ocsp_signing.csr \
--profile /usr/share/pki/ca/conf/caOCSPCert.profile
- name: Import CA subsystem cert into CA database
run: |
docker exec ca pki-server cert-export \
--cert-file /conf/certs/subsystem.crt \
subsystem
docker exec ca pki-server ca-cert-import \
--cert /conf/certs/subsystem.crt \
--csr /conf/certs/subsystem.csr \
--profile /usr/share/pki/ca/conf/rsaSubsystemCert.profile
- name: Import SSL server cert into CA database
run: |
docker exec ca pki-server cert-export \
--cert-file /conf/certs/sslserver.crt \
sslserver
docker exec ca pki-server ca-cert-import \
--cert /conf/certs/sslserver.crt \
--csr /conf/certs/sslserver.csr \
--profile /usr/share/pki/ca/conf/rsaServerCert.profile
- name: Create admin cert
run: |
# create cert request
docker exec client pki nss-cert-request \
--subject "CN=Administrator" \
--ext /usr/share/pki/server/certs/admin.conf \
--csr $SHARED/admin.csr
docker cp admin.csr ca:.
# issue cert
docker exec ca pki-server ca-cert-create \
--csr admin.csr \
--profile /usr/share/pki/ca/conf/rsaAdminCert.profile \
--cert admin.crt \
--import-cert
docker cp ca:admin.crt .
# import cert
docker exec client pki nss-cert-import \
--cert $SHARED/admin.crt \
admin
# https://github.com/dogtagpki/pki/wiki/Setting-up-CA-Admin-User
- name: Add CA admin user
run: |
docker exec ca pki-server ca-user-add \
--full-name Administrator \
--type adminType \
--cert admin.crt \
admin
- name: Add CA admin user into CA groups
run: |
docker exec ca pki-server ca-user-role-add admin "Administrators"
docker exec ca pki-server ca-user-role-add admin "Certificate Manager Agents"
- name: Check CA admin user
run: |
docker exec client pki \
-U https://ca.example.com:8443 \
-n admin \
ca-user-show \
admin
- name: Create OCSP signing cert
run: |
docker exec client pki nss-cert-request \
--subject "CN=OCSP Signing Certificate" \
--ext /usr/share/pki/server/certs/ocsp_signing.conf \
--csr $SHARED/ocsp/certs/ocsp_signing.csr
docker exec client pki \
-d $SHARED/ca/conf/alias \
nss-cert-issue \
--issuer ca_signing \
--csr $SHARED/ocsp/certs/ocsp_signing.csr \
--ext /usr/share/pki/server/certs/ocsp_signing.conf \
--cert $SHARED/ocsp/certs/ocsp_signing.crt
docker exec client pki nss-cert-import \
--cert $SHARED/ocsp/certs/ocsp_signing.crt \
ocsp_signing
docker exec client pki nss-cert-show ocsp_signing
- name: Create OCSP subsystem cert
run: |
docker exec client pki nss-cert-request \
--subject "CN=Subsystem Certificate" \
--ext /usr/share/pki/server/certs/subsystem.conf \
--csr $SHARED/ocsp/certs/subsystem.csr
docker exec client pki \
-d $SHARED/ca/conf/alias \
nss-cert-issue \
--issuer ca_signing \
--csr $SHARED/ocsp/certs/subsystem.csr \
--ext /usr/share/pki/server/certs/subsystem.conf \
--cert $SHARED/ocsp/certs/subsystem.crt
docker exec client pki nss-cert-import \
--cert $SHARED/ocsp/certs/subsystem.crt \
subsystem
docker exec client pki nss-cert-show subsystem
- name: Create OCSP SSL server cert
run: |
docker exec client pki nss-cert-request \
--subject "CN=ocsp.example.com" \
--ext /usr/share/pki/server/certs/sslserver.conf \
--csr $SHARED/ocsp/certs/sslserver.csr
docker exec client pki \
-d $SHARED/ca/conf/alias \
nss-cert-issue \
--issuer ca_signing \
--csr $SHARED/ocsp/certs/sslserver.csr \
--ext /usr/share/pki/server/certs/sslserver.conf \
--cert $SHARED/ocsp/certs/sslserver.crt
docker exec client pki nss-cert-import \
--cert $SHARED/ocsp/certs/sslserver.crt \
sslserver
docker exec client pki nss-cert-show sslserver
- name: Prepare OCSP certs and keys
run: |
# export CA signing cert
docker exec client cp $SHARED/ca/conf/certs/ca_signing.crt $SHARED/ocsp/certs
docker exec client pki nss-cert-find
# export OCSP system certs and keys
docker exec client pki pkcs12-export \
--pkcs12 $SHARED/ocsp/certs/server.p12 \
--password Secret.123 \
ocsp_signing \
subsystem \
sslserver
docker exec client pki pkcs12-cert-find \
--pkcs12 $SHARED/ocsp/certs/server.p12 \
--password Secret.123
ls -la ocsp/certs
- name: Set up OCSP container
run: |
docker run \
--name ocsp \
--hostname ocsp.example.com \
--network example \
--network-alias ocsp.example.com \
-v $PWD/ocsp/certs:/certs \
-v $PWD/ocsp/conf:/conf \
-v $PWD/ocsp/logs:/logs \
-e PKI_DS_URL=ldap://ocspds.example.com:3389 \
-e PKI_DS_PASSWORD=Secret.123 \
--detach \
pki-ocsp
- name: Wait for OCSP container to start
run: |
docker exec client curl \
--retry 180 \
--retry-delay 0 \
--retry-connrefused \
-s \
-k \
-o /dev/null \
https://ocsp.example.com:8443
- name: Check OCSP conf dir
if: always()
run: |
ls -l ocsp/conf \
| sed \
-e '/^total/d' \
-e 's/^\(\S*\) *\S* *\S* *\(\S*\) *\S* *\S* *\S* *\S* *\(.*\)$/\1 \2 \3/' \
| tee output
# everything should be owned by docker group
# TODO: review owners/permissions
cat > expected << EOF
drwxrwxrwx docker Catalina
drwxrwxrwx docker alias
-rw-rw-rw- docker catalina.policy
lrwxrwxrwx docker catalina.properties -> /usr/share/pki/server/conf/catalina.properties
drwxrwxrwx docker certs
lrwxrwxrwx docker context.xml -> /etc/tomcat/context.xml
-rw-rw-rw- docker jss.conf
lrwxrwxrwx docker logging.properties -> /usr/share/pki/server/conf/logging.properties
drwxrwxrwx docker ocsp
-rw-rw-rw- docker password.conf
-rw-rw-rw- docker server.xml
-rw-rw-rw- docker serverCertNick.conf
-rw-rw-rw- docker tomcat.conf
lrwxrwxrwx docker web.xml -> /etc/tomcat/web.xml
EOF
diff expected output
- name: Check OCSP conf/ocsp dir
if: always()
run: |
ls -l ocsp/conf/ocsp \
| sed \
-e '/^total/d' \
-e 's/^\(\S*\) *\S* *\S* *\(\S*\) *\S* *\S* *\S* *\S* *\(.*\)$/\1 \2 \3/' \
-e '/^\S* *\S* *CS.cfg.bak /d' \
| tee output
# everything should be owned by docker group
# TODO: review owners/permissions
cat > expected << EOF
-rw-rw-rw- docker CS.cfg
drwxrwxrwx docker archives
-rw-rw-rw- docker registry.cfg
EOF
diff expected output
- name: Check OCSP logs dir
if: always()
run: |
ls -l ocsp/logs \
| sed \
-e '/^total/d' \
-e 's/^\(\S*\) *\S* *\S* *\(\S*\) *\S* *\S* *\S* *\S* *\(.*\)$/\1 \2 \3/' \
| tee output
DATE=$(date +'%Y-%m-%d')
# everything should be owned by docker group
# TODO: review owners/permissions
cat > expected << EOF
drwxrwx--- docker backup
-rw-rw-rw- docker catalina.$DATE.log
-rw-rw-rw- docker host-manager.$DATE.log
-rw-rw-rw- docker localhost.$DATE.log
-rw-rw-rw- docker localhost_access_log.$DATE.txt
-rw-rw-rw- docker manager.$DATE.log
drwxrwxrwx docker ocsp
drwxrwxrwx docker pki
EOF
diff expected output
- name: Check OCSP info
run: |
docker exec client pki \
-U https://ocsp.example.com:8443 \
info
- name: Set up OCSP DS container
run: |
tests/bin/ds-create.sh \
--image=${{ env.DS_IMAGE }} \
--hostname=ds.example.com \
--network=example \
--network-alias=ocspds.example.com \
--password=Secret.123 \
ocspds
# https://github.com/dogtagpki/pki/wiki/Setting-up-OCSP-Database
- name: Set up OCSP database
run: |
docker exec ocsp pki-server ocsp-db-init -v
docker exec ocsp pki-server ocsp-db-index-add -v
docker exec ocsp pki-server ocsp-db-index-rebuild -v
docker exec ocsp pki-server ocsp-db-vlv-add -v
docker exec ocsp pki-server ocsp-db-vlv-reindex -v
# https://github.com/dogtagpki/pki/wiki/Setting-up-OCSP-Admin-User
- name: Add OCSP admin user
run: |
docker cp admin.crt ocsp:.
docker exec ocsp pki-server ocsp-user-add \
--full-name Administrator \
--type adminType \
--cert admin.crt \
admin
- name: Add OCSP admin user into OCSP groups
run: |
docker exec ocsp pki-server ocsp-user-role-add admin "Administrators"
- name: Check OCSP admin user
run: |
docker exec client pki \
-U https://ocsp.example.com:8443 \
-n admin \
ocsp-user-show \
admin
# https://github.com/dogtagpki/pki/wiki/Setting-up-Subsystem-User
- name: Add CA subsystem user in OCSP
run: |
cp ca/conf/certs/subsystem.crt ocsp/conf/certs/ca_subsystem.crt
docker exec ocsp pki-server ocsp-user-add \
--full-name CA-ca.example.com-8443 \
--type agentType \
--cert /conf/certs/ca_subsystem.crt \
CA-ca.example.com-8443
- name: Assign roles to CA subsystem user
run: |
docker exec ocsp pki-server ocsp-user-role-add CA-ca.example.com-8443 "Trusted Managers"
- name: Add CRL issuing point
run: |
# convert CA signing cert into PKCS #7 chain
docker exec ocsp pki pkcs7-cert-import --pkcs7 /certs/ca_signing.p7 --input-file /certs/ca_signing.crt
docker exec ocsp pki pkcs7-cert-find --pkcs7 /certs/ca_signing.p7
# create CRL issuing point with the PKCS #7 chain
docker exec ocsp pki-server ocsp-crl-issuingpoint-add --cert-chain /certs/ca_signing.p7
- name: Configure OCSP connector in CA
run: |
# configure OCSP publisher
docker exec ca pki-server ca-config-set ca.publish.publisher.instance.OCSPPublisher.enableClientAuth true
docker exec ca pki-server ca-config-set ca.publish.publisher.instance.OCSPPublisher.host ocsp.example.com
docker exec ca pki-server ca-config-set ca.publish.publisher.instance.OCSPPublisher.nickName subsystem
docker exec ca pki-server ca-config-set ca.publish.publisher.instance.OCSPPublisher.path /ocsp/agent/ocsp/addCRL
docker exec ca pki-server ca-config-set ca.publish.publisher.instance.OCSPPublisher.pluginName OCSPPublisher
docker exec ca pki-server ca-config-set ca.publish.publisher.instance.OCSPPublisher.port 8443
# configure CRL publishing rule
docker exec ca pki-server ca-config-set ca.publish.rule.instance.OCSPRule.enable true
docker exec ca pki-server ca-config-set ca.publish.rule.instance.OCSPRule.mapper NoMap
docker exec ca pki-server ca-config-set ca.publish.rule.instance.OCSPRule.pluginName Rule
docker exec ca pki-server ca-config-set ca.publish.rule.instance.OCSPRule.publisher OCSPPublisher
docker exec ca pki-server ca-config-set ca.publish.rule.instance.OCSPRule.type crl
# enable CRL publishing
docker exec ca pki-server ca-config-set ca.publish.enable true
# set buffer size to 0 so that revocation will take effect immediately
docker exec ca pki-server ca-config-set auths.revocationChecking.bufferSize 0
# update CRL immediately after each cert revocation
docker exec ca pki-server ca-crl-ip-mod -D alwaysUpdate=true MasterCRL
- name: Restart CA
run: |
docker restart ca
sleep 10
docker network reload --all
# wait for CA to restart
docker exec client curl \
--retry 180 \
--retry-delay 0 \
--retry-connrefused \
-s \
-k \
-o /dev/null \
https://ca.example.com:8443
- name: Create user cert
run: |
docker exec client pki \
-U https://ca.example.com:8443 \
client-cert-request \
uid=testuser | tee output
REQUEST_ID=$(sed -n "s/^\s*Request ID:\s*\(\S*\)$/\1/p" output)
echo "Request ID: $REQUEST_ID"
docker exec client pki \
-U https://ca.example.com:8443 \
-n admin \
ca-cert-request-approve \
--force \
$REQUEST_ID | tee output
CERT_ID=$(sed -n "s/^\s*Certificate ID:\s*\(\S*\)$/\1/p" output)
echo "Cert ID: $CERT_ID"
echo "$CERT_ID" > cert.id
- name: Check OCSP responder with initial CRL
run: |
CERT_ID=$(cat cert.id)
# export admin cert and key
docker exec client pki pkcs12-export \
--pkcs12 admin.p12 \
--password Secret.123 \
admin
# https://github.com/dogtagpki/pki/wiki/UpdateCRL-Service
docker exec client curl \
--cert-type P12 \
--cert admin.p12:Secret.123 \
-sk \
-d "xml=true" \
https://ca.example.com:8443/ca/agent/ca/updateCRL \
| xmllint --format -
# wait for CRL update
sleep 10
# check cert status using OCSPClient
docker exec client OCSPClient \
-d /root/.dogtag/nssdb \
-h ocsp.example.com \
-p 8080 \
-t /ocsp/ee/ocsp \
-c ca_signing \
--serial $CERT_ID | tee output
# cert status should be good
sed -n "s/^CertStatus=\(.*\)$/\1/p" output > actual
echo Good > expected
diff expected actual
- name: Check OCSP responder with after revocation
run: |
CERT_ID=$(cat cert.id)
# place cert on-hold
docker exec client pki \
-U https://ca.example.com:8443 \
-n admin \
ca-cert-hold \
--force \
$CERT_ID | tee output
# cert should be revoked
echo "REVOKED" > expected
sed -n "s/^\s*Status:\s*\(\S*\)$/\1/p" output > actual
diff expected actual
# https://github.com/dogtagpki/pki/wiki/UpdateCRL-Service
docker exec client curl \
--cert-type P12 \
--cert admin.p12:Secret.123 \
-sk \
-d "xml=true" \
https://ca.example.com:8443/ca/agent/ca/updateCRL \
| xmllint --format -
# wait for CRL update
sleep 10
# check cert status using OCSPClient
docker exec client OCSPClient \
-d /root/.dogtag/nssdb \
-h ocsp.example.com \
-p 8080 \
-t /ocsp/ee/ocsp \
-c ca_signing \
--serial $CERT_ID | tee output
# cert status should be revoked
sed -n "s/^CertStatus=\(.*\)$/\1/p" output > actual
echo Revoked > expected
diff expected actual
- name: Check OCSP responder with after unrevocation
run: |
CERT_ID=$(cat cert.id)
# place cert off-hold
docker exec client pki \
-U https://ca.example.com:8443 \
-n admin \
ca-cert-release-hold \
--force \
$CERT_ID | tee output
# cert should be valid
echo "VALID" > expected
sed -n "s/^\s*Status:\s*\(\S*\)$/\1/p" output > actual
diff expected actual
# https://github.com/dogtagpki/pki/wiki/UpdateCRL-Service
docker exec client curl \
--cert-type P12 \
--cert admin.p12:Secret.123 \
-sk \
-d "xml=true" \
https://ca.example.com:8443/ca/agent/ca/updateCRL \
| xmllint --format -
# wait for CRL update
sleep 10
# check cert status using OCSPClient
docker exec client OCSPClient \
-d /root/.dogtag/nssdb \
-h ocsp.example.com \
-p 8080 \
-t /ocsp/ee/ocsp \
-c ca_signing \
--serial $CERT_ID | tee output
# cert status should be good
sed -n "s/^CertStatus=\(.*\)$/\1/p" output > actual
echo Good > expected
diff expected actual
- name: Restart OCSP
run: |
docker restart ocsp
sleep 10
docker network reload --all
# wait for OCSP to restart
docker exec client curl \
--retry 180 \
--retry-delay 0 \
--retry-connrefused \
-s \
-k \
-o /dev/null \
https://ocsp.example.com:8443
- name: Check OCSP admin user again
run: |
docker exec client pki \
-U https://ocsp.example.com:8443 \
-n admin \
ocsp-user-show \
admin
- name: Check CA DS server systemd journal
if: always()
run: |
docker exec cads journalctl -x --no-pager -u [email protected]
- name: Check CA DS container logs
if: always()
run: |
docker logs cads
- name: Check CA container logs
if: always()
run: |
docker logs ca 2>&1
- name: Check CA debug logs
if: always()
run: |
docker exec ca find /var/lib/pki/pki-tomcat/logs/ca -name "debug.*" -exec cat {} \;
- name: Check OCSP DS server systemd journal
if: always()
run: |
docker exec ocspds journalctl -x --no-pager -u [email protected]
- name: Check OCSP DS container logs
if: always()
run: |
docker logs ocspds
- name: Check OCSP container logs
if: always()
run: |
docker logs ocsp 2>&1
- name: Check OCSP debug logs
if: always()
run: |
docker exec ocsp find /var/lib/pki/pki-tomcat/logs/ocsp -name "debug.*" -exec cat {} \;
- name: Check client container logs
if: always()
run: |
docker logs client
- name: Gather artifacts
if: always()
run: |
tests/bin/ds-artifacts-save.sh cads
mkdir -p /tmp/artifacts/ca
cp -r ca/certs /tmp/artifacts/ca
cp -r ca/conf /tmp/artifacts/ca
cp -r ca/logs /tmp/artifacts/ca
docker logs ca > /tmp/artifacts/ca/container.out 2> /tmp/artifacts/ca/container.err
tests/bin/ds-artifacts-save.sh ocspds
mkdir -p /tmp/artifacts/ocsp
cp -r ocsp/certs /tmp/artifacts/ocsp
cp -r ocsp/conf /tmp/artifacts/ocsp
cp -r ocsp/logs /tmp/artifacts/ocsp
docker logs ocsp > /tmp/artifacts/ocsp/container.out 2> /tmp/artifacts/ocsp/container.err
mkdir -p /tmp/artifacts/client
docker logs client > /tmp/artifacts/client/container.out 2> /tmp/artifacts/client/container.err
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: ocsp-container
path: /tmp/artifacts