Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service Account Privileges for Firebase Functions #175

Open
lukaiser opened this issue Jan 3, 2023 · 5 comments
Open

Service Account Privileges for Firebase Functions #175

lukaiser opened this issue Jan 3, 2023 · 5 comments

Comments

@lukaiser
Copy link

lukaiser commented Jan 3, 2023

I followed your documentation and provider the following roles to the service account:

  • Cloud Functions Developer
  • Cloud Scheduler Admin
  • Service Account User

However, when I am deploying with the flag --only functions, I get a 403:
Error: HTTP Error: 403, The caller does not have permission.

Do you have any ideas what I am missing?
My Google search turned up many suggestions, but noting helped yet...

Thanks for the Help!

@remiebelingmerifond
Copy link

Same here!

@remiebelingmerifond
Copy link

Found a solution.

It turned out that my Problem occured because i was doing functions:config:set but my service account did not have the Firebase Develop Admin role.

https://stackoverflow.com/a/69817228

@lukaiser
Copy link
Author

lukaiser commented Jan 8, 2023

@remiebelingmerifond
Perfect, it was the same for me.
Thx for the help.

@McLeanAdam
Copy link

Anyone still trying to figure out why your firebase functions aren't deploying correctly.
Firebase Docs state to deploy you need
Owner
or
Cloud Functions Admin role & Service Account User role

I had the issue I was able to run my build through GitHub Actions which seemed to complete but never updated the functions the issue was the permissions above were needed.

@felipemeettulip
Copy link

By adding Firebase Develop Admin worked for me as well. Let me share the YAML file:

name: Deploy to Firebase

on:
  push:
    branches:
      - main
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout Repo
      uses: actions/checkout@v4

    - name: create env file
      run: |
        cd functions
        touch .env
        echo "${{ secrets.ENV_VARS }}" >> .env

    - name: Install Dependencies
      run: |
        cd functions
        npm install

    - name: Deploy to Firebase
      uses: w9jds/firebase-action@master
      with:
        args: deploy --only functions
      env:
        GCP_SA_KEY: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_IN_BASE_64 }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants