-
Notifications
You must be signed in to change notification settings - Fork 387
Feat s3 share externally #8710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
OvhValentin
wants to merge
3
commits into
develop
Choose a base branch
from
feat-s3-share-externally
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+246
−0
Draft
Feat s3 share externally #8710
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
122 changes: 122 additions & 0 deletions
122
pages/storage_and_backup/object_storage/s3_share_object_externally/guide.en-gb.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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.<region>.io.cloud.ovh.net/<bucket>/<object-key>/<generated-code>` | `https://<bucket>.s3.<region>.io.cloud.ovh.net/<object-key>` | | ||
| | 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). | ||
|
|
||
121 changes: 121 additions & 0 deletions
121
pages/storage_and_backup/object_storage/s3_share_object_externally/guide.fr-fr.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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.<region>.io.cloud.ovh.net/<bucket>/<object-key>/<generated-code>` | `https://<bucket>.s3.<region>.io.cloud.ovh.net/<object-key>` | | ||
| | 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). |
3 changes: 3 additions & 0 deletions
3
pages/storage_and_backup/object_storage/s3_share_object_externally/meta.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/!\bucket policies is not implemented yet so it could be misleading. I suggest displaying a message saying that the feature is not supported yet and that it is an upcoming feature