How should I create a Google App Engine service visible only within my project? -


i'd create google app engine service use microservice. i'd api accessible callers within project's network (i.e., google compute engine , gae instances on project). what's easiest way restrict access this?

i see how run private modules on google app engine? check x-appengine-inbound-appid works requests gae, doesn't requests gce.

to restrict gce service use networking. don't think gae instances can assigned networks though.

check if x-appengine-inbound-appid matches app id.

https://cloud.google.com/appengine/docs/python/appidentity/

appengine identity api doc contains using x-appengine-inbound-appid asserting identity.

import webapp2   class mainpage(webapp2.requesthandler):      allowed_app_ids = [         'other-app-id',         'other-app-id-2'     ]      def get(self):         incoming_app_id = self.request.headers.get(             'x-appengine-inbound-appid', none)          if incoming_app_id not in self.allowed_app_ids:             self.abort(403)          self.response.write('this protected page.')  app = webapp2.wsgiapplication([     ('/', mainpage) ], debug=true) 

Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -