Deploy cloud endpoints on custom domain - google-app-engine

I'm testing with Google Cloud Endpoints on App Engine and I've mapped my app to a custom domain. It appears that this is not possible. I've tried accessing the endpoint url, changing the host but this gives me a 404.
I've also tried to change the root url and backend url for the service, but then I get this error after deployment:
Endpoints: https://test.neenbedankt.com/_ah/api/myapi#v1 Error: API root https://test.neenbedankt.com/_ah/api not allowed on host version.myappid.appspot.com
Can somebody confirm this is a limitation? For my current project this would be a showstopper.

Correct, you can not map to a custom domain at current.

edit: Google CloudEndpoints 2.0 will support this, which is now BETA. As explained by Google in the link below.
Google has now announced this "will be supported" but has not given an ETA.
https://code.google.com/p/googleappengine/issues/detail?id=9384#c44

Related

Configure Basic HTTP Authentication with Google App Engine Node.js App

I'm running a GAE Standard Env. node/express app.
How can I configure Basic HTTP Authentication?
Is it possible to configure it with app.yaml?
I've read the docs, and did a lot of searching and so far it seems like I'll have to use my Express server to handle it. That seems weird because it requires that I have a server.
What if I wanted to serve a static HTML page? Then the express solution falls apart.
In nginx I can do this:
server {
...
auth_basic "Administrator’s Area";
auth_basic_user_file conf/htpasswd;
}
Is there an equivalent with app.yaml in GAE?
Thanks for your help =)
I think its not possible to do this type of authentication, but you have other options
- google sign in
- oauth
- firebase
* users api is available but not for node standard app engine
If you wanted to serve static html you might store it in Google Cloud Storage and Cloud storage has its own permissions options

Is there a way of checking if a Web Application or Website using the Google App Engine?

I am trying to figure out whether to use Google App Engine or other available PaaS. During my research, I am trying to figure out if a particular website using google app engine or not - Is there any known method to figure this out ?
Sorry for the basic question, but appreciate any help. Thanks.
You can recognize a GAE-based site based on the server's domain:
*.appspot.com - default domain of standard GAE apps
*.appspot-preview.com - default domain of newer flex GAE apps
custom domains mapped to ghs.google.com or ghs.googlehosted.com. See step 5 in the Adding a custom domain for your application procedure and how does ghs.google.com work?. Note that I'm unsure if this doesn't also apply to other Google products, not only to GAE.
There may be other such domains as well.
You can also check the Server header in the responses coming from the site. From Headers added or replaced:
Server
Set to Google Frontend. The development server sets this to
Development/x, where x is the version number.
ping the domain and if you have something with ghs.googlehosted.com:
PING ghs.googlehosted.com (216.58.213.147): 56 data bytes
It's a GAE application. You can also check the headers in requests from your browser's dev tools.

How do I serve an app engine version via subdomain when my app runs through Google Apps?

I'm trying to use a subdomain to serve a matching version id with Google App Engine and Google Apps. I've gone through the documentation but it's still unclear to me.
On this page regarding custom domains, it says I'm in a special case for using Google Apps. test.example.com -> to load "test" version of the application.
https://cloud.google.com/appengine/docs/domain -
Note that the instructions on this page are for App Engine apps that use an ordinary HTTP connection and are not served through Google Apps. Here are some related procedures that require different instructions:
This leads me to here https://support.google.com/a/answer/91080
It looks like the only way to add this subdomain in Google Apps is the Sites URL field.
Will the Sites URL correspond to the App Engine version ID?
You only need to use Google Apps to map an appengine app to a domain if you need https. Right now, Google Apps is the only way you can upload an SSL cert - hence this restriction.
If you do map your appengine app to a domain through google apps, you can do what you want by using wildcard subdomain mapping. Read more here..
The whole process is tedious, slow, and painful, and thats only when its not confusing, so put aside a good few hours to make all the changes and wait for DNS to propagate.

Google PubSub: SSL error when subscribing using an AppEngine push endpoint

I created a topic which I subscribe to using a push endpoint. The endpoint is a simple AppEngine web service. The Google PubSub documentation states that endpoints must be secured by HTTPS.
I am not receiving any traffic to the push endpoint. The AppEngine web service shows no requests. I've verified through the Google PubSub dashboard that messages are being published on the topic successfully. The dashboard shows unreachable_ssl_error for push subscriptions. Why is Google PubSub reporting this error?
When I try to access the SSL AppEngine endpoint via a browser I receive an SSL cert error also. Is this normal for AppEngine sites?
As documented at https://cloud.google.com/appengine/kb/general#https , SSL is supported on App Engine, but in a somewhat peculiar way.
Specifically, and I quote...:
Note: After April 2013 Google does not issue SSL certificates for
double-wildcard domains hosted at appspot.com (i.e. *.*.appspot.com).
If you rely on such URLs for HTTPS access to your application, change
any application logic to use "-dot-" instead of ".". For example, to
access version v1 of application myapp use
https://v1-dot-myapp.appspot.com.
Also look at the previous paragraph at this same URL about the need for secure in app.yaml and a link to language-specific instructions on exactly how to configure things, e.g https://cloud.google.com/appengine/docs/python/config/appconfig#Python_app_yaml_Secure_URLs if you're programming in Python.

How to setup custom domain with GAE?

I've followed the instruction and now I can access my GAE application with http://www.mydomain.com, but http://mydomain.com is not accessible - google (!) returns error 404. What I've missed in the setup?
Google App Engine doesn't support naked domains, you need to forward request from http://mydomain.com to http://www.mydomain.com.

Resources