<@U04S8PLJWMT> When trying to setup gcs as a sourc...
# replication-ask-ai
v
@kapa.ai When trying to setup gcs as a source using service account auth in airbyte cloud , I'm getting below error : It seems you're not authorized. Please try logging in again. (HTTP 401) Failed to save Google Cloud Storage (GCS) - Test_Cloud due to the following error: errors.http.unauthorized But the same credentials worked on self hosted Airbyte . What is going wrong ?
k
I'm sorry, but the provided knowledge sources do not explicitly mention the specific error "errors.http.unauthorized" occurring specifically for Airbyte Cloud while the same credentials work for Airbyte Open Source. However, based on the knowledge sources regarding GCS and authentication issues, here are the most relevant factors that could be causing this: ### 1. Service Account Permissions Ensure the service account JSON key you are using has the required roles. For Airbyte to interact with GCS, the service account typically needs: * Storage Admin or Storage Object Admin for full bucket access [[GCS Data Lake](https://docs.airbyte.com/integrations/destinations/gcs-data-lake); [GCS Destination Connection Failed](https://discuss.airbyte.io/t/3580)]. * For specific operations, it may require
storage.objects.get
,
storage.objects.list
, and
storage.objects.create
[[Google Cloud Storage Destination](https://docs.airbyte.com/integrations/destinations/gcs)]. ### 2. Networking and Access Control If your GCS bucket has restricted access (e.g., via VPC or Firewall rules), Airbyte Cloud might be blocked while your local/self-hosted instance (which likely runs within your own network) is not. * The GCS destination documentation notes that you must allow connections from the Airbyte server to your GCS cluster if they exist in separate networks [[Google Cloud Storage Destination](https://docs.airbyte.com/integrations/destinations/gcs)]. * Verify that your bucket does not have a retention policy that might interfere with connection tests [[Google Cloud Storage Destination](https://docs.airbyte.com/integrations/destinations/gcs)]. ### 3. API Response Latency In some cases, an "Unauthorized" error (401) can occur if the API takes too long to generate or validate a token, which Airbyte may interpret as an authentication failure. A similar issue was reported where enabling error handling/retries resolved transient 401 errors [[Source Custom Failure](https://github.com/airbytehq/airbyte/issues/48740)]. ### 4. Setup Steps for Airbyte Cloud Double-check that you are following the Cloud-specific setup: 1. Navigate to Sources -> + New source. 2. Select Google Cloud Storage (GCS). 3. Choose Service Account Information as the authentication type. 4. Paste the entire contents of the JSON key file into the field [[Set up GCS Source](https://docs.airbyte.com/integrations/sources/gcs)]. If the error persists despite the credentials being valid, it may be related to how Airbyte Cloud specifically handles the credential handshake compared to the Open Source version, though the documents do not provide a specific fix for this discrepancy.