diff --git a/content/de/administration/protocols/meta.json b/content/de/administration/protocols/meta.json index 1c3e718c..ae9aa157 100644 --- a/content/de/administration/protocols/meta.json +++ b/content/de/administration/protocols/meta.json @@ -5,6 +5,7 @@ "webdav", "ftps", "sftp", + "swift", "[MCP-Server](/de/developer/mcp)" ] -} \ No newline at end of file +} diff --git a/content/de/administration/protocols/swift.md b/content/de/administration/protocols/swift.md new file mode 100644 index 00000000..1fd80662 --- /dev/null +++ b/content/de/administration/protocols/swift.md @@ -0,0 +1,108 @@ +--- +title: "OpenStack-Swift-API" +description: "Erstellen Sie RustFS mit der optionalen Swift-API und binden Sie die OpenStack-Keystone-Authentifizierung an." +--- + +RustFS kann auf demselben HTTP-Endpunkt wie die S3-API eine mit OpenStack Swift kompatible API bereitstellen. Diese Anleitung zeigt, wie Sie das optionale Feature `swift` erstellen, die Keystone-Tokenvalidierung konfigurieren und grundlegende Konto-, Container- und Objektoperationen prüfen. + +:::warning[Kompatibilitätsumfang] + +Die Swift-Unterstützung ist optional und deckt nicht jedes Verhalten von OpenStack Swift ab. `HEAD`-Anfragen auf Kontoebene und Listenformate außer JSON sind nicht implementiert. Prüfen Sie Ihren Client-Workflow, bevor Sie die API produktiv einsetzen. + +::: + +## Zuordnung von Swift zu RustFS + +Swift-Anfragen verwenden den Pfad `/v1/AUTH_/...` am S3-API-Endpunkt von RustFS: + +| Swift-Ressource | Anfragepfad | RustFS-Zuordnung | +| --- | --- | --- | +| Konto | `/v1/AUTH_` | Das authentifizierte Keystone-Projekt | +| Container | `/v1/AUTH_/` | Ein projektisolierter RustFS-Bucket | +| Objekt | `/v1/AUTH_//` | Ein Objekt im zugeordneten Bucket | + +Die Projekt-ID in der URL muss mit der Projekt-ID im validierten Keystone-Token übereinstimmen. RustFS akzeptiert das Token in `X-Auth-Token` oder `X-Storage-Token`. + +Die bestätigten Kernoperationen sind: + +| Bereich | Operationen | +| --- | --- | +| Konto | Container auflisten, Kontometadaten aktualisieren | +| Container | Erstellen, auflisten, untersuchen, Metadaten aktualisieren, löschen | +| Objekt | Hochladen, herunterladen, Bereich herunterladen, untersuchen, Metadaten aktualisieren, kopieren, löschen | + +## Mit Swift-Unterstützung erstellen + +Swift gehört nicht zum standardmäßigen RustFS-Featuresatz. Erstellen Sie das Feature ausdrücklich aus dem Repository `rustfs/rustfs`: + +```bash +cargo build --release --features swift +``` + +Das erzeugte Binary stellt Swift-Pfade an der konfigurierten S3-API-Adresse bereit. Es gibt keinen separaten Swift-Listener und keinen Swift-spezifischen Port. + +## Keystone konfigurieren + +Aktivieren Sie Keystone und legen Sie vor dem Start von RustFS den Authentifizierungsendpunkt fest: + +```bash +export RUSTFS_KEYSTONE_ENABLE=true +export RUSTFS_KEYSTONE_AUTH_URL=https://keystone.example.com +export RUSTFS_KEYSTONE_VERSION=v3 +export RUSTFS_KEYSTONE_VERIFY_SSL=true +``` + +| Variable | Zweck | Standardwert | +| --- | --- | --- | +| `RUSTFS_KEYSTONE_ENABLE` | Aktiviert die Keystone-Tokenvalidierung. | `false` | +| `RUSTFS_KEYSTONE_AUTH_URL` | Legt den Keystone-Authentifizierungsendpunkt fest; bei aktiviertem Keystone erforderlich. | Nicht gesetzt | +| `RUSTFS_KEYSTONE_VERSION` | Wählt die Keystone-API-Version. | `v3` | +| `RUSTFS_KEYSTONE_VERIFY_SSL` | Prüft das TLS-Zertifikat von Keystone. | `true` | +| `RUSTFS_KEYSTONE_CACHE_SIZE` | Legt die maximale Anzahl der Token-Cache-Einträge fest. | `10000` | +| `RUSTFS_KEYSTONE_CACHE_TTL` | Legt die Lebensdauer des Token-Caches in Sekunden fest. | `300` | +| `RUSTFS_KEYSTONE_TIMEOUT` | Legt das Zeitlimit für Keystone-Anfragen in Sekunden fest. | `30` | + +Wir empfehlen, die TLS-Prüfung aktiviert zu lassen. Wenn Keystone ein übergebenes Token ablehnt, gibt RustFS `401 Unauthorized` zurück und verwendet für diese Anfrage keine lokalen Anmeldedaten als Rückfall. + +## API prüfen + +Beziehen Sie ein bereichsgebundenes Token und eine Projekt-ID von Keystone und setzen Sie anschließend diese Shell-Variablen: + +```bash +export SWIFT_TOKEN='' +export SWIFT_ACCOUNT='AUTH_' +export SWIFT_URL="http://localhost:9000/v1/${SWIFT_ACCOUNT}" +``` + +Listen Sie die für das Projekt sichtbaren Container auf: + +```bash +curl --fail-with-body \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + "${SWIFT_URL}" +``` + +Erstellen Sie `my-bucket`, laden Sie `hello.txt` hoch und laden Sie das Objekt wieder herunter: + +```bash +curl --fail-with-body --request PUT \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + "${SWIFT_URL}/my-bucket" + +curl --fail-with-body --request PUT \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + --upload-file /path/to/hello.txt \ + "${SWIFT_URL}/my-bucket/hello.txt" + +curl --fail-with-body \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + "${SWIFT_URL}/my-bucket/hello.txt" +``` + +Eine Anfrage an ein `AUTH_`-Konto, das nicht zum Token-Projekt passt, erhält `403 Forbidden`. + +## Nächste Schritte + +- [S3-Kompatibilitätsmatrix prüfen](/de/reference/s3-compatibility) +- [RustFS-Anmeldedaten verwalten](/de/operations/credentials) +- [TLS für RustFS konfigurieren](/de/integration/tls-configured) diff --git a/content/de/reference/meta.json b/content/de/reference/meta.json index e92df8d8..adc04cd8 100644 --- a/content/de/reference/meta.json +++ b/content/de/reference/meta.json @@ -4,6 +4,7 @@ "defaultOpen": false, "pages": [ "environment-variables", - "cli" + "cli", + "s3-compatibility" ] } diff --git a/content/de/reference/s3-compatibility.md b/content/de/reference/s3-compatibility.md new file mode 100644 index 00000000..bc3f4bed --- /dev/null +++ b/content/de/reference/s3-compatibility.md @@ -0,0 +1,66 @@ +--- +title: "S3-Kompatibilitätsmatrix" +description: "Prüfen Sie das getestete und bewusst ausgeschlossene Amazon-S3-Verhalten im aktuellen RustFS-Kompatibilitäts-Gate." +--- + +RustFS implementiert eine getestete Teilmenge der Amazon-S3-API. Diese Matrix fasst die ausführbaren Ceph-s3tests-Listen im Repository `rustfs/rustfs` zusammen; sie erhebt keinen Anspruch auf vollständige Abdeckung aller standardmäßigen oder anbieterspezifischen S3-Verhaltensweisen. + +Der folgende Stand wurde am 9. August 2026 gegen den RustFS-Commit [`1e6f5f1e`](https://github.com/rustfs/rustfs/commit/1e6f5f1e35f188f28844a7f81361ccca4d5d0c7b) geprüft. + +## Statuslegende + +| Status | Bedeutung | +| --- | --- | +| ✅ Getestet | Vom standardmäßigen oder vom Lebenszyklus-Kompatibilitäts-Gate abgedeckt | +| ❌ Geplant | Als noch nicht implementiertes Standardverhalten erfasst | +| ⊘ Ausgeschlossen | Anbieterspezifisch, bewusst nicht unterstützt oder außerhalb des Standard-Gates | + +## Ausführbare Testlisten + +| Liste | Fälle | Aufgabe | +| --- | ---: | --- | +| [Implementierte Tests](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/implemented_tests.txt) | 455 | Standardfälle, die im Standard-Gate bestehen müssen | +| [Lebenszyklus-Verhaltenstests](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/lifecycle_behavior_tests.txt) | 5 | Ablauf-Fälle im separaten Lebenszyklus-Gate | +| [Nicht implementierte Tests](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/unimplemented_tests.txt) | 17 | Standardverhalten, das weiterhin geplant ist | +| [Ausgeschlossene Tests](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/excluded_tests.txt) | 270 | Fälle, die das RustFS-Kompatibilitäts-Gate nicht blockieren | + +Die Zählung ignoriert Leerzeilen und Kommentare. Tests wechseln bei Änderungen zwischen den Listen; die verlinkten Dateien enthalten den neuesten Stand. + +## Bucket-Operationen + +| Funktion | Status | Umfang | +| --- | --- | --- | +| Buckets erstellen, löschen, auflisten und untersuchen | ✅ Getestet | Übliche Bucket-Lebenszyklusoperationen | +| Bucket-Tags | ✅ Getestet | Tags setzen, abrufen und löschen | +| Bucket-Richtlinien | ✅ Getestet | Richtlinien setzen, abrufen und löschen | +| Blockierung öffentlichen Zugriffs | ✅ Getestet | Konfiguration setzen, abrufen und löschen | +| Ausgewählte Versionierungs-, Object-Lock-, CORS- und Lebenszyklusverhalten | ✅ Getestet | Nur Fälle aus den implementierten Listen | +| Bucket-Zugriffsprotokollierung | ❌ Geplant | In der nicht implementierten Liste erfasst | +| Bucket-Eigentümersteuerung | ❌ Geplant | In der nicht implementierten Liste erfasst | +| ACL-Autorisierung | ⊘ Ausgeschlossen | Bewusst nicht unterstütztes Produktverhalten | + +## Objektoperationen + +| Funktion | Status | Umfang | +| --- | --- | --- | +| Objekte hochladen, abrufen, kopieren, untersuchen und löschen | ✅ Getestet | Übliche Objektoperationen | +| Listenverhalten für Präfix, Trennzeichen, Marker und `max-keys` | ✅ Getestet | `ListObjects` und `ListObjectsV2` | +| Bereichs- und bedingte Lesezugriffe | ✅ Getestet | Ausgewählte HTTP-Range- und Vorbedingungsfälle | +| Benutzermetadaten und Objekt-Tags | ✅ Getestet | Roundtrips für Metadaten und Tags | +| Vorsignierte GET- und PUT-URLs | ✅ Getestet | Ausgewählte Signatur- und Anfragefälle | +| SSE-C und ausgewähltes SSE-KMS-Verhalten | ✅ Getestet | Nur Roundtrips von durch RustFS verwalteten Objekten | +| Prüfsummen bei POST-Object-Formularuploads | ❌ Geplant | In der nicht implementierten Liste erfasst | + +Verschlüsselte Objektformate sind zwischen RustFS und anderen S3-Implementierungen nicht portabel. Ein bestandener Verschlüsselungstest bedeutet, dass RustFS von RustFS verschlüsselte Objekte lesen kann; er garantiert nicht, dass RustFS direkt kopierte verschlüsselte Objekte einer anderen Implementierung lesen kann. + +## Mehrteilige Uploads + +| Funktion | Status | Umfang | +| --- | --- | --- | +| Erstellen, Teile hochladen, abschließen und abbrechen | ✅ Getestet | Kernablauf eines mehrteiligen Uploads | +| Ausgewähltes Multipart-Kopier-, Prüfsummen- und Objektattributverhalten | ✅ Getestet | Fälle aus der implementierten Liste | +| Auflistung mehrteiliger Uploads und Grenzfälle beim Teileabruf | ⊘ Ausgeschlossen | Nicht Teil des Standard-Kompatibilitäts-Gates | + +## Verbindliche Quellen + +Die [S3-Kompatibilitätsmatrix](https://github.com/rustfs/rustfs/blob/main/docs/architecture/s3-compatibility-matrix.md) im Repository erläutert das Gate und seine Aktualisierungsregel. Die ausführbaren Dateien unter [`scripts/s3-tests`](https://github.com/rustfs/rustfs/tree/main/scripts/s3-tests) bestimmen das aktuelle Ergebnis. Wenn sich eine Funktion ändert, müssen Testlisten und beide veröffentlichten Matrizen gemeinsam aktualisiert werden. diff --git a/content/en/administration/protocols/meta.json b/content/en/administration/protocols/meta.json index 860caa6f..287d081d 100644 --- a/content/en/administration/protocols/meta.json +++ b/content/en/administration/protocols/meta.json @@ -5,6 +5,7 @@ "webdav", "ftps", "sftp", + "swift", "[MCP Server](/en/developer/mcp)" ] -} \ No newline at end of file +} diff --git a/content/en/administration/protocols/swift.md b/content/en/administration/protocols/swift.md new file mode 100644 index 00000000..bff36650 --- /dev/null +++ b/content/en/administration/protocols/swift.md @@ -0,0 +1,108 @@ +--- +title: "OpenStack Swift" +description: "Build RustFS with the optional Swift API and connect it to OpenStack Keystone authentication." +--- + +RustFS can expose an OpenStack Swift-compatible API on the same HTTP endpoint as its S3 API. Use this guide to build the optional `swift` feature, configure Keystone token validation, and verify basic account, container, and object operations. + +:::warning[Compatibility scope] + +Swift support is optional and does not cover every OpenStack Swift behavior. Account `HEAD` requests and non-JSON listing formats are not implemented. Validate your client workflow before using the API in production. + +::: + +## How Swift maps to RustFS + +Swift requests use `/v1/AUTH_/...` on the RustFS S3 API endpoint: + +| Swift resource | Request path | RustFS mapping | +| --- | --- | --- | +| Account | `/v1/AUTH_` | The authenticated Keystone project | +| Container | `/v1/AUTH_/` | A project-isolated RustFS bucket | +| Object | `/v1/AUTH_//` | An object in the mapped bucket | + +The project ID in the URL must match the project ID in the validated Keystone token. RustFS accepts the token in either `X-Auth-Token` or `X-Storage-Token`. + +The confirmed core operations are: + +| Scope | Operations | +| --- | --- | +| Account | List containers, update account metadata | +| Container | Create, list, inspect, update metadata, delete | +| Object | Upload, download, range download, inspect, update metadata, copy, delete | + +## Build with Swift support + +The default RustFS feature set does not include Swift. Build it explicitly from the `rustfs/rustfs` repository: + +```bash +cargo build --release --features swift +``` + +The resulting binary serves Swift paths on the configured S3 API address. There is no separate Swift listener or Swift-specific port. + +## Configure Keystone + +Enable Keystone and set its authentication endpoint before starting RustFS: + +```bash +export RUSTFS_KEYSTONE_ENABLE=true +export RUSTFS_KEYSTONE_AUTH_URL=https://keystone.example.com +export RUSTFS_KEYSTONE_VERSION=v3 +export RUSTFS_KEYSTONE_VERIFY_SSL=true +``` + +| Variable | Purpose | Default | +| --- | --- | --- | +| `RUSTFS_KEYSTONE_ENABLE` | Enables Keystone token validation. | `false` | +| `RUSTFS_KEYSTONE_AUTH_URL` | Sets the Keystone authentication endpoint. Required when Keystone is enabled. | Not set | +| `RUSTFS_KEYSTONE_VERSION` | Selects the Keystone API version. | `v3` | +| `RUSTFS_KEYSTONE_VERIFY_SSL` | Verifies the Keystone TLS certificate. | `true` | +| `RUSTFS_KEYSTONE_CACHE_SIZE` | Sets the maximum token-cache entry count. | `10000` | +| `RUSTFS_KEYSTONE_CACHE_TTL` | Sets the token-cache lifetime in seconds. | `300` | +| `RUSTFS_KEYSTONE_TIMEOUT` | Sets the Keystone request timeout in seconds. | `30` | + +We recommend keeping TLS verification enabled. RustFS returns `401 Unauthorized` when Keystone rejects a supplied token; it does not fall back to local credentials for that request. + +## Verify the API + +Obtain a scoped token and project ID from Keystone, then set these shell variables: + +```bash +export SWIFT_TOKEN='' +export SWIFT_ACCOUNT='AUTH_' +export SWIFT_URL="http://localhost:9000/v1/${SWIFT_ACCOUNT}" +``` + +List the containers visible to the project: + +```bash +curl --fail-with-body \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + "${SWIFT_URL}" +``` + +Create `my-bucket`, upload `hello.txt`, and download it: + +```bash +curl --fail-with-body --request PUT \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + "${SWIFT_URL}/my-bucket" + +curl --fail-with-body --request PUT \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + --upload-file /path/to/hello.txt \ + "${SWIFT_URL}/my-bucket/hello.txt" + +curl --fail-with-body \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + "${SWIFT_URL}/my-bucket/hello.txt" +``` + +A request to an `AUTH_` account that does not match the token project returns `403 Forbidden`. + +## Next steps + +- [Review the S3 compatibility matrix](/en/reference/s3-compatibility) +- [Manage RustFS credentials](/en/operations/credentials) +- [Configure TLS for RustFS](/en/integration/tls-configured) diff --git a/content/en/reference/meta.json b/content/en/reference/meta.json index b8a080ea..d09e7a1e 100644 --- a/content/en/reference/meta.json +++ b/content/en/reference/meta.json @@ -4,6 +4,7 @@ "defaultOpen": false, "pages": [ "environment-variables", - "cli" + "cli", + "s3-compatibility" ] } diff --git a/content/en/reference/s3-compatibility.md b/content/en/reference/s3-compatibility.md new file mode 100644 index 00000000..8939d385 --- /dev/null +++ b/content/en/reference/s3-compatibility.md @@ -0,0 +1,66 @@ +--- +title: "S3 Compatibility Matrix" +description: "Review the tested and intentionally excluded Amazon S3 behavior in the current RustFS compatibility gate." +--- + +RustFS implements a tested subset of the Amazon S3 API. This matrix summarizes the executable Ceph s3tests lists maintained in `rustfs/rustfs`; it does not claim complete coverage of every standard or vendor-specific S3 behavior. + +The snapshot below was verified against RustFS commit [`1e6f5f1e`](https://github.com/rustfs/rustfs/commit/1e6f5f1e35f188f28844a7f81361ccca4d5d0c7b) on August 9, 2026. + +## Status legend + +| Status | Meaning | +| --- | --- | +| ✅ Tested | Covered by the default or lifecycle compatibility gate | +| ❌ Planned | Standard behavior tracked as not yet implemented | +| ⊘ Excluded | Vendor-specific, intentionally unsupported, or outside the default gate | + +## Executable test lists + +| List | Cases | Role | +| --- | ---: | --- | +| [Implemented tests](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/implemented_tests.txt) | 455 | Standard cases expected to pass in the default gate | +| [Lifecycle behavior tests](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/lifecycle_behavior_tests.txt) | 5 | Expiration cases run in the dedicated lifecycle gate | +| [Unimplemented tests](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/unimplemented_tests.txt) | 17 | Standard behavior that remains planned | +| [Excluded tests](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/excluded_tests.txt) | 270 | Cases that do not block the RustFS compatibility gate | + +Counts ignore blank lines and comments. They change as tests move between lists, so use the linked files for the latest result. + +## Bucket operations + +| Capability | Status | Scope | +| --- | --- | --- | +| Create, delete, list, and inspect buckets | ✅ Tested | Common bucket lifecycle operations | +| Bucket tagging | ✅ Tested | Put, get, and delete tagging | +| Bucket policies | ✅ Tested | Put, get, and delete policies | +| Public access block | ✅ Tested | Put, get, and delete configuration | +| Selected versioning, Object Lock, CORS, and lifecycle behavior | ✅ Tested | Only the cases present in the implemented lists | +| Bucket access logging | ❌ Planned | Tracked in the unimplemented list | +| Bucket ownership controls | ❌ Planned | Tracked in the unimplemented list | +| ACL authorization | ⊘ Excluded | Intentionally unsupported product behavior | + +## Object operations + +| Capability | Status | Scope | +| --- | --- | --- | +| Put, get, copy, inspect, and delete objects | ✅ Tested | Common object operations | +| Prefix, delimiter, marker, and `max-keys` listing behavior | ✅ Tested | `ListObjects` and `ListObjectsV2` | +| Range and conditional reads | ✅ Tested | Selected HTTP range and precondition cases | +| User metadata and object tagging | ✅ Tested | Metadata and tag round trips | +| Presigned GET and PUT URLs | ✅ Tested | Selected signature and request cases | +| SSE-C and selected SSE-KMS behavior | ✅ Tested | RustFS-managed object round trips only | +| POST Object form checksum handling | ❌ Planned | Tracked in the unimplemented list | + +Encrypted object formats are not portable between RustFS and other S3 implementations. A passing encryption test means RustFS can read objects that RustFS encrypted; it does not guarantee that RustFS can read an encrypted object copied directly from another implementation. + +## Multipart operations + +| Capability | Status | Scope | +| --- | --- | --- | +| Create, upload parts, complete, and abort | ✅ Tested | Core multipart upload workflow | +| Selected multipart copy, checksum, and object-attribute behavior | ✅ Tested | Cases present in the implemented list | +| Multipart upload listing and part-lookup edge cases | ⊘ Excluded | Not part of the default compatibility gate | + +## Source of truth + +The repository [S3 compatibility matrix](https://github.com/rustfs/rustfs/blob/main/docs/architecture/s3-compatibility-matrix.md) explains the gate and its update rule. The executable files under [`scripts/s3-tests`](https://github.com/rustfs/rustfs/tree/main/scripts/s3-tests) determine the current result. When a feature changes, update the test lists and both published matrices together. diff --git a/content/fr/administration/protocols/meta.json b/content/fr/administration/protocols/meta.json index a1131ac6..5327dcf9 100644 --- a/content/fr/administration/protocols/meta.json +++ b/content/fr/administration/protocols/meta.json @@ -5,6 +5,7 @@ "webdav", "ftps", "sftp", + "swift", "[Serveur MCP](/fr/developer/mcp)" ] -} \ No newline at end of file +} diff --git a/content/fr/administration/protocols/swift.md b/content/fr/administration/protocols/swift.md new file mode 100644 index 00000000..980f4d8a --- /dev/null +++ b/content/fr/administration/protocols/swift.md @@ -0,0 +1,108 @@ +--- +title: "API OpenStack Swift" +description: "Compilez RustFS avec l’API Swift facultative et raccordez-la à l’authentification OpenStack Keystone." +--- + +RustFS peut exposer une API compatible avec OpenStack Swift sur le même point de terminaison HTTP que son API S3. Ce guide explique comment compiler la fonctionnalité facultative `swift`, configurer la validation des jetons Keystone et vérifier les opérations de base sur les comptes, les conteneurs et les objets. + +:::warning[Périmètre de compatibilité] + +La prise en charge de Swift est facultative et ne couvre pas tous les comportements d’OpenStack Swift. Les requêtes `HEAD` au niveau du compte et les formats de liste autres que JSON ne sont pas implémentés. Validez le fonctionnement de votre client avant d’utiliser cette API en production. + +::: + +## Correspondance entre Swift et RustFS + +Les requêtes Swift utilisent le chemin `/v1/AUTH_/...` sur le point de terminaison de l’API S3 de RustFS : + +| Ressource Swift | Chemin de requête | Correspondance RustFS | +| --- | --- | --- | +| Compte | `/v1/AUTH_` | Projet Keystone authentifié | +| Conteneur | `/v1/AUTH_/` | Compartiment RustFS isolé par projet | +| Objet | `/v1/AUTH_//` | Objet du compartiment correspondant | + +L’ID de projet dans l’URL doit correspondre à celui du jeton Keystone validé. RustFS accepte le jeton dans `X-Auth-Token` ou `X-Storage-Token`. + +Les opérations principales confirmées sont les suivantes : + +| Portée | Opérations | +| --- | --- | +| Compte | Répertorier les conteneurs, mettre à jour les métadonnées du compte | +| Conteneur | Créer, répertorier, inspecter, mettre à jour les métadonnées, supprimer | +| Objet | Charger, télécharger, télécharger une plage, inspecter, mettre à jour les métadonnées, copier, supprimer | + +## Compiler avec la prise en charge de Swift + +Swift ne fait pas partie des fonctionnalités RustFS activées par défaut. Compilez-la explicitement depuis le dépôt `rustfs/rustfs` : + +```bash +cargo build --release --features swift +``` + +Le binaire obtenu sert les chemins Swift sur l’adresse configurée pour l’API S3. Il n’existe ni écouteur Swift séparé ni port propre à Swift. + +## Configurer Keystone + +Activez Keystone et définissez son point de terminaison d’authentification avant de démarrer RustFS : + +```bash +export RUSTFS_KEYSTONE_ENABLE=true +export RUSTFS_KEYSTONE_AUTH_URL=https://keystone.example.com +export RUSTFS_KEYSTONE_VERSION=v3 +export RUSTFS_KEYSTONE_VERIFY_SSL=true +``` + +| Variable | Rôle | Valeur par défaut | +| --- | --- | --- | +| `RUSTFS_KEYSTONE_ENABLE` | Active la validation des jetons Keystone. | `false` | +| `RUSTFS_KEYSTONE_AUTH_URL` | Définit le point de terminaison d’authentification Keystone ; obligatoire lorsque Keystone est activé. | Non définie | +| `RUSTFS_KEYSTONE_VERSION` | Sélectionne la version de l’API Keystone. | `v3` | +| `RUSTFS_KEYSTONE_VERIFY_SSL` | Vérifie le certificat TLS de Keystone. | `true` | +| `RUSTFS_KEYSTONE_CACHE_SIZE` | Définit le nombre maximal d’entrées du cache de jetons. | `10000` | +| `RUSTFS_KEYSTONE_CACHE_TTL` | Définit la durée de vie du cache de jetons en secondes. | `300` | +| `RUSTFS_KEYSTONE_TIMEOUT` | Définit le délai d’expiration des requêtes Keystone en secondes. | `30` | + +Nous recommandons de conserver la vérification TLS. Lorsque Keystone rejette un jeton fourni, RustFS renvoie `401 Unauthorized` et n’utilise pas les informations d’identification locales pour cette requête. + +## Vérifier l’API + +Obtenez auprès de Keystone un jeton limité à un projet et l’ID de ce projet, puis définissez les variables shell suivantes : + +```bash +export SWIFT_TOKEN='' +export SWIFT_ACCOUNT='AUTH_' +export SWIFT_URL="http://localhost:9000/v1/${SWIFT_ACCOUNT}" +``` + +Répertoriez les conteneurs visibles par le projet : + +```bash +curl --fail-with-body \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + "${SWIFT_URL}" +``` + +Créez `my-bucket`, chargez `hello.txt`, puis téléchargez l’objet : + +```bash +curl --fail-with-body --request PUT \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + "${SWIFT_URL}/my-bucket" + +curl --fail-with-body --request PUT \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + --upload-file /path/to/hello.txt \ + "${SWIFT_URL}/my-bucket/hello.txt" + +curl --fail-with-body \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + "${SWIFT_URL}/my-bucket/hello.txt" +``` + +Une requête vers un compte `AUTH_` qui ne correspond pas au projet du jeton reçoit `403 Forbidden`. + +## Étapes suivantes + +- [Consulter la matrice de compatibilité S3](/fr/reference/s3-compatibility) +- [Gérer les informations d’identification RustFS](/fr/operations/credentials) +- [Configurer TLS pour RustFS](/fr/integration/tls-configured) diff --git a/content/fr/reference/meta.json b/content/fr/reference/meta.json index 647d74b4..e4d8f503 100644 --- a/content/fr/reference/meta.json +++ b/content/fr/reference/meta.json @@ -4,6 +4,7 @@ "defaultOpen": false, "pages": [ "environment-variables", - "cli" + "cli", + "s3-compatibility" ] } diff --git a/content/fr/reference/s3-compatibility.md b/content/fr/reference/s3-compatibility.md new file mode 100644 index 00000000..b3116aa5 --- /dev/null +++ b/content/fr/reference/s3-compatibility.md @@ -0,0 +1,66 @@ +--- +title: "Matrice de compatibilité S3" +description: "Consultez les comportements Amazon S3 testés et volontairement exclus du contrôle de compatibilité RustFS actuel." +--- + +RustFS implémente un sous-ensemble testé de l’API Amazon S3. Cette matrice résume les listes exécutables Ceph s3tests maintenues dans `rustfs/rustfs` ; elle ne prétend pas couvrir tous les comportements S3 standard ou propres à un fournisseur. + +L’instantané ci-dessous a été vérifié le 9 août 2026 à partir du commit RustFS [`1e6f5f1e`](https://github.com/rustfs/rustfs/commit/1e6f5f1e35f188f28844a7f81361ccca4d5d0c7b). + +## Légende des états + +| État | Signification | +| --- | --- | +| ✅ Testé | Couvert par le contrôle de compatibilité par défaut ou celui du cycle de vie | +| ❌ Planifié | Comportement standard répertorié comme non encore implémenté | +| ⊘ Exclu | Propre à un fournisseur, volontairement non pris en charge ou hors du contrôle par défaut | + +## Listes de tests exécutables + +| Liste | Cas | Rôle | +| --- | ---: | --- | +| [Tests implémentés](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/implemented_tests.txt) | 455 | Cas standard censés réussir dans le contrôle par défaut | +| [Tests du cycle de vie](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/lifecycle_behavior_tests.txt) | 5 | Cas d’expiration exécutés dans le contrôle dédié au cycle de vie | +| [Tests non implémentés](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/unimplemented_tests.txt) | 17 | Comportements standard encore planifiés | +| [Tests exclus](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/excluded_tests.txt) | 270 | Cas qui ne bloquent pas le contrôle de compatibilité RustFS | + +Le comptage ignore les lignes vides et les commentaires. Les tests changent de liste au fil des évolutions ; consultez les fichiers liés pour obtenir l’état le plus récent. + +## Opérations sur les compartiments + +| Fonctionnalité | État | Portée | +| --- | --- | --- | +| Créer, supprimer, répertorier et inspecter des compartiments | ✅ Testé | Opérations courantes du cycle de vie d’un compartiment | +| Étiquettes de compartiment | ✅ Testé | Ajouter, obtenir et supprimer des étiquettes | +| Politiques de compartiment | ✅ Testé | Ajouter, obtenir et supprimer des politiques | +| Blocage de l’accès public | ✅ Testé | Ajouter, obtenir et supprimer la configuration | +| Certains comportements de gestion des versions, de verrouillage d’objet, de CORS et de cycle de vie | ✅ Testé | Uniquement les cas présents dans les listes implémentées | +| Journalisation des accès aux compartiments | ❌ Planifié | Répertoriée dans la liste non implémentée | +| Contrôles de propriété des compartiments | ❌ Planifié | Répertoriés dans la liste non implémentée | +| Autorisation par ACL | ⊘ Exclu | Comportement volontairement non pris en charge | + +## Opérations sur les objets + +| Fonctionnalité | État | Portée | +| --- | --- | --- | +| Charger, obtenir, copier, inspecter et supprimer des objets | ✅ Testé | Opérations courantes sur les objets | +| Comportement de liste avec préfixe, délimiteur, marqueur et `max-keys` | ✅ Testé | `ListObjects` et `ListObjectsV2` | +| Lectures par plage et conditionnelles | ✅ Testé | Certains cas HTTP Range et de précondition | +| Métadonnées utilisateur et étiquettes d’objet | ✅ Testé | Aller-retour des métadonnées et des étiquettes | +| URL GET et PUT présignées | ✅ Testé | Certains cas de signature et de requête | +| SSE-C et certains comportements SSE-KMS | ✅ Testé | Uniquement les objets gérés de bout en bout par RustFS | +| Gestion des sommes de contrôle des formulaires POST Object | ❌ Planifié | Répertoriée dans la liste non implémentée | + +Les formats d’objets chiffrés ne sont pas portables entre RustFS et les autres implémentations S3. La réussite d’un test de chiffrement signifie que RustFS peut lire les objets chiffrés par RustFS ; elle ne garantit pas la lecture d’un objet chiffré copié directement depuis une autre implémentation. + +## Chargements partitionnés + +| Fonctionnalité | État | Portée | +| --- | --- | --- | +| Créer, charger des parties, terminer et abandonner | ✅ Testé | Flux principal de chargement partitionné | +| Certains comportements de copie partitionnée, de somme de contrôle et d’attributs d’objet | ✅ Testé | Cas présents dans la liste implémentée | +| Liste des chargements partitionnés et cas limites de recherche de parties | ⊘ Exclu | Hors du contrôle de compatibilité par défaut | + +## Sources de référence + +La [matrice de compatibilité S3](https://github.com/rustfs/rustfs/blob/main/docs/architecture/s3-compatibility-matrix.md) du dépôt décrit le contrôle et sa règle de mise à jour. Les fichiers exécutables sous [`scripts/s3-tests`](https://github.com/rustfs/rustfs/tree/main/scripts/s3-tests) déterminent le résultat actuel. Lorsqu’une fonctionnalité évolue, mettez à jour ensemble les listes de tests et les deux matrices publiées. diff --git a/content/ja/administration/protocols/meta.json b/content/ja/administration/protocols/meta.json index f969392b..3a47432c 100644 --- a/content/ja/administration/protocols/meta.json +++ b/content/ja/administration/protocols/meta.json @@ -5,6 +5,7 @@ "webdav", "ftps", "sftp", + "swift", "[MCP サーバー](/ja/developer/mcp)" ] -} \ No newline at end of file +} diff --git a/content/ja/administration/protocols/swift.md b/content/ja/administration/protocols/swift.md new file mode 100644 index 00000000..6a4fad8c --- /dev/null +++ b/content/ja/administration/protocols/swift.md @@ -0,0 +1,108 @@ +--- +title: "OpenStack Swift API" +description: "オプションの Swift API を有効にして RustFS をビルドし、OpenStack Keystone 認証に接続します。" +--- + +RustFS は、S3 API と同じ HTTP エンドポイントで OpenStack Swift 互換 API を提供できます。このガイドでは、オプションの `swift` 機能を有効にしたビルド、Keystone トークン検証の設定、基本的なアカウント、コンテナ、オブジェクト操作の確認方法を説明します。 + +:::warning[互換性の範囲] + +Swift サポートはオプションであり、OpenStack Swift のすべての動作を網羅していません。アカウントに対する `HEAD` リクエストと JSON 以外の一覧形式は未実装です。本番環境で使用する前に、クライアントのワークフローを検証してください。 + +::: + +## Swift と RustFS の対応関係 + +Swift リクエストは、RustFS の S3 API エンドポイント上の `/v1/AUTH_/...` パスを使用します。 + +| Swift リソース | リクエストパス | RustFS での対応 | +| --- | --- | --- | +| アカウント | `/v1/AUTH_` | 認証済み Keystone プロジェクト | +| コンテナ | `/v1/AUTH_/` | プロジェクトごとに分離された RustFS バケット | +| オブジェクト | `/v1/AUTH_//` | 対応するバケット内のオブジェクト | + +URL のプロジェクト ID は、検証済み Keystone トークンのプロジェクト ID と一致する必要があります。RustFS は `X-Auth-Token` または `X-Storage-Token` でトークンを受け取ります。 + +確認済みの主要操作は次のとおりです。 + +| 範囲 | 操作 | +| --- | --- | +| アカウント | コンテナの一覧、アカウントメタデータの更新 | +| コンテナ | 作成、一覧、確認、メタデータの更新、削除 | +| オブジェクト | アップロード、ダウンロード、範囲ダウンロード、確認、メタデータの更新、コピー、削除 | + +## Swift サポートを有効にしてビルドする + +RustFS のデフォルト機能セットには Swift が含まれません。`rustfs/rustfs` リポジトリで明示的にビルドします。 + +```bash +cargo build --release --features swift +``` + +生成されたバイナリは、設定済みの S3 API アドレスで Swift パスを提供します。Swift 専用のリスナーやポートはありません。 + +## Keystone を設定する + +RustFS を起動する前に、Keystone を有効にして認証エンドポイントを設定します。 + +```bash +export RUSTFS_KEYSTONE_ENABLE=true +export RUSTFS_KEYSTONE_AUTH_URL=https://keystone.example.com +export RUSTFS_KEYSTONE_VERSION=v3 +export RUSTFS_KEYSTONE_VERIFY_SSL=true +``` + +| 変数 | 用途 | デフォルト | +| --- | --- | --- | +| `RUSTFS_KEYSTONE_ENABLE` | Keystone トークン検証を有効にします。 | `false` | +| `RUSTFS_KEYSTONE_AUTH_URL` | Keystone 認証エンドポイントを設定します。Keystone 有効時は必須です。 | 未設定 | +| `RUSTFS_KEYSTONE_VERSION` | Keystone API バージョンを選択します。 | `v3` | +| `RUSTFS_KEYSTONE_VERIFY_SSL` | Keystone の TLS 証明書を検証します。 | `true` | +| `RUSTFS_KEYSTONE_CACHE_SIZE` | トークンキャッシュの最大エントリ数を設定します。 | `10000` | +| `RUSTFS_KEYSTONE_CACHE_TTL` | トークンキャッシュの有効期間を秒単位で設定します。 | `300` | +| `RUSTFS_KEYSTONE_TIMEOUT` | Keystone リクエストのタイムアウトを秒単位で設定します。 | `30` | + +TLS 検証は有効のままにすることを推奨します。Keystone が送信されたトークンを拒否した場合、RustFS は `401 Unauthorized` を返し、そのリクエストをローカル認証情報へフォールバックしません。 + +## API を確認する + +Keystone からスコープ付きトークンとプロジェクト ID を取得し、次のシェル変数を設定します。 + +```bash +export SWIFT_TOKEN='' +export SWIFT_ACCOUNT='AUTH_' +export SWIFT_URL="http://localhost:9000/v1/${SWIFT_ACCOUNT}" +``` + +プロジェクトから参照できるコンテナを一覧表示します。 + +```bash +curl --fail-with-body \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + "${SWIFT_URL}" +``` + +`my-bucket` を作成し、`hello.txt` をアップロードしてダウンロードします。 + +```bash +curl --fail-with-body --request PUT \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + "${SWIFT_URL}/my-bucket" + +curl --fail-with-body --request PUT \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + --upload-file /path/to/hello.txt \ + "${SWIFT_URL}/my-bucket/hello.txt" + +curl --fail-with-body \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + "${SWIFT_URL}/my-bucket/hello.txt" +``` + +トークンのプロジェクトと一致しない `AUTH_` アカウントへのリクエストには、`403 Forbidden` が返されます。 + +## 次のステップ + +- [S3 互換性マトリックスを確認する](/ja/reference/s3-compatibility) +- [RustFS の認証情報を管理する](/ja/operations/credentials) +- [RustFS の TLS を設定する](/ja/integration/tls-configured) diff --git a/content/ja/reference/meta.json b/content/ja/reference/meta.json index b4a2d77e..7ed824bb 100644 --- a/content/ja/reference/meta.json +++ b/content/ja/reference/meta.json @@ -4,6 +4,7 @@ "defaultOpen": false, "pages": [ "environment-variables", - "cli" + "cli", + "s3-compatibility" ] } diff --git a/content/ja/reference/s3-compatibility.md b/content/ja/reference/s3-compatibility.md new file mode 100644 index 00000000..4a8015ca --- /dev/null +++ b/content/ja/reference/s3-compatibility.md @@ -0,0 +1,66 @@ +--- +title: "S3 互換性マトリックス" +description: "現在の RustFS 互換性ゲートでテスト済みおよび意図的に除外されている Amazon S3 の動作を確認します。" +--- + +RustFS は、テスト済みの Amazon S3 API のサブセットを実装しています。このマトリックスは、`rustfs/rustfs` で管理される実行可能な Ceph s3tests リストをまとめたもので、標準またはベンダー固有のすべての S3 動作を網羅するものではありません。 + +以下のスナップショットは、2026 年 8 月 9 日に RustFS コミット [`1e6f5f1e`](https://github.com/rustfs/rustfs/commit/1e6f5f1e35f188f28844a7f81361ccca4d5d0c7b) に対して検証しました。 + +## ステータスの凡例 + +| ステータス | 意味 | +| --- | --- | +| ✅ テスト済み | デフォルトまたはライフサイクル互換性ゲートで検証済み | +| ❌ 予定 | 未実装として追跡されている標準動作 | +| ⊘ 除外 | ベンダー固有、意図的に未サポート、またはデフォルトゲートの対象外 | + +## 実行可能なテストリスト + +| リスト | ケース数 | 役割 | +| --- | ---: | --- | +| [実装済みテスト](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/implemented_tests.txt) | 455 | デフォルトゲートで成功が期待される標準ケース | +| [ライフサイクル動作テスト](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/lifecycle_behavior_tests.txt) | 5 | 専用のライフサイクルゲートで実行する期限切れケース | +| [未実装テスト](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/unimplemented_tests.txt) | 17 | 今後の実装対象である標準動作 | +| [除外テスト](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/excluded_tests.txt) | 270 | RustFS 互換性ゲートをブロックしないケース | + +空行とコメントは件数に含まれません。変更に伴ってテストはリスト間を移動するため、最新結果はリンク先のファイルで確認してください。 + +## バケット操作 + +| 機能 | ステータス | 範囲 | +| --- | --- | --- | +| バケットの作成、削除、一覧、確認 | ✅ テスト済み | 一般的なバケットライフサイクル操作 | +| バケットタグ | ✅ テスト済み | タグの設定、取得、削除 | +| バケットポリシー | ✅ テスト済み | ポリシーの設定、取得、削除 | +| パブリックアクセスブロック | ✅ テスト済み | 設定の追加、取得、削除 | +| 一部のバージョニング、オブジェクトロック、CORS、ライフサイクル動作 | ✅ テスト済み | 実装済みリストに含まれるケースのみ | +| バケットアクセスログ | ❌ 予定 | 未実装リストで追跡中 | +| バケット所有権コントロール | ❌ 予定 | 未実装リストで追跡中 | +| ACL 認可 | ⊘ 除外 | 意図的にサポートしない製品動作 | + +## オブジェクト操作 + +| 機能 | ステータス | 範囲 | +| --- | --- | --- | +| オブジェクトのアップロード、取得、コピー、確認、削除 | ✅ テスト済み | 一般的なオブジェクト操作 | +| プレフィックス、区切り文字、マーカー、`max-keys` の一覧動作 | ✅ テスト済み | `ListObjects` と `ListObjectsV2` | +| 範囲読み取りと条件付き読み取り | ✅ テスト済み | 一部の HTTP Range と前提条件ケース | +| ユーザーメタデータとオブジェクトタグ | ✅ テスト済み | メタデータとタグのラウンドトリップ | +| 署名付き GET および PUT URL | ✅ テスト済み | 一部の署名とリクエストケース | +| SSE-C と一部の SSE-KMS 動作 | ✅ テスト済み | RustFS が管理するオブジェクトのラウンドトリップのみ | +| POST Object フォームのチェックサム処理 | ❌ 予定 | 未実装リストで追跡中 | + +暗号化オブジェクト形式は、RustFS と他の S3 実装の間で移植できません。暗号化テストの成功は、RustFS が暗号化したオブジェクトを RustFS で読み取れることを示します。他の実装から直接コピーした暗号化オブジェクトを読み取れることは保証しません。 + +## マルチパート操作 + +| 機能 | ステータス | 範囲 | +| --- | --- | --- | +| 作成、パートのアップロード、完了、中止 | ✅ テスト済み | マルチパートアップロードの主要ワークフロー | +| 一部のマルチパートコピー、チェックサム、オブジェクト属性動作 | ✅ テスト済み | 実装済みリストに含まれるケース | +| マルチパートアップロード一覧とパート検索のエッジケース | ⊘ 除外 | デフォルト互換性ゲートの対象外 | + +## 信頼できる情報源 + +リポジトリの [S3 互換性マトリックス](https://github.com/rustfs/rustfs/blob/main/docs/architecture/s3-compatibility-matrix.md) には、ゲートと更新ルールが記載されています。[`scripts/s3-tests`](https://github.com/rustfs/rustfs/tree/main/scripts/s3-tests) 配下の実行可能ファイルが現在の結果を決定します。機能を変更した場合は、テストリストと 2 つの公開マトリックスを同時に更新してください。 diff --git a/content/zh/administration/protocols/meta.json b/content/zh/administration/protocols/meta.json index 3421bf54..d1d89ea3 100644 --- a/content/zh/administration/protocols/meta.json +++ b/content/zh/administration/protocols/meta.json @@ -5,6 +5,7 @@ "webdav", "ftps", "sftp", + "swift", "[MCP 服务器](/zh/developer/mcp)" ] -} \ No newline at end of file +} diff --git a/content/zh/administration/protocols/swift.md b/content/zh/administration/protocols/swift.md new file mode 100644 index 00000000..3b6d93f9 --- /dev/null +++ b/content/zh/administration/protocols/swift.md @@ -0,0 +1,108 @@ +--- +title: "OpenStack Swift API" +description: "构建包含可选 Swift API 的 RustFS,并接入 OpenStack Keystone 身份验证。" +--- + +RustFS 可以在 S3 API 的同一 HTTP 端点上提供兼容 OpenStack Swift 的 API。本指南介绍如何构建可选的 `swift` 功能、配置 Keystone 令牌验证,并验证基本的账户、容器和对象操作。 + +:::warning[兼容范围] + +Swift 支持是可选功能,尚未覆盖 OpenStack Swift 的全部行为。目前不支持账户 `HEAD` 请求和非 JSON 格式的列表响应。用于生产环境前,请先验证你的客户端工作流。 + +::: + +## Swift 如何映射到 RustFS + +Swift 请求通过 RustFS S3 API 端点上的 `/v1/AUTH_/...` 路径访问: + +| Swift 资源 | 请求路径 | RustFS 映射 | +| --- | --- | --- | +| 账户 | `/v1/AUTH_` | 已通过身份验证的 Keystone 项目 | +| 容器 | `/v1/AUTH_/` | 按项目隔离的 RustFS 存储桶 | +| 对象 | `/v1/AUTH_//` | 映射存储桶中的对象 | + +URL 中的项目 ID 必须与已验证 Keystone 令牌中的项目 ID 一致。RustFS 接受通过 `X-Auth-Token` 或 `X-Storage-Token` 传入的令牌。 + +已确认的核心操作包括: + +| 范围 | 操作 | +| --- | --- | +| 账户 | 列出容器、更新账户元数据 | +| 容器 | 创建、列出、查看、更新元数据、删除 | +| 对象 | 上传、下载、范围下载、查看、更新元数据、复制、删除 | + +## 构建 Swift 支持 + +RustFS 默认功能集不包含 Swift。请在 `rustfs/rustfs` 仓库中显式构建该功能: + +```bash +cargo build --release --features swift +``` + +生成的二进制会在已配置的 S3 API 地址上提供 Swift 路径,不会启动单独的 Swift 监听器或使用 Swift 专属端口。 + +## 配置 Keystone + +启动 RustFS 前,启用 Keystone 并设置其身份验证端点: + +```bash +export RUSTFS_KEYSTONE_ENABLE=true +export RUSTFS_KEYSTONE_AUTH_URL=https://keystone.example.com +export RUSTFS_KEYSTONE_VERSION=v3 +export RUSTFS_KEYSTONE_VERIFY_SSL=true +``` + +| 变量 | 用途 | 默认值 | +| --- | --- | --- | +| `RUSTFS_KEYSTONE_ENABLE` | 启用 Keystone 令牌验证。 | `false` | +| `RUSTFS_KEYSTONE_AUTH_URL` | 设置 Keystone 身份验证端点;启用 Keystone 时必填。 | 未设置 | +| `RUSTFS_KEYSTONE_VERSION` | 选择 Keystone API 版本。 | `v3` | +| `RUSTFS_KEYSTONE_VERIFY_SSL` | 验证 Keystone TLS 证书。 | `true` | +| `RUSTFS_KEYSTONE_CACHE_SIZE` | 设置令牌缓存的最大条目数。 | `10000` | +| `RUSTFS_KEYSTONE_CACHE_TTL` | 设置令牌缓存的有效期,单位为秒。 | `300` | +| `RUSTFS_KEYSTONE_TIMEOUT` | 设置 Keystone 请求超时时间,单位为秒。 | `30` | + +建议保持 TLS 验证开启。Keystone 拒绝传入的令牌时,RustFS 会返回 `401 Unauthorized`,不会对该请求回退到本地凭证。 + +## 验证 API + +从 Keystone 获取限定范围的令牌和项目 ID,然后设置以下 shell 变量: + +```bash +export SWIFT_TOKEN='' +export SWIFT_ACCOUNT='AUTH_' +export SWIFT_URL="http://localhost:9000/v1/${SWIFT_ACCOUNT}" +``` + +列出该项目可见的容器: + +```bash +curl --fail-with-body \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + "${SWIFT_URL}" +``` + +创建 `my-bucket`、上传 `hello.txt`,然后下载该对象: + +```bash +curl --fail-with-body --request PUT \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + "${SWIFT_URL}/my-bucket" + +curl --fail-with-body --request PUT \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + --upload-file /path/to/hello.txt \ + "${SWIFT_URL}/my-bucket/hello.txt" + +curl --fail-with-body \ + --header "X-Auth-Token: ${SWIFT_TOKEN}" \ + "${SWIFT_URL}/my-bucket/hello.txt" +``` + +如果请求中的 `AUTH_` 账户与令牌项目不一致,RustFS 会返回 `403 Forbidden`。 + +## 后续步骤 + +- [查看 S3 兼容性矩阵](/zh/reference/s3-compatibility) +- [管理 RustFS 凭证](/zh/operations/credentials) +- [为 RustFS 配置 TLS](/zh/integration/tls-configured) diff --git a/content/zh/reference/meta.json b/content/zh/reference/meta.json index 11f58981..e4d9b1c8 100644 --- a/content/zh/reference/meta.json +++ b/content/zh/reference/meta.json @@ -4,6 +4,7 @@ "defaultOpen": false, "pages": [ "environment-variables", - "cli" + "cli", + "s3-compatibility" ] } diff --git a/content/zh/reference/s3-compatibility.md b/content/zh/reference/s3-compatibility.md new file mode 100644 index 00000000..a80e060d --- /dev/null +++ b/content/zh/reference/s3-compatibility.md @@ -0,0 +1,66 @@ +--- +title: "S3 兼容性矩阵" +description: "查看当前 RustFS 兼容性门禁已测试和明确排除的 Amazon S3 行为。" +--- + +RustFS 实现了经过测试的 Amazon S3 API 子集。本矩阵汇总 `rustfs/rustfs` 中维护的可执行 Ceph s3tests 清单,不表示覆盖所有标准或厂商特定的 S3 行为。 + +以下快照已于 2026 年 8 月 9 日基于 RustFS 提交 [`1e6f5f1e`](https://github.com/rustfs/rustfs/commit/1e6f5f1e35f188f28844a7f81361ccca4d5d0c7b) 核验。 + +## 状态说明 + +| 状态 | 含义 | +| --- | --- | +| ✅ 已测试 | 已纳入默认兼容性门禁或生命周期兼容性门禁 | +| ❌ 计划支持 | 标准行为,已登记为尚未实现 | +| ⊘ 已排除 | 厂商特定、明确不支持或不属于默认门禁的行为 | + +## 可执行测试清单 + +| 清单 | 用例数 | 作用 | +| --- | ---: | --- | +| [已实现测试](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/implemented_tests.txt) | 455 | 默认门禁中预期通过的标准用例 | +| [生命周期行为测试](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/lifecycle_behavior_tests.txt) | 5 | 在专用生命周期门禁中运行的过期用例 | +| [未实现测试](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/unimplemented_tests.txt) | 17 | 仍在计划中的标准行为 | +| [已排除测试](https://github.com/rustfs/rustfs/blob/main/scripts/s3-tests/excluded_tests.txt) | 270 | 不阻塞 RustFS 兼容性门禁的用例 | + +统计忽略空行和注释。测试会在各清单之间移动,请以链接中的文件作为最新结果。 + +## 存储桶操作 + +| 能力 | 状态 | 范围 | +| --- | --- | --- | +| 创建、删除、列出和查看存储桶 | ✅ 已测试 | 常用存储桶生命周期操作 | +| 存储桶标签 | ✅ 已测试 | 添加、获取和删除标签 | +| 存储桶策略 | ✅ 已测试 | 添加、获取和删除策略 | +| 阻止公共访问 | ✅ 已测试 | 添加、获取和删除配置 | +| 部分版本控制、对象锁定、CORS 和生命周期行为 | ✅ 已测试 | 仅覆盖已实现清单中的用例 | +| 存储桶访问日志 | ❌ 计划支持 | 已登记在未实现清单中 | +| 存储桶所有权控制 | ❌ 计划支持 | 已登记在未实现清单中 | +| ACL 授权 | ⊘ 已排除 | 产品明确不支持的行为 | + +## 对象操作 + +| 能力 | 状态 | 范围 | +| --- | --- | --- | +| 上传、获取、复制、查看和删除对象 | ✅ 已测试 | 常用对象操作 | +| 前缀、分隔符、标记和 `max-keys` 列表行为 | ✅ 已测试 | `ListObjects` 和 `ListObjectsV2` | +| 范围读取和条件读取 | ✅ 已测试 | 部分 HTTP Range 和前置条件用例 | +| 用户元数据和对象标签 | ✅ 已测试 | 元数据和标签往返验证 | +| 预签名 GET 和 PUT URL | ✅ 已测试 | 部分签名和请求用例 | +| SSE-C 和部分 SSE-KMS 行为 | ✅ 已测试 | 仅验证由 RustFS 管理的对象往返 | +| POST Object 表单校验和处理 | ❌ 计划支持 | 已登记在未实现清单中 | + +加密对象格式不能在 RustFS 与其他 S3 实现之间直接移植。加密测试通过表示 RustFS 能读取由 RustFS 加密的对象,不保证 RustFS 能读取从其他实现直接复制来的加密对象。 + +## 分片上传操作 + +| 能力 | 状态 | 范围 | +| --- | --- | --- | +| 创建、上传分片、完成和中止 | ✅ 已测试 | 核心分片上传工作流 | +| 部分分片复制、校验和及对象属性行为 | ✅ 已测试 | 已实现清单中的用例 | +| 分片上传列表和分片查询边界行为 | ⊘ 已排除 | 不属于默认兼容性门禁 | + +## 事实来源 + +仓库中的 [S3 兼容性矩阵](https://github.com/rustfs/rustfs/blob/main/docs/architecture/s3-compatibility-matrix.md) 说明门禁及其更新规则。[`scripts/s3-tests`](https://github.com/rustfs/rustfs/tree/main/scripts/s3-tests) 下的可执行文件决定当前结果。功能发生变化时,应同步更新测试清单和两处公开矩阵。