diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
index aa792a59a5a..dd368b2c605 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
@@ -1338,6 +1338,10 @@ export const storage: NavMenuConstant = {
name: 'Security',
url: undefined,
items: [
+ {
+ name: 'Ownership',
+ url: '/guides/storage/security/ownership',
+ },
{
name: 'Access Control',
url: '/guides/storage/security/access-control',
@@ -1356,6 +1360,10 @@ export const storage: NavMenuConstant = {
name: 'Resumable Uploads',
url: '/guides/storage/uploads/resumable-uploads',
},
+ {
+ name: 'S3 Uploads',
+ url: '/guides/storage/uploads/s3-uploads',
+ },
{ name: 'Limits', url: '/guides/storage/uploads/file-limits' },
],
},
@@ -1370,6 +1378,22 @@ export const storage: NavMenuConstant = {
},
],
},
+ {
+ name: 'Management',
+ url: undefined,
+ items: [
+ { name: 'Copy / Move Objects', url: '/guides/storage/management/copy-move-objects' },
+ { name: 'Delete Objects', url: '/guides/storage/management/delete-objects' },
+ ],
+ },
+ {
+ name: 'S3',
+ url: undefined,
+ items: [
+ { name: 'Authentication', url: '/guides/storage/s3/authentication' },
+ { name: 'API Compatibility', url: '/guides/storage/s3/compatibility' },
+ ],
+ },
{
name: 'CDN',
url: undefined,
@@ -1396,6 +1420,7 @@ export const storage: NavMenuConstant = {
name: 'Helper Functions',
url: '/guides/storage/schema/helper-functions',
},
+ { name: 'Custom Roles', url: '/guides/storage/schema/custom-roles' },
],
},
{
diff --git a/apps/docs/content/guides/getting-started/features.mdx b/apps/docs/content/guides/getting-started/features.mdx
index d9896c29346..cfb38b830bd 100644
--- a/apps/docs/content/guides/getting-started/features.mdx
+++ b/apps/docs/content/guides/getting-started/features.mdx
@@ -142,6 +142,10 @@ Transform images on the fly. [Docs](/docs/guides/storage/serving/image-transform
Upload large files using resumable uploads. [Docs](/docs/guides/storage/uploads/resumable-uploads).
+### S3 compatibility
+
+Interact with Storage from tool which supports with the S3 protocol. [Docs](/docs/guides/storage/s3/compatibility).
+
## Edge Functions
### Deno Edge Functions
@@ -218,6 +222,7 @@ In addition to the Beta requirements, features in GA are covered by the [uptime
| Storage | Smart CDN | `GA` | 🚧 [Cloudflare](https://www.cloudflare.com) |
| Storage | Image Transformations | `GA` | ✅ |
| Storage | Resumable Uploads | `GA` | ✅ |
+| Storage | S3 compatibility | `public alpha` | ✅ |
| Edge Functions | | `beta` | ✅ |
| Edge Functions | Regional Invocations | `beta` | ✅ |
| Edge Functions | NPM compatibility | `beta` | ✅ |
diff --git a/apps/docs/content/guides/storage/debugging/error-codes.mdx b/apps/docs/content/guides/storage/debugging/error-codes.mdx
index a190912b3cd..bb22f83afae 100644
--- a/apps/docs/content/guides/storage/debugging/error-codes.mdx
+++ b/apps/docs/content/guides/storage/debugging/error-codes.mdx
@@ -2,12 +2,79 @@
id: 'storage-errors-codes'
title: 'Error Codes'
description: 'Supabase Error Codes'
+subtitle: 'Learn about the Storage error codes and how to resolve them'
sidebar_label: 'Debugging'
---
+## Storage Error Codes
+
+
+
+
❌ x-amz-expected-bucket-owner |
+| ✅ [CreateBucket](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html) | ❌ ACL:
❌ x-amz-acl
❌ x-amz-grant-full-control
❌ x-amz-grant-read
❌ x-amz-grant-read-acp
❌ x-amz-grant-write
❌ x-amz-grant-write-acp
❌ Object Locking:
❌ x-amz-bucket-object-lock-enabled
❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
+| ✅ [DeleteBucket](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html) | ❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
+| ✅ [GetBucketLocation](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLocation.html) | ❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
+| ❌ [DeleteBucketCors](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html) | ❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
+| ❌ [GetBucketEncryption](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html) | ❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
+| ❌ [GetBucketLifecycleConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html) | ❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
+| ❌ [GetBucketCors](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketCors.html) | ❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
+| ❌ [PutBucketCors](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html) | ❌ Checksums:
❌ x-amz-sdk-checksum-algorithm
❌ x-amz-checksum-algorithm
❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
+| ❌ [PutBucketLifecycleConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html) | ❌ Checksums:
❌ x-amz-sdk-checksum-algorithm
❌ x-amz-checksum-algorithm
❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
+
+### Object operations
+
+| API Name | Feature |
+| -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| ✅ [HeadObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html) | ✅ Conditional Operations:
✅ If-Match
✅ If-Modified-Since
✅ If-None-Match
✅ If-Unmodified-Since
✅ Range:
✅ Range (has no effect in HeadObject)
✅ partNumber
❌ SSE-C:
❌ x-amz-server-side-encryption-customer-algorithm
❌ x-amz-server-side-encryption-customer-key
❌ x-amz-server-side-encryption-customer-key-MD5
❌ Request Payer:
❌ x-amz-request-payer
❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
+| ✅ [ListObjects](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html) | Query Parameters:
✅ delimiter
✅ encoding-type
✅ marker
✅ max-keys
✅ prefix
❌ Request Payer:
❌ x-amz-request-payer
❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
+| ✅ [ListObjectsV2](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html) | Query Parameters:
✅ list-type
✅ continuation-token
✅ delimiter
✅ encoding-type
✅ fetch-owner
✅ max-keys
✅ prefix
✅ start-after
❌ Request Payer:
❌ x-amz-request-payer
❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
+| ✅ [GetObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) | ✅ Conditional Operations:
✅ If-Match
✅ If-Modified-Since
✅ If-None-Match
✅ If-Unmodified-Since
✅ Range:
✅ Range
✅ PartNumber
❌ SSE-C:
❌ x-amz-server-side-encryption-customer-algorithm
❌ x-amz-server-side-encryption-customer-key
❌ x-amz-server-side-encryption-customer-key-MD5
❌ Request Payer:
❌ x-amz-request-payer
❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
+| ✅ [PutObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) | System Metadata:
✅ Content-Type
✅ Cache-Control
✅ Content-Disposition
✅ Content-Encoding
✅ Content-Language
✅ Expires
❌ Content-MD5
❌ Object Lifecycle
❌ Website:
❌ x-amz-website-redirect-location
❌ SSE-C:
❌ x-amz-server-side-encryption
❌ x-amz-server-side-encryption-customer-algorithm
❌ x-amz-server-side-encryption-customer-key
❌ x-amz-server-side-encryption-customer-key-MD5
❌ x-amz-server-side-encryption-aws-kms-key-id
❌ x-amz-server-side-encryption-context
❌ x-amz-server-side-encryption-bucket-key-enabled
❌ Request Payer:
❌ x-amz-request-payer
❌ Tagging:
❌ x-amz-tagging
❌ Object Locking:
❌ x-amz-object-lock-mode
❌ x-amz-object-lock-retain-until-date
❌ x-amz-object-lock-legal-hold
❌ ACL:
❌ x-amz-acl
❌ x-amz-grant-full-control
❌ x-amz-grant-read
❌ x-amz-grant-read-acp
❌ x-amz-grant-write-acp
❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
+| ✅ [DeleteObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html) | ❌ Multi-factor authentication:
❌ x-amz-mfa
❌ Object Locking:
❌ x-amz-bypass-governance-retention
❌ Request Payer:
❌ x-amz-request-payer
❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
+| ✅ [DeleteObjects](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html) | ❌ Multi-factor authentication:
❌ x-amz-mfa
❌ Object Locking:
❌ x-amz-bypass-governance-retention
❌ Request Payer:
❌ x-amz-request-payer
❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
+| ✅ [ListMultipartUploads](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html) | ✅ Query Parameters:
✅ delimiter
✅ encoding-type
✅ key-marker
✅️ max-uploads
✅ prefix
✅ upload-id-marker |
+| ✅ [CreateMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) | ✅ System Metadata:
✅ Content-Type
✅ Cache-Control
✅ Content-Disposition
✅ Content-Encoding
✅ Content-Language
✅ Expires
❌ Content-MD5
❌ Website:
❌ x-amz-website-redirect-location
❌ SSE-C:
❌ x-amz-server-side-encryption
❌ x-amz-server-side-encryption-customer-algorithm
❌ x-amz-server-side-encryption-customer-key
❌ x-amz-server-side-encryption-customer-key-MD5
❌ x-amz-server-side-encryption-aws-kms-key-id
❌ x-amz-server-side-encryption-context
❌ x-amz-server-side-encryption-bucket-key-enabled
❌ Request Payer:
❌ x-amz-request-payer
❌ Tagging:
❌ x-amz-tagging
❌ Object Locking:
❌ x-amz-object-lock-mode
❌ x-amz-object-lock-retain-until-date
❌ x-amz-object-lock-legal-hold
❌ ACL:
❌ x-amz-acl
❌ x-amz-grant-full-control
❌ x-amz-grant-read
❌ x-amz-grant-read-acp
❌ x-amz-grant-write-acp
❌ Storage class:
❌ x-amz-storage-class
❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
+| ✅ [CompleteMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html) | ❌ Bucket Owner:
❌ x-amz-expected-bucket-owner
❌ Request Payer:
❌ x-amz-request-payer |
+| ✅ [AbortMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html) | ❌ Request Payer:
❌ x-amz-request-payer |
+| ✅ [CopyObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html) | ✅ Operation Metadata:
⚠️ x-amz-metadata-directive
✅ System Metadata:
✅ Content-Type
✅ Cache-Control
✅ Content-Disposition
✅ Content-Encoding
✅ Content-Language
✅ Expires
✅ Conditional Operations:
✅ x-amz-copy-source
✅ x-amz-copy-source-if-match
✅ x-amz-copy-source-if-modified-since
✅ x-amz-copy-source-if-none-match
✅ x-amz-copy-source-if-unmodified-since
❌ ACL:
❌ x-amz-acl
❌ x-amz-grant-full-control
❌ x-amz-grant-read
❌ x-amz-grant-read-acp
❌ x-amz-grant-write-acp
❌ Website:
❌ x-amz-website-redirect-location
❌ SSE-C:
❌ x-amz-server-side-encryption
❌ x-amz-server-side-encryption-customer-algorithm
❌ x-amz-server-side-encryption-customer-key
❌ x-amz-server-side-encryption-customer-key-MD5
❌ x-amz-server-side-encryption-aws-kms-key-id
❌ x-amz-server-side-encryption-context
❌ x-amz-server-side-encryption-bucket-key-enabled
❌ x-amz-copy-source-server-side-encryption-customer-algorithm
❌ x-amz-copy-source-server-side-encryption-customer-key
❌ x-amz-copy-source-server-side-encryption-customer-key-MD5
❌ Request Payer:
❌ x-amz-request-payer
❌ Tagging:
❌ x-amz-tagging
❌ x-amz-tagging-directive
❌ Object Locking:
❌ x-amz-object-lock-mode
❌ x-amz-object-lock-retain-until-date
❌ x-amz-object-lock-legal-hold
❌ Bucket Owner:
❌ x-amz-expected-bucket-owner
❌ x-amz-source-expected-bucket-owner
❌ Checksums:
❌ x-amz-checksum-algorithm |
+| ✅ [UploadPart](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) | ✅ System Metadata:
❌ Content-MD5
❌ SSE-C:
❌ x-amz-server-side-encryption
❌ x-amz-server-side-encryption-customer-algorithm
❌ x-amz-server-side-encryption-customer-key
❌ x-amz-server-side-encryption-customer-key-MD5
❌ Request Payer:
❌ x-amz-request-payer
❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
+| ✅ [UploadPartCopy](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html) | ❌ Conditional Operations:
❌ x-amz-copy-source
❌ x-amz-copy-source-if-match
❌ x-amz-copy-source-if-modified-since
❌ x-amz-copy-source-if-none-match
❌ x-amz-copy-source-if-unmodified-since
✅ Range:
✅ x-amz-copy-source-range
❌ SSE-C:
❌ x-amz-server-side-encryption-customer-algorithm
❌ x-amz-server-side-encryption-customer-key
❌ x-amz-server-side-encryption-customer-key-MD5
❌ x-amz-copy-source-server-side-encryption-customer-algorithm
❌ x-amz-copy-source-server-side-encryption-customer-key
❌ x-amz-copy-source-server-side-encryption-customer-key-MD5
❌ Request Payer:
❌ x-amz-request-payer
❌ Bucket Owner:
❌ x-amz-expected-bucket-owner
❌ x-amz-source-expected-bucket-owner |
+| ✅ [ListParts](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) | Query Parameters:
✅ max-parts
✅ part-number-marker
❌ Request Payer:
❌ x-amz-request-payer
❌ Bucket Owner:
❌ x-amz-expected-bucket-owner |
diff --git a/apps/docs/content/guides/storage/schema/custom-roles.mdx b/apps/docs/content/guides/storage/schema/custom-roles.mdx
new file mode 100644
index 00000000000..8d2b86cc8dc
--- /dev/null
+++ b/apps/docs/content/guides/storage/schema/custom-roles.mdx
@@ -0,0 +1,73 @@
+---
+id: 'storage-schema-design'
+title: 'Custom Roles'
+description: 'Learn about the storage schema'
+subtitle: 'Learn about using custom roles with storage schema'
+sidebar_label: 'Schema'
+---
+
+In this guide, you will learn how to create and use custom roles with Storage to manage role-based access to objects and buckets.
+
+Supabase Storage uses the same role-based access control system as any other Supabase service using RLS (Row Level Security).
+
+## Create a Custom Role
+
+Let's create a custom role `manager` to provide full read access to a specific bucket. For a more advanced setup, see the [RBAC Guide](/docs/guides/auth/custom-claims-and-role-based-access-control-rbac#create-auth-hook-to-apply-user-role).
+
+```sql
+create role 'manager';
+
+-- Important to grant the role to the authenticator and anon role
+grant manager to authenticator;
+grant anon to manager;
+```
+
+## Create a policy
+
+Let's create a policy that gives full read permissions to all objects in the bucket `teams` for the `manager` role.
+
+```sql
+create policy "Manager can view all files in the bucket 'teams'"
+on storage.objects
+for select
+to manager
+using (
+ bucker_id = 'teams'
+);
+```
+
+## Test the policy
+
+To impersonate the `manager` role, you will need a valid JWT token with the `manager` role.
+You can quickly create one using the `jsonwebtoken` library in Node.js.
+
+
{step.description}
-General Availability Week
- Day 3 + Day 4{announcement.text}