I have a cloud function that is Triggered by a topic: processLL
The default authentication for this Cloud Function is Allow unauthenticated
by default. I don't want unauthenticated access to this function, but how do I limit unauthenticated access to this function but still allow it to (only) be triggered by subscribing to its topic trigger?
Asked
Active
Viewed 22 times
0

DShultz
- 4,381
- 3
- 30
- 46
-
Update: the answer by nebulastic to this similar question works: https://stackoverflow.com/questions/61235853/how-to-invoke-cloud-function-from-cloud-scheduler-with-authentication ...along with removing allUsers from the subscribing Cloud Function. Basically set member=${PROJECT_ID}@appspot.gserviceaccount.com role="roles/cloudfunctions.invoker" – DShultz Oct 27 '20 at 17:05
-
Do you have your answer? If not, did you create a PubSub triggered Cloud Function? or a HTTP triggered Cloud Function with a PubSub Http Push subscription that call the function http endpoint? – guillaume blaquiere Oct 27 '20 at 20:16
-
Yes - it's a pub/sub (topic=processLL) function, and setting the service account as the member and role=roles/cloudfunctions.invoker was successful – DShultz Oct 27 '20 at 20:19
-
Great!! Have fun now! – guillaume blaquiere Oct 27 '20 at 20:23