> For the complete documentation index, see [llms.txt](https://clients.medianova.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://clients.medianova.com/products/object-storage-stook/bucket-configuration/public-access-block.md).

# Public Access Block

Control whether objects in a Stook Bucket can be accessed without credentials and prevent the bucket from being made public.

**Public Access Block** provides two controls for managing public access:

* **Public access** allows objects in the Stook Bucket to be read without credentials.
* **Block public access** prevents the Stook Bucket from being made public.

These settings cannot be enabled at the same time.

{% hint style="info" %}
A Stook Bucket must have **Public access** enabled before it can be connected to a CDN Resource. When you create a CDN Resource using a Stook Bucket in the Medianova Control Panel, public access is enabled automatically for that bucket.
{% endhint %}

{% hint style="info" %}
For complete request parameters, response schemas, and error responses, see [Bucket Settings API](/api-documentation/object-storage-stook/buckets/settings.md).
{% endhint %}

## How Public Access Works

When **Public access** is enabled, anyone who knows an object's URL can retrieve the object without an access key or signed request.

```
https://<ENDPOINT_URL>/<BUCKET_NAME>/<OBJECT_KEY>
```

Public access applies only to reading individual objects:

* Objects can be downloaded without credentials.
* Bucket contents cannot be listed without credentials.
* Uploading, modifying, and deleting objects still require credentials with the appropriate permissions.

Use public access for content intended to be publicly retrievable, including website assets and media delivered through a CDN Resource.

## How Block Public Access Works

**Block public access** prevents a Stook Bucket from being made public. Use this setting for buckets that must remain private, such as buckets containing backups or internal data.

While **Block public access** is enabled, the Stook Bucket cannot be made public through:

* [Medianova Control Panel](https://cloud.medianova.com)
* [Stook API](/api-documentation/analytics/stook-analytics.md)
* S3-compatible clients

**Public access** and **Block public access** are mutually exclusive:

* To enable **Block public access**, disable **Public access** first.
* To enable **Public access**, disable **Block public access** first.

## Configure Public Access Block

{% stepper %}
{% step %}

### **Open the Stook Bucket**

In the [Medianova Control Panel](https://cloud.medianova.com), select **Stook Object Storage → Buckets**, then select the Stook Bucket you want to configure.
{% endstep %}

{% step %}

### **Open Public Access Block**

On the **Bucket configuration** page, select **Public access block**.

<figure><img src="https://542970813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtK7oIwmhUHdEJcaH4Hx8%2Fuploads%2FizqEC2VVEHWSpnmsWIfq%2Fimage.png?alt=media&amp;token=d68a36ea-7e20-4817-abe9-a6416d7e1062" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### **Configure public access**

Enable or disable **Public access** and **Block public access** as required.

The two settings cannot be enabled at the same time.
{% endstep %}

{% step %}

### **Save the configuration**

Select **Save Changes**.
{% endstep %}
{% endstepper %}

## Configuration Fields

<table><thead><tr><th width="187">Field</th><th width="430.800048828125">Description</th><th>Default</th></tr></thead><tbody><tr><td><strong>Public access</strong></td><td>Allows objects in the Stook Bucket to be read without credentials.</td><td>Off</td></tr><tr><td><strong>Block public access</strong></td><td>Prevents the Stook Bucket from being made public.</td><td>Off</td></tr></tbody></table>

## Public Access and CDN Resources

A Stook Bucket connected to a CDN Resource must remain public because the CDN Resource retrieves objects without credentials.

When a Stook Bucket is connected to a CDN Resource:

* **Public access** cannot be disabled.
* The Stook Bucket cannot be deleted.

To make the Stook Bucket private, first remove it from the CDN Resource, then disable **Public access**.

A Stook Bucket with **Block public access** enabled cannot be connected to a CDN Resource. Disable **Block public access** before connecting the bucket.

## Configure Public Access with the API

Public access and Block public access use different API endpoints.

### Configure Public Access

Use the bucket update endpoint to enable public access:

```http
PUT /api/v2/stook/{organization_uuid}/bucket/{bucket_uuid}
```

Send:

```json
{
  "anonymous_status": true
}
```

This request enables unauthenticated read access to individual objects in the Stook Bucket. The current state is returned as `anonymous_status` when you retrieve the bucket.

### Configure Block Public Access

Use the bucket settings endpoint:

```http
PATCH /api/v2/stook/{organization_uuid}/bucket/{bucket_uuid}/settings
```

Send:

```json
{
  "block_public_access": true
}
```

This request prevents the Stook Bucket from being made public.

## Troubleshooting

### Public Access Block cannot be enabled

If the Control Panel reports that the bucket is currently public, disable **Public access**, save the configuration, then enable **Block public access**.

### The Stook Bucket cannot be made public

If **Block public access** is enabled, disable it and save the configuration before enabling **Public access**.

### Public access cannot be disabled

If the Stook Bucket is connected to a CDN Resource, remove the bucket from the CDN Resource before disabling **Public access**.

### The Stook Bucket cannot be connected to a CDN Resource

Confirm that:

* **Block public access** is disabled.
* **Public access** is enabled.

Then create or update the CDN Resource.

## Related Topics

* [Bucket Configuration](/products/object-storage-stook/bucket-configuration.md)
* [Connect Stook Bucket to CDN](/products/object-storage-stook/connect-stook-bucket-to-cdn.md)
* [Manage Access Keys](/products/object-storage-stook/manage-access-keys.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://clients.medianova.com/products/object-storage-stook/bucket-configuration/public-access-block.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
