2

I'm developing a Cloud Endpoint in Google App Engine Standard (Google Cloud), and API calls are woeking both locally and in deployed Google App Engine.

I'm trying to Restricting API Access with API Keys as specified here, following step by step:
https://cloud.google.com/endpoints/docs/frameworks/java/restricting-api-access-with-api-keys-frameworks

I have also configured my openapi.json file:

"securityDefinitions":{
     "api_key": {
         "type" : "apiKey",
         "name": "key",
         "in": "query"
     }
 }
"security": [
   {
     "api_key": [ ]
    },

but i can still access my methods without adding any ?key= to the url.

I've also notice that in Google Cloud Console, in Endpoint section, i can see my deployed APIs, but I don't see any activity from my API, when I'm making calls, ans these appear in Google App Engine Log.

What is missed in the configuration?

Thanks.

  • Have you enabled GoogleAppEngineControlFilter in your application? – Rose Davidson May 18 '18 at 17:45
  • Did you follow the steps on the documentation [https://cloud.google.com/endpoints/docs/frameworks/java/get-started-frameworks-java ] for the endpoint configuration? – gr7 May 21 '18 at 13:41
  • Did you manage to get this working? I have exactly the same problem, even after I have added the GoogleAppEngineControlFilter. Or did you end up checking the API key in your code (which is kind of like what the filter should be doing, but doesn't). – rakensi Sep 21 '18 at 18:55
  • 1
    Did you get anywhere with this? followed the tutorial and having the same problem – millsy Feb 03 '20 at 18:09

0 Answers0