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
🐛 [firestore-bigquery-export] Authenticate calls to TRANSFORM_FUNCTION so it can be IAM-protected #2804
This feature request is for extension: firestore-bigquery-export
What feature would you like to see?
I'd like the extension to send an OIDC ID token when it calls the TRANSFORM_FUNCTION URL, so the transform endpoint can be locked down via Cloud Run IAM.
Right now the extension calls the URL with just a Content-Type header — no Authorization. Because of this the transform function has to be granted allUsers invoker access. If you try to limit it (even to the extension's own runtime SA), Cloud Run returns 403 and syncBigQuery fails with FetchError: invalid json response body ... Unexpected token '<'. As far as I can tell this isn't mentioned in the README or PREINSTALL, so it's easy to set up a publicly invokable function without realizing it.
If the extension attached an ID token to the call (using the transform URL as the audience), users could lock the endpoint down via Cloud Run IAM and it would still work for everyone else, since public functions would just ignore the extra header.
How would you use it?
We use TRANSFORM_FUNCTION to strip sensitive fields (private message bodies) before they reach BigQuery, so it sits on the critical path for our privacy guarantees. Keeping the endpoint open to allUsers is uncomfortable — anyone who finds the URL can drive invocations and run up our bill. With ID-token auth we'd grant roles/run.invoker only to ext-<INSTANCE_ID>@<PROJECT>.iam.gserviceaccount.com and drop allUsers.
@cabljac Thanks for the response!
I actually have a rough idea of how to implement a fix for this. I noticed you've self-assigned the issue, but would you mind if I take a stab at it and submit a PR?
Hi @cabljac, just checking in on this.
I'm still interested in working on a fix for this issue. If you haven't started on it yet, I'd love to take a crack at it and submit a PR.
Please let me know if that works for you!
Activity
cabljac commentedon May 8, 2026
Hi thanks for raising this! It's been received, it sounds like a useful feature!
Murayu0225 commentedon May 8, 2026
@cabljac Thanks for the response!
I actually have a rough idea of how to implement a fix for this. I noticed you've self-assigned the issue, but would you mind if I take a stab at it and submit a PR?
Murayu0225 commentedon May 22, 2026
Hi @cabljac, just checking in on this.
I'm still interested in working on a fix for this issue. If you haven't started on it yet, I'd love to take a crack at it and submit a PR.
Please let me know if that works for you!
cabljac commentedon May 26, 2026
Hey @Murayu0225 if you're happy to put together a PR, that would be great!
Murayu0225 commentedon May 27, 2026
Thank you! I'll work on the PR.