login: admin is the way we do them as well.

On Friday, November 13, 2015 at 5:00:25 AM UTC-5, Paul Canning wrote:
>
> Nevermind, I think I got it sussed.
>
> My controller was locked down so only logged in admins could trigger the 
> task, and so was the end point. Obviously the Task Queue could not be 
> logged in, so it failed.
>
> I'm guessing the best way to secure a task end point is to set a handler 
> and use login: admin?
>
> On Thursday, November 12, 2015 at 7:22:28 PM UTC, Joshua Johnston wrote:
>>
>> Can you show us what the handlers section of your yaml looks like for the 
>> non-working module?
>>
>> On Thursday, November 12, 2015 at 12:42:42 PM UTC-5, Paul Canning wrote:
>>>
>>> I have a CI app and I am trying to get Push Tasks to work.
>>>
>>> I have a controller, controller_a, with a method, method_a, which tells 
>>> GAE to add a task to the queue, to hit controller_a/method_b, with a basic 
>>> payload. Method_b simply writes a file to GCS (using verified working code).
>>>
>>> Now, my tasks appear, but always return as a 302 response. Method_a is 
>>> fully accessible, checking the logs shows a 200 response.
>>>
>>> I can even actually go to controller_a/method_b and see a 200 response 
>>> in the logs (obv. the POST data is missing).
>>>
>>> Now, this is where it gets weird. I made a full fresh install of CI and 
>>> made a basic task example, as above.
>>>
>>> It works. 100%. I put in on a new module, and even made a new, 
>>> non-default version to check. And it always works.
>>>
>>> Below are the responses I got from the working and non-working tasks.
>>>
>>> I simply cannot figure out for the life of me whats wrong.
>>>
>>> Both CI installs are the same version, 2.2.6.
>>>
>>> The non-working one *does* have additional CI routes and URL handlers in 
>>> the app.yaml, but none that go near the task methods.
>>>
>>> *Working:*
>>>
>>> 0.1.0.2 - - [12/Nov/2015:08:44:22 -0800] "POST /tasks/test HTTP/1.1" 200 
>>> 25 https://ci-test-dot-myapp.appspot.com/ "AppEngine-Google; (+
>>> http://code.google.com/appengine)" "ci-test.myapp.appspot.com" ms=623 
>>> cpu_ms=111 cpm_usd=2.7929999999999998e-06 
>>> instance=00c61b117c97eae25cc3ab600a819360a37cb04b app_engine_release=1.9.29 
>>> trace_id=-
>>>
>>> 0.1.0.2 - - [12/Nov/2015:09:09:19 -0800] "POST /tasks/test HTTP/1.1" 200 
>>> 25 https://1-1-dot-ci-test-dot-myapp.appspot.com/ "AppEngine-Google; (+
>>> http://code.google.com/appengine)" "1-1.ci-test.myapp.appspot.com" 
>>> ms=645 cpu_ms=107 cpm_usd=2.7929999999999998e-06 
>>> instance=00c61b117c91285c5c7991b03cfef45e55459cf8 app_engine_release=1.9.29 
>>> trace_id=-
>>>
>>> *Non- Working:*
>>>
>>> 0.1.0.2 - - [12/Nov/2015:09:00:48 -0800] "POST /cleanup/task HTTP/1.1" 
>>> 302 563 http://1-4-dot-ci-app-dot-myapp.appspot.com/ "AppEngine-Google; 
>>> (+http://code.google.com/appengine)" "1-4.ci-app.v.appspot.com" ms=31 
>>> cpu_ms=35 cpm_usd=6.292e-05 instance=00c61b117ce404978751535a24ad4d36a6c8c4 
>>> app_engine_release=1.9.29 trace_id=5641c0ed69cda78c99e147d41f7aae05
>>>
>>

-- 
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-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/959b818a-5c50-4766-b494-a29b392fe8b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to