[GH-ISSUE #1334] Using non-anonymous client #191

Open
opened 2026-03-03 12:09:03 +03:00 by kerem · 1 comment
Owner

Originally created by @jkarolczak on GitHub (Sep 20, 2023).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/1334

I wonder if I can use face-gcs-server when I'm forced to use a non-anonymous client. I use an external package (mlflow) that forces calling .refresh() which raises an exception when called on an anonymous credentials object (google docs). I have no idea what to put to the credentials file to point the fake-gcs-storage by the google-cloud-storage client.

My use case is strictly limited to Python, but I think it's a general issue, not related to any specific language.

Originally created by @jkarolczak on GitHub (Sep 20, 2023). Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/1334 I wonder if I can use face-gcs-server when I'm forced to use a non-anonymous client. I use an external package (mlflow) that forces calling `.refresh()` which raises an exception when called on an anonymous credentials object ([google docs](https://google-auth.readthedocs.io/en/stable/reference/google.auth.credentials.html#google.auth.credentials.AnonymousCredentials.apply)). I have no idea what to put to the credentials file to point the fake-gcs-storage by the google-cloud-storage client. My use case is strictly limited to Python, but I think it's a general issue, not related to any specific language.
Author
Owner

@fsouza commented on GitHub (Sep 22, 2023):

Hmm that would be up to the client. I'm pretty sure that when credentials are specified, the SDKs communicate with the Google API to validate it. fake-gcs-server only simulates the GCS API, it doesn't support validating credentials.

I haven't looked too deep into this though, so I could be wrong. Do you know what API gets called when you call .refresh() in the Python SDK?

<!-- gh-comment-id:1730740765 --> @fsouza commented on GitHub (Sep 22, 2023): Hmm that would be up to the client. I'm pretty sure that when credentials are specified, the SDKs communicate with the Google API to validate it. fake-gcs-server only simulates the GCS API, it doesn't support validating credentials. I haven't looked too deep into this though, so I could be wrong. Do you know what API gets called when you call `.refresh()` in the Python SDK?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#191
No description provided.