Skip to content

Commit

Permalink
GITBOOK-614: No subject
Browse files Browse the repository at this point in the history
  • Loading branch information
carlospolop authored and gitbook-bot committed May 28, 2024
1 parent 1528a49 commit 622d2c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ gsutil hmac create <sa-email>

# Configure gsutil to use it
gsutil config -a
gcloud config set pass_credentials_to_gsutil false

# Use it
gsutil ls gs://[BUCKET_NAME]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ By default objects are **encrypted using Google managed keys**, but you could al

### Public Access

It's possible to give **external users** (logged in GCP or not) **access to buckets content**. \
It's possible to give **external users** (logged in GCP or not) **access to buckets content**.\
By default, when a bucket is created, it will have **disabled the option to expose publicly** the bucket, but with enough permissions the can be changed.

The **format of an URL** to access a bucket is **`https://storage.googleapis.com/<bucket-name>` or `https://<bucket_name>.storage.googleapis.com`** (both are valid).
Expand Down Expand Up @@ -101,6 +101,10 @@ curl -H "Authorization: Bearer $TOKEN" "https://storage.googleapis.com/storage/v

# Enumerate HMAC keys
gsutil hmac list

# Get permissions
gcloud storage buckets get-iam-policy gs://bucket-name/
gcloud storage objects get-iam-policy gs://bucket-name/folder/object
```

If you get a permission denied error listing buckets you may still have access to the content. So, now that you know about the name convention of the buckets you can generate a list of possible names and try to access them:
Expand Down

0 comments on commit 622d2c7

Please sign in to comment.