To clarify the above, your task handler only gets called when it's time for 
the task to actually run, not when the task gets first placed in the queue, 
so there isn't a chance that you'll need to deal with an expired auth token.

If you're using push queues, it's sufficient to protect your task handler 
URL with 'login: admin' since push queues handlers live on and are issued 
by App Engine, which will always be able to authenticate. See 'Securing 
Task Handlers 
<https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#securing_task_handler_urls>
'.

If you have a pull queue, your task handler is either calling the Task 
Queue REST API every time it needs to lease a task which requires OAuth 
authentication, or you're doing it from within App Engine as well which 
uses the application credentials. See 'Using Pull Queues 
<https://cloud.google.com/appengine/docs/python/taskqueue/overview-pull>'.

On Tuesday, August 23, 2016 at 6:19:44 PM UTC-4, Nick wrote:
>
> The task queue can invoke admin secured urls when you use push, which 
> would normally require IAM access. If you set it up like that (assuming you 
> can trust your admins) all invocations can be trusted, regardless of 
> headers etc.
>
> Presumably in this case you'll still need to send a user identifier for 
> context, but you can assume the operation was authorized by the call that 
> queued the task.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/77248dbc-840b-419e-b68f-d96f6ba62d16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to