Cloud Endpoints to trigger Cloud Functions

2,545 views
Skip to first unread message

Aidan Hoolachan

unread,
Apr 6, 2017, 10:30:51 PM4/6/17
to Google Cloud Endpoints
Have there been suggestions from Google about providing support for triggering Cloud Functions directly from Cloud Endpoint calls? This seems to be the logical next step for the platform. As far as I can tell., there isn't currently a GCP configuration that supports/mimics this paradigm. I consider the main value add to be Auth piped into the Function context.

Sepehr Ebrahimzadeh

unread,
Apr 7, 2017, 12:24:17 PM4/7/17
to Aidan Hoolachan, Google Cloud Endpoints
Hi Aidan, 
You're correct: this is something that we're working on but is not currently supported. Are you already using Cloud Functions extensively?
Would you please tell us more (on this thread or privately) about your use cases?

Thanks,
Sepehr


On Thu, Apr 6, 2017 at 7:30 PM, Aidan Hoolachan <aidan.h...@gmail.com> wrote:
Have there been suggestions from Google about providing support for triggering Cloud Functions directly from Cloud Endpoint calls? This seems to be the logical next step for the platform. As far as I can tell., there isn't currently a GCP configuration that supports/mimics this paradigm. I consider the main value add to be Auth piped into the Function context.

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endpoints+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/388a6f35-5fb3-49ac-a8f0-4766e1bfd200%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

aco...@gmail.com

unread,
May 28, 2017, 4:30:31 PM5/28/17
to Google Cloud Endpoints, Aidan Hoolachan
+1. I have been writing all the API implementations with Functions, now I only need the API endpoints to wire them up.

je...@opinulate.com

unread,
Jan 11, 2018, 5:20:41 PM1/11/18
to Google Cloud Endpoints
+1, same use case – basically, playing with the idea of building most/all of an API server via Functions. Other than the beta nature of Functions and inherent FaaS deployment/ops challenges, is this a bad idea? 

What alternatives are people using? App Engine to house all the endpoint logic, with heavy lifting in Functions and probably some PubSub seems like the obvious alternative, but I'm pretty new to GCP ecology.

ismail...@gmail.com

unread,
Jan 18, 2018, 11:40:46 PM1/18/18
to Google Cloud Endpoints
+1 would love to see this.

AWS already does something similar, I believe...

ism...@humbike.com

unread,
Jan 19, 2018, 2:12:59 AM1/19/18
to Google Cloud Endpoints
It's been 9 months, is there any progress on this front?

awa...@gmail.com

unread,
Jan 19, 2018, 2:19:51 AM1/19/18
to Google Cloud Endpoints
+1

ozair...@gmail.com

unread,
Jan 19, 2018, 5:13:48 AM1/19/18
to Google Cloud Endpoints
+1

Doug Tangren

unread,
Jan 19, 2018, 8:21:22 AM1/19/18
to ozair...@gmail.com, Google Cloud Endpoints


On Jan 19, 2018 5:13 AM, <ozair...@gmail.com> wrote:
+1

+1 it's been about that for a number of trials that we're announced back then. Multi region support and others. Do we think we'll see a GA announcement this year?



On Friday, April 7, 2017 at 7:30:51 AM UTC+5, Aidan Hoolachan wrote:
Have there been suggestions from Google about providing support for triggering Cloud Functions directly from Cloud Endpoint calls? This seems to be the logical next step for the platform. As far as I can tell., there isn't currently a GCP configuration that supports/mimics this paradigm. I consider the main value add to be Auth piped into the Function context.

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endpoints+unsub...@googlegroups.com.

Jeremy Lorino

unread,
Jan 21, 2018, 4:35:56 PM1/21/18
to Google Cloud Endpoints
Is this suggestion basically and API gateway in front of Cloud Funcs?

armstead...@principal.com

unread,
Jan 23, 2018, 9:14:59 AM1/23/18
to Google Cloud Endpoints
+1

dcdh...@gmail.com

unread,
Jan 30, 2018, 10:00:24 AM1/30/18
to Google Cloud Endpoints
This is a pretty major flaw IMO, Cloud Functions should be treated as first-class citizens in newly-released services.

Dan Ciruli

unread,
Jan 30, 2018, 12:31:12 PM1/30/18
to dcdh...@gmail.com, Google Cloud Endpoints
Hi, all -- we are glad to see people chiming in on this thread and very excited to see the desire to have these two products working together.

We are working on a solution that we think you'll like a lot. There is a bit of an architecture change to make it happen (given that Cloud Endpoints currently uses a server-side proxy, and Cloud Functions is a serverless environment). But we've got a solution to that in mind.

Unfortunately, I don't have a date that I can speak about publicly. However, as soon as we are ready for users, you will be the first to know.

DC

On Tue, Jan 30, 2018 at 7:00 AM, <dcdh...@gmail.com> wrote:
This is a pretty major flaw IMO, Cloud Functions should be treated as first-class citizens in newly-released services.

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endpoints+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
DC

dcdh...@gmail.com

unread,
Jan 30, 2018, 2:05:57 PM1/30/18
to Google Cloud Endpoints
That's great. There's a lot of interest in this sort of functionality within my company, and I'll definitely be an early adopter personally.

Jeremy Lorino

unread,
Feb 5, 2018, 10:21:12 PM2/5/18
to Google Cloud Endpoints
Yo Dan, I assume this is when y'all will begin leveraging Firebase rule sets that exist in Firebase/Firestore and applying them to ESP?

I want my Firestore Rules to govern Endpoints Authz and not manage multiple rule sets.

Please and thank you. ;)

625...@gmail.com

unread,
Mar 16, 2018, 3:13:35 PM3/16/18
to Google Cloud Endpoints
+1
Message has been deleted

jmsg...@gmail.com

unread,
Apr 17, 2018, 2:07:55 PM4/17/18
to Google Cloud Endpoints
+1

thetom...@gmail.com

unread,
Apr 23, 2018, 6:06:37 PM4/23/18
to Google Cloud Endpoints
I'd also like to see this! +1

t...@factoryfix.com

unread,
Apr 23, 2018, 6:09:44 PM4/23/18
to Google Cloud Endpoints
+1

On Thursday, April 6, 2017 at 9:30:51 PM UTC-5, Aidan Hoolachan wrote:

donati...@gmail.com

unread,
Apr 29, 2018, 1:25:07 PM4/29/18
to Google Cloud Endpoints
+1 

an...@marketcheck.com

unread,
May 27, 2018, 10:41:40 AM5/27/18
to Google Cloud Endpoints
+1

razvan....@linnify.com

unread,
Jun 8, 2018, 2:00:31 AM6/8/18
to Google Cloud Endpoints
+1

leonardoviv...@gmail.com

unread,
Jun 9, 2018, 11:32:09 AM6/9/18
to Google Cloud Endpoints
+1

Em quinta-feira, 6 de abril de 2017 23:30:51 UTC-3, Aidan Hoolachan escreveu:

Lukas Karlsson

unread,
Jun 10, 2018, 10:48:12 AM6/10/18
to sep...@google.com, Aidan Hoolachan, Google Cloud Endpoints
I'm confused about what exactly is not supported here. 

I am able to setup a Cloud Function that is triggered via HTTP and I am able to have one of my Cloud Endpoints apps running in App Engine Standard on Python to use urlfetch to hit a web URL.

What specifically is it about the relationship between Google Cloud Endpoints and Google Cloud Functions that makes it so you can not trigger an HTTP Cloud Function from a Cloud Endpoints application?

/l

On Fri, Apr 7, 2017 at 12:24 PM 'Sepehr Ebrahimzadeh' via Google Cloud Endpoints <google-clou...@googlegroups.com> wrote:
Hi Aidan, 
You're correct: this is something that we're working on but is not currently supported. Are you already using Cloud Functions extensively?
Would you please tell us more (on this thread or privately) about your use cases?

Thanks,
Sepehr

On Thu, Apr 6, 2017 at 7:30 PM, Aidan Hoolachan <aidan.h...@gmail.com> wrote:
Have there been suggestions from Google about providing support for triggering Cloud Functions directly from Cloud Endpoint calls? This seems to be the logical next step for the platform. As far as I can tell., there isn't currently a GCP configuration that supports/mimics this paradigm. I consider the main value add to be Auth piped into the Function context.

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/CAASa8TZTd10dMt0ze1cBG4EMgn645syxHp3viu5gM2zPnAUeYw%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.


--
Lukas Karlsson, Cloud Architect / Developer Advocate

Broad Institute of MIT and Harvard
75 Ames Street, 11129, Cambridge, Massachusetts 02142
karl...@broadinstitute.org, +1.6177147142

Lukas Karlsson

unread,
Jun 10, 2018, 10:49:04 AM6/10/18
to sep...@google.com, Aidan Hoolachan, Google Cloud Endpoints
Meaning, if I am able to trigger my cloud function by running curl on my local machine, why can't it be triggered from an app running in App Engine with Cloud Endpoints?

/l

timot...@gmail.com

unread,
Jun 10, 2018, 11:39:05 AM6/10/18
to Google Cloud Endpoints
The idea is to set up a cloud function as an endpoint node, rather than accessing it from code running at an endpoint node running on Compute. Dispatch would route directly to the function.

Lukas Karlsson

unread,
Jun 11, 2018, 8:33:29 AM6/11/18
to timot...@gmail.com, Google Cloud Endpoints
Ah, so folks want to remove the App Engine app and have the Endpoints from the Cloud Functions instead.  Got it.

/l

On Sun, Jun 10, 2018 at 11:39 AM <timot...@gmail.com> wrote:
The idea is to set up a cloud function as an endpoint node, rather than accessing it from code running at an endpoint node running on Compute. Dispatch would route directly to the function.

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

in...@optimalisatie.nl

unread,
Jul 9, 2018, 8:28:07 AM7/9/18
to Google Cloud Endpoints
+1

It may be possible using ESP (Extensible Service Proxy). It is basically a custom Nginx server that could use LUA and subrequests to trigger a cloud function.

https://github.com/cloudendpoints/esp

in...@optimalisatie.nl

unread,
Jul 9, 2018, 8:30:44 AM7/9/18
to Google Cloud Endpoints
Example Nginx upstream for Google Cloud Function:

# google cloud optimization function
upstream o10n
-function {
    server us
-central1-xxx-1234.cloudfunctions.net:443;
}



You then simply use the proxy_pass method to trigger the function:

# optimization function
location
/o10n-function/ {
    allow
127.0.0.1;
    deny all
;


    proxy_pass https
://o10n-function/o10n-html;
}


Op maandag 9 juli 2018 14:28:07 UTC+2 schreef in...@optimalisatie.nl:

Rose Davidson

unread,
Jul 9, 2018, 4:28:03 PM7/9/18
to in...@optimalisatie.nl, Google Cloud Endpoints
The problem with this scenario is that the cloud function is still accessible by hitting its direct URL; there is (as far as I know) no way to enforce that access happens only through the proxy.

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.

in...@optimalisatie.nl

unread,
Jul 9, 2018, 5:22:41 PM7/9/18
to Google Cloud Endpoints
The ESP / Nginx proxy can add a header to identify requests. It will then be simple to block requests without the header.

Nginx also provides rate limiting and anti-DDoS functionality, this may help to prevent/reduce costs by potential abuse.

https://www.nginx.com/blog/mitigating-ddos-attacks-with-nginx-and-nginx-plus/

In regards to more advanced authentication, for example blocking requests without valid authentication, you could extend Nginx using Lua and subrequests which makes it possible to use Google's authentication service API or to perform authentication within the ESP server. The ability to limit traffic to the cloud function will help to reduce costs.

In regards to performance, CloudFlare is built using Nginx + Lua. It supports C++ code so it can be made efficient and reliable.

https://blog.cloudflare.com/pushing-nginx-to-its-limit-with-lua/

de...@broadinstitute.org

unread,
Jul 10, 2018, 11:28:12 AM7/10/18
to Google Cloud Endpoints
It seems like in this scenario (ESP as Nginx proxy for CFs) we lose crucial benefits of ESP, e.g. checking authentication and request validation, because there's no way to enforce that traffic to CFs only comes from ESP.

Timothy Nott

unread,
Jul 10, 2018, 11:41:04 AM7/10/18
to de...@broadinstitute.org, Google Cloud Endpoints
Can't one require the X-Endpoint-API-UserInfo header? While I think that could be a work-around, what we need is for ESP to stand in front of cloud functions in the same way that it does for app engine and use dispatch rules to direct traffic.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-cloud-endpoints/gwmuJNEgfAI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-cloud-endpoints+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/5d02163f-c882-4814-a799-f59f19b0b706%40googlegroups.com.

Denis Loginov

unread,
Jul 10, 2018, 10:45:20 PM7/10/18
to Timothy Nott, Google Cloud Endpoints
What could be possible is to sign the entire validated request with a SA key, forward the request with signature to CF, and verify the signature in CF. Then there's guarantee the request has come from ESP. The main problem with this approach is additional latency (on top of having to run a container behind ESP just to sign the requests).

The "light" version could verify only token signature (and thus only needs a bare-bones ESP for request validation), but then there's possibility that someone could have bypassed ESP if they stole a token and forged the request.

On Tue, Jul 10, 2018, 11:41 AM Timothy Nott <t...@factoryfix.com> wrote:
Can't one require the X-Endpoint-API-UserInfo header? While I think that could be a work-around, what we need is for ESP to stand in front of cloud functions in the same way that it does for app engine and use dispatch rules to direct traffic.
On Tue, Jul 10, 2018 at 10:28 AM, <de...@broadinstitute.org> wrote:
It seems like in this scenario (ESP as Nginx proxy for CFs) we lose crucial benefits of ESP, e.g. checking authentication and request validation, because there's no way to enforce that traffic to CFs only comes from ESP.

On Monday, July 9, 2018 at 5:22:41 PM UTC-4, in...@optimalisatie.nl wrote:
The ESP / Nginx proxy can add a header to identify requests. It will then be simple to block requests without the header.

Nginx also provides rate limiting and anti-DDoS functionality, this may help to prevent/reduce costs by potential abuse.

https://www.nginx.com/blog/mitigating-ddos-attacks-with-nginx-and-nginx-plus/

In regards to more advanced authentication, for example blocking requests without valid authentication, you could extend Nginx using Lua and subrequests which makes it possible to use Google's authentication service API or to perform authentication within the ESP server. The ability to limit traffic to the cloud function will help to reduce costs.

In regards to performance, CloudFlare is built using Nginx + Lua. It supports C++ code so it can be made efficient and reliable.

https://blog.cloudflare.com/pushing-nginx-to-its-limit-with-lua/

--
You received this message because you are subscribed to a topic in the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-cloud-endpoints/gwmuJNEgfAI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-cloud-endp...@googlegroups.com.

Denis Loginov

unread,
Jul 10, 2018, 11:14:01 PM7/10/18
to Timothy Nott, Google Cloud Endpoints
The earlier idea of adding a secret header in ESP/Nginx and verifying it in CF also has some appeal, however it implies the 2 runtimes either must store a pre-shared secret (which would lower security guarantees of temporary tokens), or forward hard-to-guess identifiers, again lowering security.

At the end of the day, this is about having a completely serverless system - running even just ESP on managed instances (incl. AppEngine) already defeats the purpose, because it requires more setup and keep-up.

It'd be really great to have this built into CF runtimes out of the box.

gr...@carthew.net

unread,
Aug 16, 2018, 9:43:50 PM8/16/18
to Google Cloud Endpoints
+1

sudeepku...@gmail.com

unread,
Aug 23, 2018, 4:49:45 PM8/23/18
to Google Cloud Endpoints
+1
Message has been deleted

Bastian D

unread,
Sep 24, 2018, 12:00:18 PM9/24/18
to Google Cloud Endpoints
+1

Harrison Kelly

unread,
Sep 24, 2018, 1:47:13 PM9/24/18
to Google Cloud Endpoints
+1

This functionality would make serverless with GCP a lot more intuitive and appealing. My platform of choice is GCP, but I'm dragging my feet on implementing a new feature with serverless because I don't want to deal with the workarounds.

mat...@doton.co.uk

unread,
Sep 24, 2018, 1:51:10 PM9/24/18
to Google Cloud Endpoints
+1 this would make our infrastructure much simpler

ronzan...@gmail.com

unread,
Oct 3, 2018, 8:40:12 PM10/3/18
to Google Cloud Endpoints
+1

Terri Chu

unread,
Oct 17, 2018, 3:41:48 PM10/17/18
to Google Cloud Endpoints
+1

richi...@gmail.com

unread,
Nov 5, 2018, 6:13:11 PM11/5/18
to Google Cloud Endpoints
+1

christia...@gmail.com

unread,
Nov 22, 2018, 1:09:54 PM11/22/18
to Google Cloud Endpoints
+1

abhishek...@corecompete.com

unread,
Dec 13, 2018, 12:13:33 PM12/13/18
to Google Cloud Endpoints
+1

Wilson Tam

unread,
Dec 31, 2018, 9:09:12 PM12/31/18
to Google Cloud Endpoints
+1

sebastie...@gmail.com

unread,
Jan 10, 2019, 6:00:48 AM1/10/19
to Google Cloud Endpoints
+1

huye...@gmail.com

unread,
Feb 20, 2019, 11:47:16 PM2/20/19
to Google Cloud Endpoints
+1

cavas...@gmail.com

unread,
Feb 21, 2019, 5:52:51 PM2/21/19
to Google Cloud Endpoints
+1

thibault...@carrefour.com

unread,
Feb 28, 2019, 10:53:11 AM2/28/19
to Google Cloud Endpoints
+1

On Thursday, February 21, 2019 at 11:52:51 PM UTC+1, cavas...@gmail.com wrote:
+1

normanko...@gmail.com

unread,
Mar 2, 2019, 10:57:05 AM3/2/19
to Google Cloud Endpoints
Hi, seems the problem still not resolved after almost 2 years. Is the roadmap to support Endpoint on GCF already deadend?
I am evaluating the product feature amongst various cloud provider and seems the progress on gcp is quite slow on this.

Aidan Hoolachan於 2017年4月7日星期五 UTC+8上午10時30分51秒寫道:

Mike McDonald

unread,
Mar 4, 2019, 4:33:16 PM3/4/19
to Google Cloud Endpoints
Hey folks,

I just started an EAP for this functionality: if you're interested, please fill out this survey and I'll add you to the group and let you play with it.

Thanks,
--Mike

arsa...@gmail.com

unread,
Mar 16, 2019, 4:08:17 AM3/16/19
to Google Cloud Endpoints
+1
Just filled out the form. Looking forward to using this functionality that’s been missing for years!

mver...@kunder.cl

unread,
May 3, 2019, 1:18:28 PM5/3/19
to Google Cloud Endpoints
Just filled out the survey, looking forward to testing this functionality. Thanks!

Mike McDonald

unread,
May 3, 2019, 1:43:29 PM5/3/19
to mver...@kunder.cl, Google Cloud Endpoints

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/6bd82ff8-e84f-449b-aaac-c64e19643077%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Michael McDonald | Product Manager, Serverless | mpmcd...@google.com | 1-844-THE-FIRE 
Reply all
Reply to author
Forward
0 new messages