@@ -48,38 +48,6 @@ if [ -n "$HTTPS" ] ; then
48
48
HTTPS_PARAM=" --stringparam https $HTTPS "
49
49
fi
50
50
51
- if [ -n " $HTTPS_SCHEME " ] ; then
52
- HTTPS_SCHEME_PARAM=" --stringparam https.scheme $HTTPS_SCHEME "
53
- fi
54
-
55
- if [ -n " $HTTPS_PORT " ] ; then
56
- HTTPS_PORT_PARAM=" --stringparam https.port $HTTPS_PORT "
57
- fi
58
-
59
- if [ -n " $HTTPS_MAX_THREADS " ] ; then
60
- HTTPS_MAX_THREADS_PARAM=" --stringparam https.maxThreads $HTTPS_MAX_THREADS "
61
- fi
62
-
63
- if [ -n " $HTTPS_CLIENT_AUTH " ] ; then
64
- HTTPS_CLIENT_AUTH_PARAM=" --stringparam https.clientAuth $HTTPS_CLIENT_AUTH "
65
- fi
66
-
67
- if [ -n " $HTTPS_PROXY_NAME " ] ; then
68
- HTTPS_PROXY_NAME_PARAM=" --stringparam https.proxyName $HTTPS_PROXY_NAME "
69
- fi
70
-
71
- if [ -n " $HTTPS_PROXY_PORT " ] ; then
72
- HTTPS_PROXY_PORT_PARAM=" --stringparam https.proxyPort $HTTPS_PROXY_PORT "
73
- fi
74
-
75
- if [ -n " $HTTPS_COMPRESSION " ] ; then
76
- HTTPS_COMPRESSION_PARAM=" --stringparam https.compression $HTTPS_COMPRESSION "
77
- fi
78
-
79
- if [ -n " $KEY_ALIAS " ] ; then
80
- KEY_ALIAS_PARAM=" --stringparam https.keyAlias '$KEY_ALIAS ' "
81
- fi
82
-
83
51
transform=" xsltproc \
84
52
--output conf/server.xml \
85
53
$HTTP_PARAM \
@@ -91,14 +59,6 @@ transform="xsltproc \
91
59
$HTTP_CONNECTION_TIMEOUT_PARAM \
92
60
$HTTP_COMPRESSION_PARAM \
93
61
$HTTPS_PARAM \
94
- $HTTPS_SCHEME_PARAM \
95
- $HTTPS_PORT_PARAM \
96
- $HTTPS_MAX_THREADS_PARAM \
97
- $HTTPS_CLIENT_AUTH_PARAM \
98
- $HTTPS_PROXY_NAME_PARAM \
99
- $HTTPS_PROXY_PORT_PARAM \
100
- $HTTPS_COMPRESSION_PARAM \
101
- $KEY_ALIAS_PARAM \
102
62
conf/letsencrypt-tomcat.xsl \
103
63
conf/server.xml"
104
64
@@ -148,6 +108,11 @@ if [ -z "$CLIENT_KEYSTORE" ] ; then
148
108
exit 1
149
109
fi
150
110
111
+ if [ -z " $CLIENT_KEYSTORE_MOUNT " ] ; then
112
+ echo ' $CLIENT_KEYSTORE_MOUNT not set'
113
+ exit 1
114
+ fi
115
+
151
116
if [ -z " $SECRETARY_CERT_ALIAS " ] ; then
152
117
echo ' $SECRETARY_CERT_ALIAS not set'
153
118
exit 1
@@ -396,7 +361,7 @@ if [ -z "$OWNER_URI" ] ; then
396
361
exit 1
397
362
fi
398
363
399
- printf " \n### Owner's WebID URI: %s\n" " $owner_uri "
364
+ printf " \n### Owner's WebID URI: %s\n" " $OWNER_URI "
400
365
401
366
# strip fragment from the URL, if any
402
367
@@ -431,6 +396,12 @@ rm -f root-owner.trig root-owner.nq split.root-owner.nq
431
396
echo " <${root_admin_app} > <http://xmlns.com/foaf/0.1/maker> <${OWNER_URI} > ." >> " $based_context_dataset "
432
397
echo " <${root_end_user_app} > <http://xmlns.com/foaf/0.1/maker> <${OWNER_URI} > ." >> " $based_context_dataset "
433
398
399
+ # copy mounted client keystore to a location where the webapp can access it
400
+
401
+ mkdir -p " $( dirname " $CLIENT_KEYSTORE " ) "
402
+
403
+ cp -f " $CLIENT_KEYSTORE_MOUNT " " $( dirname " $CLIENT_KEYSTORE " ) "
404
+
434
405
# if CLIENT_TRUSTSTORE does not exist:
435
406
# 1. import the certificate into the CLIENT_TRUSTSTORE
436
407
# 2. initialize an Agent/PublicKey with secretary's metadata and key modulus
@@ -444,7 +415,7 @@ if [ ! -f "$CLIENT_TRUSTSTORE" ]; then
444
415
exit 1
445
416
fi
446
417
447
- printf " \n### Secretary's WebID URI: %s\n" " $owner_uri "
418
+ printf " \n### Secretary's WebID URI: %s\n" " $SECRETARY_URI "
448
419
449
420
# strip fragment from the URL, if any
450
421
@@ -479,29 +450,31 @@ if [ ! -f "$CLIENT_TRUSTSTORE" ]; then
479
450
# if server certificate is self-signed, import it into client truststore
480
451
481
452
if [ " $SELF_SIGNED_CERT " = true ] ; then
482
- printf " \n### Importing server certificate into the client truststore\n\n"
483
-
484
- keytool -importcert \
485
- -alias " $KEY_ALIAS " \
486
- -file " $SERVER_CERT " \
487
- -keystore " $CLIENT_TRUSTSTORE " \
488
- -noprompt \
489
- -storepass " $CLIENT_KEYSTORE_PASSWORD " \
490
- -storetype PKCS12 \
491
- -trustcacerts
453
+ printf " \n### Importing server certificate into the client truststore\n\n"
454
+
455
+ mkdir -p " $( dirname " $CLIENT_TRUSTSTORE " ) "
456
+
457
+ keytool -importcert \
458
+ -alias " $SECRETARY_CERT_ALIAS " \
459
+ -file " $SERVER_CERT " \
460
+ -keystore " $CLIENT_TRUSTSTORE " \
461
+ -noprompt \
462
+ -storepass " $CLIENT_KEYSTORE_PASSWORD " \
463
+ -storetype PKCS12 \
464
+ -trustcacerts
492
465
fi
493
466
494
- # import default CA certs from the JRE
495
-
467
+ printf " \n### Importing default CA certificates into the client truststore\n\n "
468
+
496
469
export CACERTS=" ${JAVA_HOME} /lib/security/cacerts"
497
470
498
471
keytool -importkeystore \
499
- -destkeystore " $CLIENT_TRUSTSTORE " \
500
- -deststorepass " $CLIENT_KEYSTORE_PASSWORD " \
501
- -deststoretype PKCS12 \
502
- -noprompt \
503
- -srckeystore " $CACERTS " \
504
- -srcstorepass changeit > /dev/null
472
+ -destkeystore " $CLIENT_TRUSTSTORE " \
473
+ -deststorepass " $CLIENT_KEYSTORE_PASSWORD " \
474
+ -deststoretype PKCS12 \
475
+ -noprompt \
476
+ -srckeystore " $CACERTS " \
477
+ -srcstorepass changeit
505
478
fi
506
479
507
480
if [ -z " $LOAD_DATASETS " ]; then
0 commit comments