Skip to content

read-only permissions don't throw an exception on an attempted write #1846

Closed
@Taywee

Description

@Taywee

When a user with read-only credentials on a bucket connects and attempts to write a blob, it silently exits as if it succeeded even though nothing was written.

This service account has only read permissions on the bucket referenced (project and bucket name have been changed for this example).

credentials = ServiceAccountCredentials.from_json_keyfile_dict(credentials_dict)
client = storage.Client(credentials=credentials, project='testproject')
bucket = client.get_bucket('testbucket')
blob = bucket.blob('testblob')
blob.upload_from_string('this is a test blob\n')

Nothing gets uploaded, but the final function call exits with no indication of failure.

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions