Pprof handlers behind admin login

327 views
Skip to first unread message

Shaunak Godbole

unread,
Aug 16, 2017, 12:57:32 PM8/16/17
to Google App Engine
Hi,

We are trying to add the pprof handlers to our app engine project: https://golang.org/src/net/http/pprof/pprof.go.  Everything works fine and we can use 'go tool pprof' to generate heap profiles.  However, I would like to put it behind an admin login.  Putting this behind an admin prevents 'go tool' for accessing the profiles.

Is there a way to do this?

Thanks!
Shaunak

Shivam(Google Cloud Support)

unread,
Aug 16, 2017, 5:58:53 PM8/16/17
to Google App Engine

Are you referring to the admin login as described in the handlers. Did you check what the url header is returning and were there any issues authenticating to the application?  


Shaunak Godbole

unread,
Aug 16, 2017, 7:52:50 PM8/16/17
to google-a...@googlegroups.com
Hi Shivam,

Yes, that is correct.

The actual problem is that I want to be able to authenticate using command line tools such as go tool pprof.  Currently, the server just sends a 302 status code which tries to redirect me to the Google Authentication screen.

Is there a way to get an authentication token and pass it as part of the headers somehow?

Thanks,
Shaunak

--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/GeiTihhdM7Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
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/3285ef25-b2e3-44b1-b9ac-83d24bab2e54%40googlegroups.com.

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



--
It is not the aptitude but the attitude that decides a persons altitude
Shaunak Godbole

Shivam(Google Cloud Support)

unread,
Aug 18, 2017, 11:37:33 AM8/18/17
to Google App Engine
That is kind of expected behavior of admin login where user will be redirected to Google sign in page. Using go tool pprof sounds like a good question to be posted on one of their help forums such as Go Forum or Gopher Slack.


On Wednesday, August 16, 2017 at 7:52:50 PM UTC-4, Shaunak Godbole wrote:
Hi Shivam,

Yes, that is correct.

The actual problem is that I want to be able to authenticate using command line tools such as go tool pprof.  Currently, the server just sends a 302 status code which tries to redirect me to the Google Authentication screen.

Is there a way to get an authentication token and pass it as part of the headers somehow?

Thanks,
Shaunak
On Wed, Aug 16, 2017 at 2:58 PM, 'Shivam(Google Cloud Support)' via Google App Engine <google-a...@googlegroups.com> wrote:

Are you referring to the admin login as described in the handlers. Did you check what the url header is returning and were there any issues authenticating to the application?  



On Wednesday, August 16, 2017 at 12:57:32 PM UTC-4, Shaunak Godbole wrote:
Hi,

We are trying to add the pprof handlers to our app engine project: https://golang.org/src/net/http/pprof/pprof.go.  Everything works fine and we can use 'go tool pprof' to generate heap profiles.  However, I would like to put it behind an admin login.  Putting this behind an admin prevents 'go tool' for accessing the profiles.

Is there a way to do this?

Thanks!
Shaunak

--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/GeiTihhdM7Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages