google-cloud-endpoints

GoogleJsonResponseException: 401 Unauthorized calling endpoint with OAuth2 protection

♀尐吖头ヾ 提交于 2021-02-19 06:01:07
问题 I am trying to make an Android app with App Engine as mobile backend. I am getting this error when I try to call an endpoint protected by authentication: 12-21 18:58:05.120 4452-4477/com.test.myapplication W/System.err﹕ com.google.api.client.googleapis.json.GoogleJsonResponseException: 401 Unauthorized 12-21 18:58:05.120 4452-4477/com.test.myapplication W/System.err﹕ { 12-21 18:58:05.130 4452-4477/com.test.myapplication W/System.err﹕ { 12-21 18:58:05.130 4452-4477/com.test.myapplication W

Google cloud platform Cloud Endpoint SSL/TLS mutual handshake ESP

孤街浪徒 提交于 2021-02-11 13:41:42
问题 I am working on deploying an API solution on GCP where mutual SSL/TLS is required (server and client side certificates). So for the ingress of the traffic (entry point) I found that kubernetes ingress controller has this possibility (NGINX based). I am interested by cloud endpoints which has ESP (extensible service proxy which is also nginx deployment under kubernetes). I couldn't find anywhere in the documentation whether mutual SSL/TLS is available for ESP (cloud endpoint), does anyone know

How to set up custom user authentication with Google Cloud Endpoints

让人想犯罪 __ 提交于 2021-02-10 13:22:35
问题 I am trying to understand how to use Cloud Endpoints with custom authentication. From the docs I understand that it starts from the securityDefinitions : securityDefinitions: your_custom_auth_id: authorizationUrl: "" flow: "implicit" type: "oauth2" # The value below should be unique x-google-issuer: "issuer of the token" x-google-jwks_uri: "url to the public key" # Optional. Replace YOUR-CLIENT-ID with your client ID x-google-audiences: "YOUR-CLIENT-ID" This is how I understand the flow: API

How to set up custom user authentication with Google Cloud Endpoints

独自空忆成欢 提交于 2021-02-10 13:21:16
问题 I am trying to understand how to use Cloud Endpoints with custom authentication. From the docs I understand that it starts from the securityDefinitions : securityDefinitions: your_custom_auth_id: authorizationUrl: "" flow: "implicit" type: "oauth2" # The value below should be unique x-google-issuer: "issuer of the token" x-google-jwks_uri: "url to the public key" # Optional. Replace YOUR-CLIENT-ID with your client ID x-google-audiences: "YOUR-CLIENT-ID" This is how I understand the flow: API

Google Endpoints GET request URL parameters [Python]

跟風遠走 提交于 2021-02-10 06:17:50
问题 I am currently working on a small project where I need to write a GET handler. I am working from the Echo example provided in the endpoints documentation. I have my resource container: GET_EMAIL_RESOURCE = endpoints.ResourceContainer( message_types.VoidMessage, i = messages.IntegerField(1, default = 1) ) And I have my handler: @endpoints.method( GET_EMAIL_RESOURCE, EchoResponse, path='echo/getEmails/{i}', http_method='GET', name='echo_get_emails' ) def echo_get_emails(self, request): if

Google Endpoints GET request URL parameters [Python]

馋奶兔 提交于 2021-02-10 06:17:07
问题 I am currently working on a small project where I need to write a GET handler. I am working from the Echo example provided in the endpoints documentation. I have my resource container: GET_EMAIL_RESOURCE = endpoints.ResourceContainer( message_types.VoidMessage, i = messages.IntegerField(1, default = 1) ) And I have my handler: @endpoints.method( GET_EMAIL_RESOURCE, EchoResponse, path='echo/getEmails/{i}', http_method='GET', name='echo_get_emails' ) def echo_get_emails(self, request): if

passing path parameter in google endpoints to backend not working

跟風遠走 提交于 2021-02-08 20:52:59
问题 My setup contains google-endpoints with google-cloud-functions as my backend. Google endpoints is defined with the following swagger v2 yaml: swagger: "2.0" info: description: "yada..." version: "0.0.1" title: "yadada.." termsOfService: "http://swagger.io/terms/" contact: name: "blah" email: "email@mail.com" url: "https://example.com" host: "(generated service url by google when endpoints is deployed, i.e. 'api-gateway-xyz123123-ew.a.run.app')" tags: - name: "Documents" description: "blah"

passing path parameter in google endpoints to backend not working

余生颓废 提交于 2021-02-08 20:52:21
问题 My setup contains google-endpoints with google-cloud-functions as my backend. Google endpoints is defined with the following swagger v2 yaml: swagger: "2.0" info: description: "yada..." version: "0.0.1" title: "yadada.." termsOfService: "http://swagger.io/terms/" contact: name: "blah" email: "email@mail.com" url: "https://example.com" host: "(generated service url by google when endpoints is deployed, i.e. 'api-gateway-xyz123123-ew.a.run.app')" tags: - name: "Documents" description: "blah"

Enforce Cache-Control in Google Cloud Endpoints

混江龙づ霸主 提交于 2021-02-07 01:57:39
问题 My endpoint method generates a different response for each invocation regardless of the parameter list. I often see my client call the endpoint with the same parameter list, and the front end instance returns a cached response. In the official documentation I read that ApiMethod#cacheControl has been deprecated. On the other hand, the documentation says that the @Api-scopped annotation @ApiCacheControl has not been implemented yet so adding the following makes no difference. cacheControl =

Enforce Cache-Control in Google Cloud Endpoints

浪子不回头ぞ 提交于 2021-02-07 01:56:03
问题 My endpoint method generates a different response for each invocation regardless of the parameter list. I often see my client call the endpoint with the same parameter list, and the front end instance returns a cached response. In the official documentation I read that ApiMethod#cacheControl has been deprecated. On the other hand, the documentation says that the @Api-scopped annotation @ApiCacheControl has not been implemented yet so adding the following makes no difference. cacheControl =