Skip to content

Commit ffb3268

Browse files
andrei-nearnetrome
authored andcommitted
fetch MPC_SECRET_STORE_KEY
1 parent 9c34614 commit ffb3268

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

deployment/start.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,14 @@ else
202202
initialize_mpc_config "$MPC_NODE_CONFIG_FILE" && echo "MPC node initialized"
203203
fi
204204

205+
# Check if MPC_SECRET_STORE_KEY is empty - if so, fetch from GCP Secret Manager
206+
if [ -z "${MPC_SECRET_STORE_KEY}" ]; then
207+
echo "MPC_SECRET_STORE_KEY not provided in environment, will fetch from GCP Secret Manager..."
208+
export MPC_SECRET_STORE_KEY=$(gcloud secrets versions access latest --project $GCP_PROJECT_ID --secret=$GCP_LOCAL_ENCRYPTION_KEY_SECRET_ID)
209+
else
210+
echo "Using provided MPC_SECRET_STORE_KEY from environment"
211+
fi
212+
205213
update_mpc_config "$MPC_NODE_CONFIG_FILE" && echo "MPC node config updated"
206214

207215
# Generate secrets.json from environment variables if needed (for 2.2.0 -> 3.0.0 upgrade)

0 commit comments

Comments
 (0)