-
Notifications
You must be signed in to change notification settings - Fork 1
[P1] Make Firebase initialization secret-safe and fail fast in production #287
Copy link
Copy link
Open
Labels
area:deploymentBuild, config, deployment, infrastructureBuild, config, deployment, infrastructurearea:notificationsPush notifications and schedulingPush notifications and schedulingarea:securitySecurity, privacy, auth, or secretsSecurity, privacy, auth, or secretspriority:P1High: should be resolved before production launchHigh: should be resolved before production launchproduction-readinessProduction readiness audit itemProduction readiness audit itemtype:hardeningSecurity/stability hardening taskSecurity/stability hardening task
Metadata
Metadata
Assignees
Labels
area:deploymentBuild, config, deployment, infrastructureBuild, config, deployment, infrastructurearea:notificationsPush notifications and schedulingPush notifications and schedulingarea:securitySecurity, privacy, auth, or secretsSecurity, privacy, auth, or secretspriority:P1High: should be resolved before production launchHigh: should be resolved before production launchproduction-readinessProduction readiness audit itemProduction readiness audit itemtype:hardeningSecurity/stability hardening taskSecurity/stability hardening task
Problem
Firebase Admin SDK initialization loads a service account JSON file from application resources and catches initialization failures with
printStackTraceinstead of failing startup or surfacing a health problem.Why this is not production ready
If Firebase credentials are missing, invalid, or revoked, the service can still start and appear healthy while push notification features fail later. Loading credentials from packaged resources also conflicts with secret-management hardening.
Evidence
FirebaseInitialization.initializecallsgetResourceAsStream("ontime-c63f1-firebase-adminsdk-fbsvc-a043cdc829.json").IOException, it callse.printStackTrace()and continues.NotificationService, which compounds the issue.Required work
Acceptance criteria