Google Cloud Storage Issue with Renewable Download URL from App Engine

We use Google Cloud Storage’s renewable upload mechanism to download files from the App Engine, as described in: https://developers.google.com/storage/docs/json_api/v1/how-tos/upload#resumable A good feature is what can GCS do is generate the URL to download from App Engine using uploadId, allowing you to use that URL directly from the client without having to sign the URL. This works when adding a GAE service account as a member of the GCS API project.

This mechanism worked very well for a long time, but from today it has stopped working with the following error (http 403):

"domain": "usageLimits", "reason": "accessNotConfigured", "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."

So, we have lost a little. Could this be related to the GCS incident (Incident Report for GCS Error Rate Indicator March 4)?

Find below the important part of the code that we use to make the first POST (which worked before):

String url = "https://www.googleapis.com/upload/storage/v1beta2/b/"+bucketName+"/o?uploadType=resumable"; connection.setRequestMethod("POST"); connection.setRequestProperty("X-Upload-Content-Type", contentType); String json = "{\"name\":\""+objectName+"\"}"; connection.setRequestProperty("Content-Length", String.valueOf(json.getBytes("UTF-8").length)); connection.setRequestProperty("Content-Type", "application/json"); List scopes = new ArrayList<>(); scopes.add("https://www.googleapis.com/auth/devstorage.full_control"); AppIdentityService.GetAccessTokenResult accessToken = AppIdentityServiceFactory.getAppIdentityService().getAccessToken(scopes); connection.setRequestProperty("Authorization", "Bearer "+accessToken.getAccessToken());

+4
source share
1 answer

To fix this, we need to enable the "JSON GCS API" in the App Engine project (GCS buckets are part of another project for which the JSON GCS API is already enabled). Unfortunately, we cannot enable the API, because the App Engine project is still an Old Style project without an API menu in the Google Developers Console.

API App Engine, "Cloud Integration" App Engine. ( Google Cloud, Google Cloud Storage .)

, : " . ".

: https://code.google.com/p/googleappengine/issues/detail?id=10906 , - Google .

0

Source: https://habr.com/ru/post/1530403/


All Articles