I can't see any incoming requests in Google Cloud Endpoint console - google-cloud-endpoints

I'm trying to configure Google Cloud Endpoint in front of Cloud Run. I decided to use the OpenAPI 2.0 standard so I can use Python 3.6.5 as a language to develop my backend.
I followed this guide https://cloud.google.com/endpoints/docs/openapi/get-started-cloud-run.
I've been able to set up a custom domain name for my Cloud Endpoints like api.example.com and I'm able to make API calls to my endpoints.
The only problem is that I can't see any incoming requests and any logs in my Cloud Endpoints console. I can only see them in the Cloud Run console.
How is possible? What am I doing wrong?
I also tried to create enable my Flask app to support another endpoint and I didn't update the openapi.yaml file with the new endpoint. My service is giving me answers if I make API calls to the new endpoints.
How is possible if I didn't update that file?
I'm starting to think that I didn't configure well the Cloud Endpoint and I'm making API calls directly to my Cloud Run service.

Related

Create a secured API using Firebase

I have created an API with Firebase using Cloud Functions. GET and POST endpoints are deploeyd.
A client application is registered on the project and can access it callable functions.
I would like other client applications (using their own separate Firebase project) being able to access the API too.
However, I am concerned regarding security.
If I create HTTPS endpoints for those applications, anyone having the URL will be able to use the API ?
And if I manage to restrict access only to those authorized apps, can I allow/restrict only specific endpoints (only GET endpoints, for example)?

Securing cloud run http end point for firebase android client

We have deployed a flask api running Google Cloud Run and have a RESTful HTTP endpoint. We intend this to be called by our iOS app which integrates with firebase (we want writes to go through a REST request instead directly to collection, for business logic).
Is there way that we can make it secure/leverage gcloud authentication capabilities?

Calling Firebase Remote Config REST API without auth

I want to use Firebase Remote Config API via REST in a mobile app. Due to technical limitations, I can't use the Android/iOS SDK so I have to resort to the REST API.
However, that API requires authentication using a private key -- obviously I can't include that key in the application.
I don't need any other Firebase service at this time, just the remote config.
How can I work around this limitation? I tried following the guide at https://firebase.google.com/docs/remote-config/use-config-rest, but as mentioned it requires to first generate a short-lived OAuth2 token using the auth API.
According to the documentation on using the Remote Config REST API:
This document describes how you can use the Remote Config REST API to read and modify the set of JSON-formatted parameters and conditions known as the Remote Config template.
So the REST API is for modifying Remote Config variables, the type of action you could also do in the Firebase console. It is not for use in regular clients, which consume the configuration variables. For that you'll have to use one of the provided clients, as there is no REST API and the wire protocol is not documented.

Is it possible for Firebase Cloud Functions to receive http request from an extenal server, while on Blaze Plan?

I have been searching and haven't found whether it is possible for a firebase project using the Blaze Plan to receive http requests from an external server.
If you have implemented https functions, you can recieve https requests from external server, after you deploy the function you'll get url for each functions either from terminal or firebase console in functions section, check the github repo for sample

Alternative to firebase functions to create actions-on-google integration

I am trying to find an alternative for Firebase to create functions that will work with actions-on-google DialogFlow class. I am creating a nodeJS app which will create a web service endpoint which will be configured as the Fulfillment URL in the DialogFlow dashboard. All the business logic to handle the request from API.AI will be at the nodeJS app. This app will then send back response by calling app.ask() and other related methods of API.AI (aka DialogFlow)
Reason: Our deployment cloud is on OneOps and we have dedicated assemblies for nodeJS apps. That is, I need to deploy this node app on our OneOps cloud and not on Firebase cloud.
Is there an alternative over Firebase here?
Absolutely! With Dialogflow you can define any URL (preferable HTTPS) in Dialogflow's console and you're free to use any hosting platform that can speak HTTP:
Also, you should be able to use the Action on Google library to respond to requests on most Node.js environments
Certainly! You can use whatever you want - all that Dialogflow requires is that the webhook be on a public address with a valid HTTPS certificate.
When designing the webhook, you'll need to accept a POST request from Dialogflow that contains JSON as the body, and similarly respond with a JSON body.
Since you're using node.js, you'll likely be using Express. One thing to note if you'll be using the actions-on-google library is that it expects that Express has already populated the req.body with a JSON object - not with the string body. This is typically done with middleware such as body-parser.

Resources