diff --git a/pages/storage_and_backup/object_storage/s3_share_object_externally/guide.en-gb.md b/pages/storage_and_backup/object_storage/s3_share_object_externally/guide.en-gb.md new file mode 100644 index 00000000000..ee315d16e7f --- /dev/null +++ b/pages/storage_and_backup/object_storage/s3_share_object_externally/guide.en-gb.md @@ -0,0 +1,122 @@ +--- +title: Object Storage – How to Share an Object/File Externally +excerpt: Learn how to securely share Object Storage files externally in OVHcloud, using presigned URLs, public-read objects, or bucket policies for controlled access. +updated: 2025-11-03 +--- + +## Objective + +This guide explains how to securely share files or objects stored in OVHcloud Object Storage with external users, covering temporary access, public-read objects, and bucket policies, while highlighting URL types and best practices. + +### Use case scenarios + +Usual use case scenarios for sharing objects in OVHcloud Object Storage include: + +- You want to provide a temporary download link to a partner or client without giving full bucket access. +- You need to make specific objects public, such as images or product documents, while keeping the rest of the bucket private. +- You want to grant controlled access to certain files for collaborators or external users. + +## Comparison of URL Types + +When sharing objects in OVHcloud Object Storage, understanding the difference between **path-style** and **virtual-hosted-style** URLs is important. + +| Feature | Path-style URL | Virtual-hosted-style URL | +| -------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------ | +| Format | `https://s3..io.cloud.ovh.net///` | `https://.s3..io.cloud.ovh.net/` | +| Typical use | Presigned URLs generated via API | URLs from the Control Panel or public objects | +| Bucket Name Location | In the URL path | In the subdomain | +| Best For | Temporary or programmatic access | Public sharing or stable links | +| Access Control | Limited by presigned URL expiration | Controlled by ACLs or bucket policies | + +**Key Takeaways:** + +- Use path-style URLs for temporary, API-generated access. +- Use virtual-hosted-style URLs for public or long-term sharing, as they are more standard and easier to manage. + +## Requirements + +- A bucket +- A user and defined the required access rights on the bucket + +See our [Getting started with Object Storage](/pages/storage_and_backup/object_storage/s3_getting_started_with_object_storage) guide. + +## Instructions + +OVHcloud Object Storage offers three main ways to share objects externally. Choose the method depending on whether you need temporary access, public access, or controlled sharing. + +> [!tabs] +> Via Presigned URLs +>> Presigned URLs provide temporary access to a private object without changing bucket permissions. +>> +>> Steps: +>> +>> - Generate a presigned URL using the OVHcloud API or an S3-compatible SDK. +>> - Set an expiration time. +>> - Share the URL with the external user. +>> +>> Example (AWS CLI compatible): +>> +>> ```bash +>> aws s3 presign s3://my-bucket/reports/data.csv --expires-in 3600 \ +>> --endpoint-url https://s3.gra.io.cloud.ovh.net +>> ``` +>> +>> This command returns a temporary link valid for 1 hour. +>> +>> After expiration, access is automatically blocked and the object remains private. +>> +> Via Public Objects +>> Specific objects can be publicly accessible by applying a public-read ACL. Only those objects become public; the bucket and its listing stay private. +>> +>> Steps: +>> +>> - Select the object via API. +>> - Apply the public-read ACL. +>> - Share the object's URL. +>> +>> Example (AWS CLI compatible): +>> +>> ```bash +>> aws s3api put-object-acl \ +>> --bucket my-bucket \ +>> --key docs/manual.pdf \ +>> --acl public-read \ +>> --endpoint-url https://s3.gra.io.cloud.ovh.net +>> ``` +>> +>> The object becomes accessible at: `https://my-bucket.s3.gra.io.cloud.ovh.net/docs/manual.pdf` +>> +> Via Bucket Policies +>> Bucket policies allow long-term or structured sharing by defining access rules for specific objects, prefixes, or IP ranges. +>> +>> Steps: +>> +>> - Write a JSON policy specifying the allowed actions and objects. +>> - Apply the policy to the bucket through the Control Panel or the API. +>> - Share the appropriate URL or credentials depending on the rule. +>> +>> Example: Allow public read access on a specific folder/prefix +>> +>> ```json +>> { +>> "Version": "2012-10-17", +>> "Statement": [ +>> { +>> "Effect": "Allow", +>> "Principal": "*", +>> "Action": "s3:GetObject", +>> "Resource": "arn:aws:s3:::my-bucket/public/*" +>> } +>> ] +>> } +>> ``` +>> +>> Once applied, any object under the `public/` prefix becomes publicly readable, while the rest of the bucket remains private. +>> + +## Go further + +If you need training or technical assistance to implement our solutions, contact your sales representative or click on [this link](/links/professional-services) to get a quote and ask our Professional Services experts for assisting you on your specific use case of your project. + +Join our [community of users](/links/community). + diff --git a/pages/storage_and_backup/object_storage/s3_share_object_externally/guide.fr-fr.md b/pages/storage_and_backup/object_storage/s3_share_object_externally/guide.fr-fr.md new file mode 100644 index 00000000000..398089265db --- /dev/null +++ b/pages/storage_and_backup/object_storage/s3_share_object_externally/guide.fr-fr.md @@ -0,0 +1,121 @@ +--- +title: Object Storage – Comment partager un objet/fichier en externe +excerpt: Découvrez comment partager en toute sécurité des fichiers Object Storage en externe dans OVHcloud, en utilisant des URLs signées, des objets public-read ou des politiques de bucket pour un accès contrôlé. +updated: 2025-11-03 +--- + +## Objectif + +Ce guide explique comment partager en toute sécurité des fichiers ou objets stockés dans l'Object Storage OVHcloud avec des utilisateurs externes, couvrant l'accès temporaire, les objets public-read et les politiques de bucket, tout en mettant en évidence les types d'URL et les bonnes pratiques. + +### Scénarios d'utilisation + +Les scénarios d'utilisation courants pour partager des objets dans l'Object Storage OVHcloud incluent : + +- Vous souhaitez fournir un lien de téléchargement temporaire à un partenaire ou client sans accorder un accès complet au bucket. +- Vous avez besoin de rendre certains objets publics, tels que des images ou des documents produits, tout en gardant le reste du bucket privé. +- Vous souhaitez accorder un accès contrôlé à certains fichiers pour des collaborateurs ou utilisateurs externes. + +## Comparaison des types d'URL + +Lorsque vous partagez des objets dans l'Object Storage OVHcloud, il est important de comprendre la différence entre les **URL Path-style** et les **URL Virtual-hosted-style**. + +| Fonctionnalité | URL Path-style | URL Virtual-hosted-style | +| -------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------ | +| Format | `https://s3..io.cloud.ovh.net///` | `https://.s3..io.cloud.ovh.net/` | +| Utilisation typique | URLs signées générées via l'API | URLs provenant du panneau de configuration ou des objets publics | +| Emplacement du nom de bucket | Dans le chemin de l'URL | Dans le sous-domaine | +| Meilleur pour | Accès temporaire ou programmation | Partage public ou liens stables | +| Contrôle d'accès | Limité par l'expiration de l'URL signée | Contrôlé par les ACL ou les politiques de bucket | + +**Points clés :** + +- Utilisez les URL de type chemin pour un accès temporaire ou programmé. +- Utilisez les URL Virtual-hosted-style pour le partage public ou à long terme, car elles sont plus standardisées et plus faciles à gérer. + +## Prérequis + +- Un bucket +- Un utilisateur et les droits d'accès requis définis sur le bucket + +Consultez notre guide [Object Storage - Premiers pas avec Object Storage](/pages/storage_and_backup/object_storage/s3_getting_started_with_object_storage). + +## En pratique + +L'Object Storage OVHcloud propose trois principales méthodes pour partager des objets en externe. Choisissez la méthode en fonction de vos besoins : accès temporaire, accès public ou partage contrôlé. + +> [!tabs] +> Via des URLs signées +>> Les URLs signées offrent un accès temporaire à un objet privé sans modifier les permissions du bucket. +>> +>> Étapes : +>> +>> - Générez une URL signée via l'API OVHcloud ou un SDK compatible S3. +>> - Définissez une date d'expiration. +>> - Partagez l'URL avec l'utilisateur externe. +>> +>> Exemple (compatible AWS CLI) : +>> +>> ```bash +>> aws s3 presign s3://my-bucket/reports/data.csv --expires-in 3600 \ +>> --endpoint-url https://s3.gra.io.cloud.ovh.net +>> ``` +>> +>> Cette commande retourne un lien temporaire valide pendant 1 heure. +>> +>> Après l'expiration, l'accès est automatiquement bloqué et l'objet reste privé. +>> +> Via des objets publics +>> Des objets spécifiques peuvent être rendus publics en appliquant une ACL public-read. Seuls ces objets deviennent publics. le bucket et sa liste restent privés. +>> +>> Étapes : +>> +>> - Sélectionnez l'objet via l'API. +>> - Appliquez l'ACL public-read. +>> - Partagez l'URL de l'objet. +>> +>> Exemple (compatible AWS CLI) : +>> +>> ```bash +>> aws s3api put-object-acl \ +>> --bucket my-bucket \ +>> --key docs/manual.pdf \ +>> --acl public-read \ +>> --endpoint-url https://s3.gra.io.cloud.ovh.net +>> ``` +>> +>> L'objet devient accessible à l'adresse : `https://my-bucket.s3.gra.io.cloud.ovh.net/docs/manual.pdf` +>> +> Via des politiques de bucket +>> Les politiques de bucket permettent un partage à long terme ou structuré en définissant des règles d'accès pour des objets, des préfixes ou des plages d'IP spécifiques. +>> +>> Étapes : +>> +>> - Écrivez une politique JSON spécifiant les actions autorisées et les objets. +>> - Appliquez la politique au bucket via le panneau de configuration ou l'API. +>> - Partagez l'URL ou les identifiants appropriés selon la règle. +>> +>> Exemple : Autoriser l'accès public en lecture sur un dossier/préfixe spécifique +>> +>> ```json +>> { +>> "Version": "2012-10-17", +>> "Statement": [ +>> { +>> "Effect": "Allow", +>> "Principal": "*", +>> "Action": "s3:GetObject", +>> "Resource": "arn:aws:s3:::my-bucket/public/*" +>> } +>> ] +>> } +>> ``` +>> +>> Une fois appliquée, tout objet sous le préfixe `public/` devient publiquement lisible, tandis que le reste du bucket reste privé. +>> + +## Aller plus loin + +Si vous avez besoin de formation ou d'une assistance technique pour mettre en œuvre nos solutions, contactez votre représentant commercial ou cliquez sur [ce lien](/links/professional-services) pour obtenir un devis et demander à nos experts de Services Professionnels de vous aider dans le cadre de votre cas d'utilisation spécifique ou de votre projet. + +Échangez avec notre [communauté d'utilisateurs](/links/community). \ No newline at end of file diff --git a/pages/storage_and_backup/object_storage/s3_share_object_externally/meta.yaml b/pages/storage_and_backup/object_storage/s3_share_object_externally/meta.yaml new file mode 100644 index 00000000000..5aa0f8da19d --- /dev/null +++ b/pages/storage_and_backup/object_storage/s3_share_object_externally/meta.yaml @@ -0,0 +1,3 @@ +id: c63001f8-fe0d-4700-b7b2-ea197f254365 +full_slug: public-cloud-storage-s3-share-object-externally +reference_category: public-cloud-storage-object-storage-tutorials \ No newline at end of file