From 858bc0567ea5072bfc744fd1197e2520c7c73e61 Mon Sep 17 00:00:00 2001 From: Kalpa Vidusha Pathirana Date: Tue, 16 Dec 2025 21:37:13 +0530 Subject: [PATCH] Fix setup_vault.bat syntax and remove unused JWT secrets - Fixed "invalid key/value pair" error caused by spaces in the secret injection command. - Removed JWT RSA key injection logic as it is not required for the current local development scope. - Verified that the script now successfully injects Database and Email placeholders without errors. --- cso2/setup_vault.bat | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/cso2/setup_vault.bat b/cso2/setup_vault.bat index c53cf9d..a624818 100644 --- a/cso2/setup_vault.bat +++ b/cso2/setup_vault.bat @@ -10,7 +10,7 @@ echo. :: --- 1. PRE-FLIGHT CHECK --- if not exist "docker-compose.yml" ( echo [ERROR] docker-compose.yml not found! - echo Please run this script from the 'Infrastructure/cso2' folder. + echo Please ensure this file is in the same folder as docker-compose.yml. pause exit /b ) @@ -50,18 +50,12 @@ set "SECRETS=!SECRETS! product_mongodb_uri=mongodb://localhost:27017/CSO2_produc set "SECRETS=!SECRETS! content_mongodb_uri=mongodb://localhost:27017/CSO2_content_service" set "SECRETS=!SECRETS! notifications_mongodb_uri=mongodb://localhost:27017/CSO2_notifications_service" -:: D. Notification Credentials (PLACEHOLDERS for Safety) -:: Team members can replace these locally if they need to test email +:: D. Notification Credentials (PLACEHOLDERS) +:: NOTE: If you need to test email sending locally, open this file +:: and replace these two values with your real Gmail App Password. set "SECRETS=!SECRETS! mail_username=user@example.com" set "SECRETS=!SECRETS! mail_password=change_me_locally" -:: E. JWT RSA Keys (Test Keys for Dev) -set "JWT_PVT=-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDL+Q+...\n-----END PRIVATE KEY-----" -set "JWT_PUB=-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy/kP...\n-----END PUBLIC KEY-----" - -set "SECRETS=!SECRETS! jwt_private_key=!JWT_PVT!" -set "SECRETS=!SECRETS! jwt_public_key=!JWT_PUB!" - :: --- 5. INJECT SECRETS --- echo. echo [4/5] Injecting Secrets into 'kv/cs02-app'...