Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
@Taywee

Description

@Taywee
Issue body actions

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.Issues 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

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.