-1

I have a requirement to authenticate a webpage and download the file to GCS bucket

I got a solution from the below link that we can directly transfer the file from URL to GCS bucket which is without authentication.

Transfer file from URL to Cloud Storage

I want to know if the same solution or similar solution can be done to download the file to GCS bucket after webpage authentication using python

Thanks!.

vickr
  • 21
  • 4
  • Is that solution that you are looking for? https://cloud.google.com/storage/docs/access-control/signed-urls – guillaume blaquiere Jun 21 '21 at 12:44
  • thanks for the link ..this is for signed URL's where we generate a key for limited time to download the data .. am looking to login to an external website and download the files to GCS bucket using python.. I need to use the existing user ID and password to login and download the data to GCS bucket – vickr Jun 21 '21 at 13:15

1 Answers1

1

If you log in into an external password and then you want to get the file in GCS bucket you have 2 solutions:

  • Either the user account is a google account and you autorise it to get the file from GCS (with IAM permissions) -> But, because you log in into an external website, I assume it's not a Google account
  • Or, the external website has its own technical credentials (service account) to reach the GCS. Here 2 solutions
    • Either the external website download the file on behalf the user and then propose to the user to download it from the external website (not the best solution, especially in case of large file)
    • Or generate a signed URL that autorise the logged user to download the file directly from GCS.
guillaume blaquiere
  • 66,369
  • 2
  • 47
  • 76