How to restrict access to non-default versions?

58 views
Skip to first unread message

Craig

unread,
Jul 20, 2011, 8:48:06 AM7/20/11
to google-a...@googlegroups.com
Is there a simple way to restrict access to non-default versions?  I'd like for administrators to have access to them, but nobody else.  I'm sure it's not too bad to code up something to handle this, but it seems like something the platform would provide (although I couldn't find any such feature).

Jose Montes de Oca

unread,
Jul 20, 2011, 6:08:57 PM7/20/11
to google-a...@googlegroups.com
Hi,

just need to add a restriction to the app configuration file to only access by the admin.

If you are working with python you would need to modify app.yaml and add login: admin to the urls in the handlers section. more info:

For java: you would need to add security constrains to your web.xml. more info:

Hope this helps!

Craig

unread,
Jul 20, 2011, 6:32:09 PM7/20/11
to google-a...@googlegroups.com
I was thinking of something to click in the admin web console, but making the configuration change will certainly do it - I didn't think of doing it that way.  Thanks!

Ikai Lan (Google)

unread,
Jul 21, 2011, 10:48:56 AM7/21/11
to google-a...@googlegroups.com
Craig,

We should probably look at making this a real feature. The configuration isn't the best solution because it means you need to swap the config in and out between deploys. It also means that if you want to restrict access to a staging version, you won't be able to just click the dashboard to switch versions after a deploy or rollback.

If you're using Java, it might even be better to create a filter that detects the request URI and forcing an admin login. You can programmatically detect the version, but again, this breaks your ability to deploy/rollback without a change:


Unless you store the current version in Memcache and do a check each time ... again, not a great solution.

Ikai Lan 
Developer Programs Engineer, Google App Engine


On Wed, Jul 20, 2011 at 10:32 PM, Craig <craigt...@gmail.com> wrote:
I was thinking of something to click in the admin web console, but making the configuration change will certainly do it - I didn't think of doing it that way.  Thanks!

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/VsxuIjOkdrwJ.

To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.

Craig Landry

unread,
Jul 21, 2011, 10:57:30 AM7/21/11
to google-a...@googlegroups.com
I agree, I would prefer the "real feature". For now I'm planning to
write a little script to download the version's code from GAE (since
my own code will have been modified since then), change the config
file, and upload it back into GAE.

Is there a formal place I can go to make a feature request for this?

Ikai Lan (Google)

unread,
Jul 21, 2011, 11:00:56 AM7/21/11
to google-a...@googlegroups.com
Yeah, search the issues tracker:



Ikai Lan 
Developer Programs Engineer, Google App Engine


Craig

unread,
Jul 21, 2011, 1:30:33 PM7/21/11
to google-a...@googlegroups.com
Thanks.  I didn't see any similar request, so I've created #5380
Reply all
Reply to author
Forward
0 new messages