Step 4 of 10
Production Google access

Grant only the roles for what the app does

Open IAM & Admin → IAM, tap Grant access, paste the service account's e-mail under New principals, and add only the rows below that Fodide listed for your app. Save.

WhereSettingExact valueWhy
IAM → Grant accessFirebase sign-in (Authentication)Firebase Authentication Admin
roles/firebaseauth.admin
Manage the app's users and sign-in settings
IAM → Grant accessFirestore databaseCloud Datastore User
roles/datastore.user
Read and write the app's data; nothing else in the project
Cloud Storage → the bucket → Permissions (step 5)Files in ONE bucketStorage Object Admin
roles/storage.objectAdmin
Read, write, delete files in that bucket only; granted on the bucket, not the project
IAM → Grant accessCloud Functions deployCloud Functions Developer
roles/cloudfunctions.developer
+ Service Account User
roles/iam.serviceAccountUser
Upload the app's functions; the second role lets them run as the runtime account
IAM → Grant accessRealtime DatabaseFirebase Realtime Database Admin
roles/firebasedatabase.admin
Read and write the realtime database
IAM → Grant accessRemote ConfigFirebase Remote Config Admin
roles/cloudconfig.admin
Change the app's remote settings
Google Sheets / Drive / DocsA sheet or folder of yoursNo IAM role. Share the file with the service account's e-mail as Editor or ViewerThe account sees only the files you share
BloggerPosting to your blogNot possible with a service accountBlogger accepts only a person's own Google sign-in; the app asks you to sign in
Google MapsMaps in the appAn API key (step 8), no roleMaps are called by the app, not by the server