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

Using WIF token when testing #237

Open
JvandeKraats opened this issue Jul 3, 2024 · 1 comment
Open

Using WIF token when testing #237

JvandeKraats opened this issue Jul 3, 2024 · 1 comment
Labels
Needs: Author Feedback Issues awaiting author feedback

Comments

@JvandeKraats
Copy link

JvandeKraats commented Jul 3, 2024

Version info

firebase-functions-test: v3.2.0

firebase-functions: v5.0.1

firebase-admin: v12.1.1

Test case

Steps to reproduce

When running this part of the pipeline:

- name: Install functions dependencies
   run: ....

- name: Authenticate to Google Cloud
        id: GCloudAuth
        uses: google-github-actions/[email protected]
        with:
          project_id: ....
          token_format: 'access_token'
          access_token_scopes: 'email, openid, https://www.googleapis.com/auth/cloud-platform, https://www.googleapis.com/auth/firebase, https://www.googleapis.com/auth/datastore'
          workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER_STAGING }}
          service_account: ${{ secrets.SERVICE_ACCOUNT_EMAIL_STAGING }}
          create_credentials_file: true

 - name: Setup service account key environment variable
    run: |
      echo "SERVICE_ACCOUNT_KEY=$(cat "${{ steps.GCloudAuth.outputs.credentials_file_path }}" | tr -d '\n')" >> $GITHUB_ENV

- name: Test functions
   run: npm run test:functions

I get an error while executing the tests.
This is the error I'm getting:
image

Expected behavior

I expected this test package to easily leverage the WIF token to authenticate and run the tests.

Actual behavior

image

Has anyone else tried to get this working using WIF tokens?
If you're missing info, please let me know.

@CorieW
Copy link

CorieW commented Dec 30, 2024

Hey @JvandeKraats,

I don't think this is an issue with firebase-functions-test, but I'm not sure what the issue is with. Possibly firebase-functions-admin. Can you successfully deploy Firebase Functions using WIF tokens?

@CorieW CorieW added the Needs: Author Feedback Issues awaiting author feedback label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Author Feedback Issues awaiting author feedback
Projects
None yet
Development

No branches or pull requests

2 participants