hosting static web site to specific users on google cloud storage [on hold] - google-cloud-platform

I created static website on google cloud storage, is is possible to restrict access to a now publicly available web page?

Related

Bot for Google Drive Web Service

I am thinking if legal/proper is to use google drive web service instead google drive api. Let we say. I will have a bot which authenticate to google drive, open file and than call web service which google use.
An idea become because google drive api v3 does not support thing which they show on the web site.

Should my Android Application connect to Google Services?

I am building an enterprise solution that requires thousands of users using android/IoS Application.
We use Google Storage and Google Pub/Sub.
Would it be ill-advised to allow each andriod application 'publish'(only) to GOogle pub and upload images to Google Storage directly from the mobile application?
or
Should we implement the Google Services on the back end, and only have the android applications use our 'endpoints'.
our back-end is NOT deployed in Google App Engine but on our own coud infrastructure.
ive already implemented everything..just wondering is that a good 'practice' to say if i have 10,000 mobile application they have my 'service account.json' to publish to the Google Pub/Sub...or perhaps wrap that access in my backend via an endpoint.
Backend scenario
I believe the best way to go is to make use of GCP's service accounts. You can use a service account with Pub/Sub's publisher role and another with Cloud Storage's objectCreator role. Or a single service account with both roles.
This means that these or this service account will be your IAM (Identity and Access Management) gateways to your Cloud services (publishing to Pub/Sub and writing to Cloud Storage).
Indeed, you will have to implement Cloud Service access in your backend (it doesn't matter if it's not in App Engine, you can use the Google Cloud Client Libraries or the Cloud APIs to connect to GCP services), making use of these service accounts.
Direct scenario
Else, you would have to manage the access control for Pub/Sub and the access control for Cloud Storage on a per user/application granularity which, in my opinion, would be more difficult.

Upload File to Drive Remotely

I was trying to upload files to google drive from a Desktop Application, but i couldnt find how to do it with Google Drive API since that is based for google browser apps. For this matter should i use Google Drive API or Documments API?
You can use both Drive API or Documents List API to achieve, but the Drive API has the additional requirement that Apps need to be installed (for now) from the Chrome Web Store. Once installed, if you authorize the user with OAuth 2.0, you can use the Drive API in a desktop app.

How to upload file on google drive from my website?

I want to use Google drive API to upload file using upload button. I have a web app which is build with back-end of Laravel API and mongodb , front-end is angularJs. I want that if user upload file. The file upload to company's Google drive account not user's Google drive account (like Google file picker etc.) I'm beginner for API so please suggest me. What can I do?
We can use Service accounts to upload file to company account.
refere the link : https://developers.google.com/accounts/docs/OAuth2ServiceAccount
Service Account has it own limitations.
For alternative approach refer this link : How do I authorise an app (web or installed) without user intervention? (canonical ?)

External asp.net mvc application accessing files on Google Drive

I would like to build an external asp.net mvc application that has the following features:
The application is accessible via its own domain such as www.itsowndomain.com
The application has access to one Google account (such as itsownaccount#gmail.com) where all the files are stored in the Drive folder. So the users of the application should not have to log into their own Google accounts in order to access the files from this application. The application needs to have automatic access to this (itsownaccount#gmail.com)'s google Drive, that process should be transparent to the user, they should never have to authenticate themselves, its should all happen in the code in the background when the application loads.
The application will use Google Picker to list the files that are in (itsownaccount#gmail.com)'s google Drive folder.
My questions are as follows:
Is what I am trying to do possible, basically using Google Drive as a storage of files and downloading them, uploading new ones and possible editing some from an external application?
Can I use one account because all the files should be publicly available so I do not want users to have to be thinking about authentication in a site just so they can view publicly accessible files?
How do I go about implementing this, is there a tutorial because the ones I have looked at all differ as they mostly try authenticate each user with their own Google account?
you can use Google Drive as the storage solution for your application, check the Google Drive SDK: https://developers.google.com/drive/
Google Drive application usually rely on the users' accounts to store their files, but nothing prevents you from using your account to store all files and make them publicly accessible
there's an ASP.NET MVC tutorial and sample app at https://developers.google.com/drive/examples/dotnet, however, it authenticates each user with his own account. You can start from it and replace the standard OAuth flow with one that always uses your credentials, for instance, by always using a Refresh token that you generated in advance and provided to the app.

Resources