Skip to content

decision(delete-user-data): kit/extension parity – kit service account gets project-wide run.invoker #3253

Open

Description

@CorieW

delete-user-data kit/extension parity. Priority: low. The kit's service account gets broader permissions than the extension's.

Difference

  • Extension: the service account has the four declared roles plus eventarc.publisher.
  • Kit: the service account also gets project-wide roles/run.invoker and roles/eventarc.eventReceiver. That means it can call any Cloud Run service in the project, not just this kit's functions.

Declaring the roles the platform used to grant implicitly is already accepted for kits. This issue is about the scope of the grant.

Reproduced

Project IAM policy on the test project:

  • ext-<id>@: datastore.owner, firebasedatabase.admin, storage.admin, pubsub.admin, eventarc.publisher
  • firebase-fn-<n>@ (kit): the same five, plus eventarc.eventReceiver and run.invoker

Code

Resolution

requiresRole only grants project-level roles, and firebase-tools sets no per-service invoker for event triggers. Two options:

Activity

  1. CorieW commented on Nov 3, 2026

    @CorieW
    MemberAuthor

    Accepted as a difference for all 2nd gen kits until the CLI supports resource-scoped roles, as for firestore-send-email (#3299). Recorded under "Decisions" in #3249.

  2. self-assigned this
    on Nov 3, 2026
  3. reopened this on Nov 3, 2026
  4. CorieW commented on Nov 3, 2026

    @CorieW
    MemberAuthor

    Having another look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

decisionNeeds a decision before work can proceedkitsparity

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions