Cloudtasks handler auth in Go 1.12 standard env

36 views
Skip to first unread message

Bob Glickstein

unread,
Aug 27, 2019, 7:52:44 PM8/27/19
to Google App Engine
I'm using the Go 1.12 standard environment. I have some handlers for cron- and cloudtasks-generated requests. How should these handlers ensure that requests are coming from my GAE service account? The docs are super unclear about this, and many are outdated (still referring to e.g. login: admin in app.yaml.)

Thanks in advance!

Giuliano Ribeiro

unread,
Aug 28, 2019, 9:11:33 AM8/28/19
to google-a...@googlegroups.com
I've done this filtering the request headers like described here:

Requests from the Cron Service will also contain a HTTP header:

X-Appengine-Cron: true


Giuliano Ribeiro



On Wed, Aug 28, 2019 at 12:52 AM Bob Glickstein <bob.gli...@gmail.com> wrote:
I'm using the Go 1.12 standard environment. I have some handlers for cron- and cloudtasks-generated requests. How should these handlers ensure that requests are coming from my GAE service account? The docs are super unclear about this, and many are outdated (still referring to e.g. login: admin in app.yaml.)

Thanks in advance!

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/360363bf-cdfd-4a1f-b036-5fdba04bd33d%40googlegroups.com.

Bob Glickstein

unread,
Aug 28, 2019, 4:23:55 PM8/28/19
to Google App Engine
Ah, great, thanks! And now that you've pointed that out, I see there is a corresponding way to validate cloudtasks requests: the X-Appengine-Taskname header field.

Thank you again,
- Bob


On Wednesday, August 28, 2019 at 6:11:33 AM UTC-7, Giuliano Ribeiro wrote:
I've done this filtering the request headers like described here:

Requests from the Cron Service will also contain a HTTP header:

X-Appengine-Cron: true


Giuliano Ribeiro


On Wed, Aug 28, 2019 at 12:52 AM Bob Glickstein <bob.gl...@gmail.com> wrote:
I'm using the Go 1.12 standard environment. I have some handlers for cron- and cloudtasks-generated requests. How should these handlers ensure that requests are coming from my GAE service account? The docs are super unclear about this, and many are outdated (still referring to e.g. login: admin in app.yaml.)

Thanks in advance!

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-a...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages