Description:
Currently, the Backend Core service (backend-services/core) uses getEnvRequired for all EXTERNAL_IDP_* environment variables. This causes the server to panic on startup if these variables are missing or if the server cannot reach api.asgardeo.io (e.g., due to local network restrictions or timeout).
Proposed Solution:
Introduce a "Mock Mode" toggled via APP_ENV=dev. When active:
- The server should not panic if
EXTERNAL_IDP_* variables are missing.
- The validator should be replaced with a mock version.
Acceptance Criteria:
Description:
Currently, the Backend Core service (
backend-services/core) usesgetEnvRequiredfor allEXTERNAL_IDP_*environment variables. This causes the server to panic on startup if these variables are missing or if the server cannot reachapi.asgardeo.io(e.g., due to local network restrictions or timeout).Proposed Solution:
Introduce a "Mock Mode" toggled via
APP_ENV=dev. When active:EXTERNAL_IDP_*variables are missing.Acceptance Criteria:
EXTERNAL_IDP_*environment variables are empty or missing inAPP_ENV=dev.token-service(localhost:8081) for authenticated routes.APP_ENV=prod(must still require and verify real Asgardeo tokens).