@@ -4,7 +4,7 @@ EntryPoint(){
4
4
5
5
#Default Variables
6
6
blank=""
7
- cseVersionDefault="5.2 .0"
7
+ cseVersionDefault="5.4 .0"
8
8
cseIdpProviderDefault="Google"
9
9
cseTakeoutClaim="cse_takeout"
10
10
csePort="9000"
@@ -97,11 +97,11 @@ EntryPoint(){
97
97
else
98
98
InputAuthnNowLater $cseIdpOtherInputAuthnDefault
99
99
if [ "$cseIdpOtherInputAuthn" = "Now" ]; then
100
- GetAuthnIssuersKey $cseAuthnIssuersKeyDefault
100
+ GetAuthnIssuersKey $cseAuthnIssuersKeyDefault
101
101
GetAuthnIssuersValue $cseAuthnIssuersValueDefault
102
102
GetJWTAudAuthn $cseJWTAudAuthnValueDefault
103
- fi
104
-
103
+ fi
104
+
105
105
fi
106
106
107
107
MakeDirectories
@@ -110,6 +110,7 @@ EntryPoint(){
110
110
GenerateOktaAuthnValues
111
111
fi
112
112
GenerateB64Variables
113
+ MakeSecretsFile
113
114
MakeEnv
114
115
MakeRunScript
115
116
clear
@@ -211,14 +212,14 @@ EntryPoint(){
211
212
cseJWTAudAuthzValue="\"$cseJWTAudAuthzValueDefault\""
212
213
;;
213
214
esac
214
- echo " "
215
+ echo " "
215
216
216
217
217
218
}
218
219
219
220
220
221
221
-
222
+
222
223
223
224
224
225
GenerateB64Variables(){
@@ -231,15 +232,15 @@ EntryPoint(){
231
232
if [ -n "${cseAuthnIssuersKey}" ]; then
232
233
cseJWKSAuthnIssuers="{ $cseAuthnIssuersKey: $cseAuthnIssuersValue }"
233
234
cseJWKSAuthnIssuers=$(echo $cseJWKSAuthnIssuers | base64 -w 0)
234
-
235
+
235
236
#JWT Aud Variable
236
237
cseJWTAud="{ $cseJWTAudAuthnKey: $cseJWTAudAuthnValue, $cseJWTAudAuthzKey: $cseJWTAudAuthzValue }"
237
238
cseJWTAud=$(echo $cseJWTAud | base64 -w 0)
238
239
239
240
else
240
241
cseJWKSAuthnIssuers=""
241
242
fi
242
-
243
+
243
244
244
245
245
246
}
@@ -258,8 +259,8 @@ EntryPoint(){
258
259
;;
259
260
esac
260
261
echo " "
261
-
262
-
262
+
263
+
263
264
}
264
265
265
266
@@ -278,7 +279,7 @@ EntryPoint(){
278
279
esac
279
280
echo " "
280
281
281
-
282
+
282
283
}
283
284
284
285
@@ -357,7 +358,7 @@ EntryPoint(){
357
358
358
359
cseCksFqdn="CKS_URL=${cksServerFqdn}"
359
360
}
360
-
361
+
361
362
GetGoogleAuthString(){
362
363
local input=""
363
364
read -p "Enter your Google OAuth Client ID String [$1]: " input
@@ -393,7 +394,7 @@ EntryPoint(){
393
394
esac
394
395
echo " "
395
396
}
396
-
397
+
397
398
GetAuthnIssuersValue(){
398
399
local input=""
399
400
read -p "Enter your AuthN Value [$1]: " input
@@ -411,7 +412,7 @@ EntryPoint(){
411
412
esac
412
413
echo " "
413
414
}
414
-
415
+
415
416
GetOktaDomain(){
416
417
local input=""
417
418
read -p "Enter your Okta Domain Value [$1]: " input
@@ -429,8 +430,8 @@ EntryPoint(){
429
430
esac
430
431
echo " "
431
432
}
432
-
433
-
433
+
434
+
434
435
GetJWTAudAuthn(){
435
436
local input=""
436
437
read -p "Enter your JWT AuthN Value [$1]: " input
@@ -448,8 +449,8 @@ EntryPoint(){
448
449
esac
449
450
echo " "
450
451
}
451
-
452
-
452
+
453
+
453
454
InputAuthnNowLater(){
454
455
local input=""
455
456
echo "Enter AuthN Now?"
@@ -498,7 +499,19 @@ EntryPoint(){
498
499
cseAuthnIssuersKey="\"https://$cseOktaDomain/oauth2/default\""
499
500
cseAuthnIssuersValue="\"https://$cseOktaDomain/oauth2/default/v1/keys\""
500
501
}
502
+ MakeSecretsFile(){
503
+ secretsFile=/var/virtru/cse/secrets.json
504
+
505
+
501
506
507
+ /bin/cat <<EOM >$secretsFile
508
+ {"active":"secret-key","secrets":[{"name":"secret-key","value":"$cseStandaloneSecretKeyValue"}]}
509
+ EOM
510
+
511
+ chmod 646 /var/virtru/cse/secrets.json
512
+
513
+ }
514
+
502
515
MakeEnv(){
503
516
envFile=/var/virtru/cse/cse.env
504
517
@@ -510,7 +523,7 @@ EntryPoint(){
510
523
511
524
512
525
/bin/cat <<EOM >$envFile
513
-
526
+
514
527
HMAC_TOKEN_ID=$cseHMACTokenId
515
528
HMAC_TOKEN_SECRET=$cseHMACTokenSecret
516
529
$cseCksHmacId
@@ -526,13 +539,14 @@ $cseCksFqdn
526
539
PORT=$csePort
527
540
USE_SSL=true
528
541
$cseCksUserEnv
529
- $cseSecretKeyEnvValue
542
+ #$cseSecretKeyEnvValue
543
+ SECRET_KEYS_PATH=/app/cse/secrets.json
530
544
#The values below are only used for customer hosted EKM
531
545
#EKM_JWT_AUTH_ISSUERS=aHR0cDovL2xvY2FsaG9zdDo5MDAwLGh0dHA6Ly9sb2NhbGhvc3Q6OTAwMC93aXRoL2EvcGF0aCxodHRwOi8vZmFrZUlzc3VlcixodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20=
532
546
#Base 64 encoded value of EKM Audience URL that the customer is using as the FQDN
533
547
#EKM_AUDIENCE=
534
548
#EKM_SUPPORTED_SIGNING_ALGS=RS265
535
-
549
+
536
550
EOM
537
551
538
552
}
@@ -552,11 +566,11 @@ docker run --detach \\
552
566
-p 443:$csePort \\
553
567
-v /var/virtru/cse/server.cert:/run/secrets/server.cert \\
554
568
-v /var/virtru/cse/server.key:/run/secrets/server.key \\
569
+ -v /var/virtru/cse/secrets.json:/app/cse/secrets.json \\
555
570
--restart unless-stopped \\
556
571
--name cse-$cseVersion \\
557
572
virtru/cse:v$cseVersion
558
573
559
-
560
574
EOM
561
575
562
576
chmod +x $runScript
@@ -565,7 +579,7 @@ chmod +x $runScript
565
579
566
580
567
581
568
-
582
+
569
583
ShowLogo() {
570
584
echo " "
571
585
echo " +++ '++."
0 commit comments