+ describe('With private files proxy disabled and public ACL for private files', function () {
+ let videoUUID: string
+
+ before(async function () {
+ this.timeout(240000)
+
+ await server.kill()
+
+ const config = ObjectStorageCommand.getDefaultScalewayConfig({
+ serverNumber: server.internalServerNumber,
+ enablePrivateProxy: false,
+ privateACL: 'public-read'
+ })
+ await server.run(config)
+
+ const { uuid } = await server.videos.quickUpload({ name: 'video', privacy: VideoPrivacy.PRIVATE })
+ videoUUID = uuid
+
+ await waitJobs([ server ])
+ })
+
+ it('Should display object storage path for a private video and be able to access them', async function () {
+ this.timeout(60000)
+
+ await checkPublicVODFiles(videoUUID)
+ })
+
+ it('Should not be able to access object storage proxy', async function () {
+ const privateVideo = await server.videos.getWithToken({ id: videoUUID })
+ const webtorrentFilename = extractFilenameFromUrl(privateVideo.files[0].fileUrl)
+ const hlsFilename = extractFilenameFromUrl(getHLS(privateVideo).files[0].fileUrl)
+
+ await makeRawRequest({
+ url: server.url + '/object-storage-proxy/webseed/private/' + webtorrentFilename,
+ token: server.accessToken,
+ expectedStatus: HttpStatusCode.BAD_REQUEST_400
+ })
+
+ await makeRawRequest({
+ url: server.url + '/object-storage-proxy/streaming-playlists/hls/private/' + videoUUID + '/' + hlsFilename,
+ token: server.accessToken,
+ expectedStatus: HttpStatusCode.BAD_REQUEST_400
+ })
+ })
+ })
+