Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud Storage Authentication

I build Android app link to Google Cloud Storage. I want to allow access to GCS to my android app ONLY.

Google offers three solutions to securely connect to GCS:

  • Oauth 2.0 (So with google account)
  • Cookie-base Account (With google account too)
  • Service Account Authentication (With private Key, but locally installed on Android App: Very Bad if someone decompile my .apk)

Source: https://developers.google.com/storage/docs/authentication?hl=FR

Is there any other solution to connect securely over GCS ? I would like to connect on GCS to this way (Restrict to Android client ID: SHA1 to your .apk) : https://developers.google.com/appengine/docs/java/endpoints/auth

It is possible with GCS ? Should I use Blobstore to do that ?

Thanks in advance

like image 908
Phil Avatar asked Oct 01 '22 18:10

Phil


1 Answers

This is something of a fundamental problem with computing. You can never completely trust that an application running on hardware that is under the total control of an unknown third party has not been somehow tampered with. There are many, many techniques to make tampering much more difficult, but remote systems will never be completely secure. There are several ways to verify that a user has a particular Google account, but you can't easily trust with certainty that a certain app is exactly your app.

That said, there are plenty of ways to design a secure application without trusting the client. What does your app need to be authorized to do? Upload objects? Download secure objects? Is there something bad that a user masquerading as your application could do?

like image 164
Brandon Yarbrough Avatar answered Oct 03 '22 09:10

Brandon Yarbrough