@@ -423,7 +423,6 @@ optional_params_server=(
423
423
" code_context"
424
424
" nexus_url"
425
425
" cr_event_type"
426
- " encryption_key"
427
426
)
428
427
429
428
bee_params=(
@@ -576,8 +575,6 @@ for param in "${required_params[@]}" "${bee_params[@]}" "${optional_params[@]}";
576
575
nexus_url=$( echo " ${props[$param]} " | sed ' s/^[ \t]*//;s/[ \t]*$//' )
577
576
elif [ " $param " == " cr_event_type" ]; then
578
577
validate_cr_event_type " ${props[$param]} "
579
- elif [ " $param " == " encryption_key" ]; then
580
- encryption_key_value=${props[$param]}
581
578
else
582
579
docker_cmd+=" --$param =${props[$param]} "
583
580
fi
@@ -614,22 +611,15 @@ encrypt_git_secret() {
614
611
615
612
param_bito_access_key=" bito_cli.bito.access_key"
616
613
param_git_access_token=" git.access_token"
617
- param_encryption_key= " encryption_key "
614
+
618
615
docker_enc_params=
619
616
if [ " $mode " == " server" ]; then
620
617
if [ -n " ${props[$param_bito_access_key]} " ] && [ -n " ${props[$param_git_access_token]} " ]; then
621
618
git_secret=" ${props[$param_bito_access_key]} @#~^${props[$param_git_access_token]} "
622
-
623
- if [ -n " ${props[$param_encryption_key]} " ]; then
624
- encryption_key=" ${props[$param_encryption_key]} "
625
- if [[ ${# encryption_key} -eq 44 ]] && [[ $encryption_key =~ ^[A-Za-z0-9+/]{43}= $ ]]; then
626
- git_secret=$( encrypt_git_secret " $encryption_key " " $git_secret " )
627
- docker_enc_params=" --git.secret=$git_secret --encryption_key=$encryption_key "
628
- else
629
- echo " Error: Encryption key must be a 44-character base64 string generated by openssl rand -base64 32."
630
- exit 1
631
- fi
632
- fi
619
+ encryption_key=$( openssl rand -base64 32)
620
+ git_secret=$( encrypt_git_secret " $encryption_key " " $git_secret " )
621
+ docker_enc_params=" --git.secret=$git_secret --encryption_key=$encryption_key "
622
+
633
623
634
624
echo " Use below as Gitlab and Github Webhook secret:"
635
625
echo " $git_secret "
0 commit comments