You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Opting out of declarative security deletes the managed service account but leaves its IAM bindings #11550
Run firebase deploy --only functions:repro-dsec and confirm the prompt. This creates a managed service account named firebase-fn-<id>, where <id> is random, and grants it roles/datastore.viewer.
Remove the requiresRole line, deploy again, and confirm the prompt.
Run gcloud projects get-iam-policy <project> --flatten=bindings --filter="bindings.members:firebase-fn-<id>".
[REQUIRED] Expected behavior
The service account and its project role bindings are both removed.
[REQUIRED] Actual behavior
The deploy deletes the service account:
i functions: Deleting managed service account firebase-fn-<id>@<project>.iam.gserviceaccount.com...
✔ Deploy complete!
According to the IAM documentation, these entries count toward the project policy's limit of 1,500 principals, and an account undeleted within 30 days gets these roles back. Neither was tested here.
Cause: In src/deploy/functions/release/fabricator.ts, removeOldRoles deletes the account and returns without removing its roles:
Activity