Giving and Receiving access to a Google App Engine App/Datastore - google-app-engine

I want my GAE app's main page to take another app's url, and then have access to it's datastore or some variable it is just holding. I have seen the article and doc for Remote API. But it requires my app to know the other apps before hand. So is there a way to do this? Let's say security is not a priority.

Related

Allowing an App Engine app to access another App Engine app's datastore

I have a situation where an existing GAE App (let's call it app A) is running, but for non-technical reasons can't be modified. As users migrates to a new client version, we need to migrate their data from app A to a new GAE app (which I'll call app B).
Is there a way that I can grant app B access to app A's live datastore without modifying app A? My not modifying I mean not having to deploy new code. Changing setting or permissions in the Cloud Console is fine.
In case it matters, both apps that I'm referring to are written in Go.
It might not be possible to share the datastore across multiple GAE apps using the Google App Engine Standard Environment Client Libraries. At least for python it's not possible, donno about go.
But the Cloud Datastore Client Libraries can be used to share a datastore across many apps, even from outside Google Cloud.
Regardless of the particular way the old app accesses the datastore (language/library/etc.) it can be configured from the Cloud Console to allow access to a remote app. The exact procedure steps are captured in How do I use Google datastore for my web app which is NOT hosted in google app engine?
The new app would be using the above-metioned client library with the old app's service account credentials (obtained in the above paragraph procedure) to access the old app's datastore.

Google App Engine Access Cloud Datastore from Different Project

I have been trying to find a solution to accessing a datastore in one project from a different google app engine project. I went through the tutorial on accessing a datastore from a different project's compute engine, however, this is not what I am looking for. What is required here is accessing a datastore on one project from a different app engine project. Has anyone done this successfully? Any ideas?
Cheers
As #Patrice says, this is possible by using the Remote API for Java (or for Python), which lets you access different App Engine services from any other application, as stated in the documentation.
For a more specific information on how to access the Datastore remotely with the Remote API, please take a look at this article from the documentation that explains step by step all the procedure.
Please, take into account that if your Google account is configured to use 2-Step Verification, you will need an App Password that authorizes the app to access your account resources.
there is actually an API that lets you make calls to App Engine services from anywhere, even from another App, as long as the credentials are ok, it's called the "remote API"

Google App Engine online datastore

I have made a few stand alone apps that don't pull too much information from the internet. However, I want to make an app that allows users to post data which is then used by every user who has the app installed, like an online communal DB/datastore.
From what I've read it looks like Google App Engine is the solution and can be used in this sort of manner (looking at the "guestbook" demo app").
Can I use the Google app engine to provide data for an app?
If you're talking about an Android application, I think you can.
Depending on what kind of data you wish to store on your GAE datastore,
you can make a RESTful way of retreiving data from your GAE datastore.
For one example, you may be able to retrieve that data as a JSON object
Application sends GET request to the server, and the server responds with a JSON object.

Is there a way to limit app engine to accept request from domain I own / allow only?

I found that it's relatively easy to add an app engine app from google apps for business. And seems all you need is the app engine app's ID and you're done, with no authorization needed!
So how do app engine app creator protect their apps from access from other domains?
I know I can do programming to detect which domain the request is from, but what happen to those static files? It seems easy for people to "steal" my work and bandwidth resources by assigning their own domain to it.

Does hosting an appengine app on custom domain force me to be a google apps customer?

I have a domain I bought (via godaddy.com) - let's call it xyz.com
I have an gae app - let's call it xyzweb.appspot.com
I added a masked redirect at godaddy dns management console and now xyz.com gets redirected to xyzweb.appspot.com (even though the address bar shows xyz.com)
This stops working well in some cases like when I give a direct url redirect like href='/static/url/tohelppage.html' or when I attempt to redirect for OAuth authorization. So I read other posts on what I need to do and the most referred one was https://developers.google.com/appengine/docs/domain.
Based on that page it appears that it is necessary to sign up for a new Google Apps account with the new domain name?
So I Have to pay for Google Apps separately beyond what I am paying for Google AppEngine?
And also manage a separate apps domain and its services? I already have google apps domains and this seems more overhead to run a small app on gae.
Could you please help me understand if I've understood this right? And if there is a way to avoid the additional overhead of an extra google apps account?
The way that I do this, is I set up a basic google apps account (which is free), and I link the GAE app to my google apps account. Then you can set google apps to alias "www" to the appengine app, and now your appengine app works on www.yourdomain.tld
It's explained more here, which I know you already looked at, but it explains it well. Try reading it again.

Resources