How to restrict access to GAE Flexible site only for GSuite account?

别等时光非礼了梦想. 提交于 2019-12-06 14:39:17
Dzinek

Ok, after rethink the problem and dig deeper in a documentation I found a page about dev environment - https://cloud.google.com/appengine/docs/standard/python/creating-separate-dev-environments.

So my current solution is not to have separate versions like dev, stage and prod and work with them within one project, but to create separate projects for each of environment.

It will also simplify management of DBs - previous I thought about different database in one DB server for particular environment. Now I will have a separate DB instance for it.

Anyway I still have a problem with securing access. I did it in the same way like in Restrict App Engine access to G Suite accounts on custom domain:

  • changed Google Authentication to my Google Suite domain
  • added Custom Domain in my app
  • added my page domain to my GSuite as a second domain And I still can connect to my page without auth - even in "Incognito mode" and on others computers and mobiles.

EDIT: As a workaround I used Django-lockdown module. For the timebeing is more than enough - I have a password, I have a session, I can set it in Middleware or as a decorator for urls.

EDIT 2: I noticed today a new feature in GAE Flexible - Identity-Aware Proxy. This is the feature, that I was searching. You can restrict accces by:

  • Google Account email: user@gmail.com
  • Google Group: admins@googlegroups.com
  • Service account: server@example.gserviceaccount.com
  • Google Apps domain: example.com
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!