openvibers/openvibe.zone Commits

Zone docs: CopyObject and UploadPartCopy are supported (Media#113); the not-supported list is what is left (#10)

OP OpenVibers committed 29 days ago · 12fd615abf · 2 files, +5 −1

The S3 guide said "Not yet supported: CopyObject, UploadPartCopy, ACLs, policies and versioning", but Media has answered CopyObject and UploadPartCopy since Media#113. A site-wide scan for unfinished wording found it.

- **Server-side copies:** CopyObject and UploadPartCopy work within a zone, or from another zone of the same environment that the key may read. So `aws s3 cp s3://a/x s3://b/x` and rclone's server-side moves never download the bytes.
- **Not supported:** ACLs and bucket policies (zones are private; access is the key's), versioning (a zone keeps the current object), and deleting a zone over S3.

`test/zone-api.test.js` checks that `/docs` lists the copies and has no "Not yet supported" list.

Changes

ddiff --git a/server/http/pages.js b/server/http/pages.js
iindex e31023f..1c8a9c2 100644
---- a/server/http/pages.js
++++ b/server/http/pages.js
@@@ -280,7 +280,8 @@ ${keysSection}
<li>presigned GET and PUT URLs, valid for 7 days at most.</li>
</ul></li>
<li><strong>Multipart uploads:</strong> CreateMultipartUpload, UploadPart, CompleteMultipartUpload, AbortMultipartUpload, ListParts and ListMultipartUploads, with S3's rules (every part but the last at least 5 MiB). An unfinished upload expires after a day.</li>
--<li><strong>Not yet supported:</strong> CopyObject, UploadPartCopy, ACLs, policies and versioning.</li>
++<li><strong>Server-side copies:</strong> CopyObject and UploadPartCopy, within a zone or from another zone of the same environment the key may read, so <code>aws s3 cp s3://a/x s3://b/x</code> and rclone's server-side moves never download the bytes.</li>
++<li><strong>Not supported:</strong> ACLs and bucket policies (zones are private; access is the key's), versioning (a zone keeps the current object), and deleting a zone over S3 (do that here).</li>
<li><strong>Size:</strong> one request carries at most 100 MB through this endpoint, so larger files go up in parts (the AWS CLI, the SDKs and rclone do this by default); an object is at most 20 GB.</li>
<li><strong>Privacy:</strong> zones are private. Every request is signed. A presigned URL reaches only its own key, until it expires or its key is revoked.</li>
</ul>
ddiff --git a/test/zone-api.test.js b/test/zone-api.test.js
iindex f1e0aa9..a12b016 100644
---- a/test/zone-api.test.js
++++ b/test/zone-api.test.js
@@@ -269,6 +269,9 @@ function fakeMedia(network) {
assert.ok(r.status === 200 && r.text.includes('s3.openvibe.media') && r.text.includes('Private storage zones'));
r = await t.get('/docs');
assert.ok(r.status === 200 && r.text.includes('zone.zone.create'));
++ // The S3 list matches Media's surface: copies are supported (Media#113); ACLs, policies and versioning are not.
++ assert.ok(r.text.includes('<strong>Server-side copies:</strong> CopyObject and UploadPartCopy'), 'copies are listed as supported');
++ assert.ok(!r.text.includes('Not yet supported'), 'no stale not-yet list');
});
let failed = 0;