summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/ObjectStore
Commit message (Collapse)AuthorAgeFilesLines
* don't set `null` as a bundle pathRobin Appelman2022-07-271-3/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* only use nextcloud bundle when explicitly enabledRobin Appelman2022-07-182-10/+15
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* also use nextcloud certificate bundle when downloading from s3Robin Appelman2022-07-182-10/+17
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Cleanup temporary files after finishing the write to object storageJulius Härtl2022-06-021-0/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add a metadata service to store file metadataCarl Schwan2022-04-131-1/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Adapt more code to migration to LoggerInterfaceCôme Chilliet2022-03-241-1/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Migrate from ILogger to LoggerInterface in lib/privateCôme Chilliet2022-03-241-5/+5
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* don't try to get custom certs for s3 primary storageRobin Appelman2022-03-152-3/+10
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* use the nextcloud certificate bundle for s3Robin Appelman2022-03-141-1/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Wrap S3 multipart upload exceptionLouis Chemineau2022-02-161-1/+1
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Wrap S3 multipart upload exceptionLouis Chemineau2022-02-151-1/+1
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Make max size for single put uploads configurableJulius Härtl2021-12-292-2/+6
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix php-cs for S3ConnectionTrait.phpJulius Härtl2021-12-211-1/+0
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Merge pull request #27493 from cuppett/cuppett/simplify-aws-credential-providerJulius Härtl2021-12-211-6/+2
|\
| * Simplify S3ConnectionTrait to defaultProvider plus optionStephen Cuppett2021-11-221-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we initially added the EC2 and ECS IAM role support in #24700, we had to use a workaround by explicitly ordering the various providers due to an inconsistency in the AWS SDK for PHP. We submitted a PR there to get that squared away. Now, we've consumed that version upstream for the SDK and can update our code here to be the most concise version as well as position ourselves to pick up new methods as those become available and prevalent in AWS (for acquiring credentials). See also: https://github.com/nextcloud/server/pull/24700#issuecomment-747650892 See also: https://github.com/aws/aws-sdk-php/pull/2172 Signed-off-by: Stephen Cuppett <steve@cuppett.com>
* | Fix Guzzle function callsCôme Chilliet2021-11-232-5/+5
|/ | | | | | | Since 1.7.0 and 2.0 these functions are turned into static methods. See https://github.com/guzzle/psr7#upgrading-from-function-api Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Implement multibucket shift for ObjectStoreJohn Molakvoæ2021-11-111-2/+15
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Merge pull request #29115 from ↵Carl Schwan2021-10-281-0/+8
|\ | | | | | | | | nextcloud/work/carl/correct-permissions-when-copying Fix permissions when copying from ObjectStorage
| * Fix permissions when copying from ObjectStorageCarl Schwan2021-10-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that when a user copy a file from a directory they don't have all permissions to a directory where they have more permissions, the permissions are correctly set to the one from the parent taget folder. This was caused by the ObjectStoreStorage::copyFromStorage using the jailed storage and cache entry instead of the unjailed one like other storages (the local one). Steps to reproduce + Use object storage + Create a groupfolder with one group having full permission and another one who can just read files. + With an user who is in the second group, copy a file from the groupfolder to the home folder of this user. + The file in the home folder of the user will be read only and can't be deleted even though it is in their home folder and they are the owner. In oc_filecache, the permissions stored for this file are 1 (READ) Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | s3 external storage listing reworkRobin Appelman2021-10-151-1/+1
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Refactor writeObject to only use MultipartUpload when requiredBernd Rederlechner2021-08-202-20/+61
| | | | | | Signed-off-by: Bernd Rederlechner <Bernd.Rederlechner@t-systems.com> Co-authored-by: Julius Härtl <jus@bitgrid.net>
* Merge pull request #26463 from Worteks/fix-s3proxyJulius Härtl2021-07-142-2/+15
|\
| * fix(proxy): use accessorMaxime Besson2021-06-301-2/+2
| | | | | | | | Signed-off-by: Maxime Besson <maxime.besson@worteks.com>
| * fix(proxy): reaching s3 storage behind some http proxyMaxime Besson2021-04-091-4/+4
| | | | | | | | Signed-off-by: Maxime Besson <maxime.besson@worteks.com>
| * fix(proxy): reaching s3 storage behind some http proxySamuel2021-04-092-2/+15
| | | | | | | | Signed-off-by: Maxime Besson <maxime.besson@worteks.com>
* | Merge pull request #27586 from nextcloud/bugfi/noid/objectstore-checksumblizzz2021-07-011-0/+1
|\ \ | | | | | | Reset checksum when writing files to object store
| * | Reset checksum when writing files to object storeJulius Härtl2021-06-211-0/+1
| | | | | | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | | Move DateTime::RFC2822 to DateTimeInterface::2822Christoph Wurst2021-06-231-1/+1
|/ / | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Update php licensesJohn Molakvoæ (skjnldsv)2021-06-0414-23/+11
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Merge pull request #27040 from nextcloud/FlorentCoppint-masterMorris Jobke2021-05-251-0/+1
|\ \ | | | | | | Avoid reading ~/.aws/config when using S3 provider
| * | Avoid reading ~/.aws/config when using S3 providerFlorent2021-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | | When using S3 storage, we sometimes have open_basedir errors due to aws-sdk-php trying to read ~/.aws/config which is out of open_basedir restrictions. Christoph Wurst already added csm=false config in #21406 but it wasn't enough, we also need to set use_arn_region=false, added in this commit. Signed-off-by: Florent <florent@coppint.com>
* | | explicitly close source stream on object store upload even if count wrapper ↵Robin Appelman2021-04-291-0/+3
|/ / | | | | | | | | | | isn't needed Signed-off-by: Robin Appelman <robin@icewind.nl>
* | set mimetype for objects uploaded to object storagesRobin Appelman2021-04-215-23/+18
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | use returned file id for object store copyRobin Appelman2021-03-121-6/+6
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #25722 from nextcloud/objectstore-copy-crossRobin Appelman2021-03-121-0/+14
|\ | | | | apply object store copy optimization when 'cross storage' copy is wit…
| * apply object store copy optimization when 'cross storage' copy is within the ↵Robin Appelman2021-03-091-0/+14
| | | | | | | | | | | | same object store Signed-off-by: Robin Appelman <robin@icewind.nl>
* | remove explicit fclose from S3->writeStreamRobin Appelman2021-03-111-2/+0
|/ | | | | | streams get closed automatically when dropped, and in some cases the stream seems to be already closed by the S3 library, in which case trying to close it again will raise an error Signed-off-by: Robin Appelman <robin@icewind.nl>
* Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-181-1/+1
| | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #24700 from Imajie/s3-credsRoeland Jago Douma2021-02-021-1/+5
|\ | | | | Resolves #24699, Support ES2 and ECS instance providers for S3 buckets
| * Fix failing testsJames Letendre2020-12-151-1/+1
| | | | | | | | Signed-off-by: James Letendre <james.letendre@gmail.com>
| * Add web identity provider to S3 connection chainJames Letendre2020-12-151-13/+4
| | | | | | | | Signed-off-by: James Letendre <james.letendre@gmail.com>
| * Replace defaultProvider with explicit calls to exclude user home directory ↵James Letendre2020-12-141-1/+15
| | | | | | | | | | | | lookup Signed-off-by: James Letendre <james.letendre@gmail.com>
| * Resolves #24699, Support ES2 and ECS instance providers for S3 bucketsJames Letendre2020-12-141-2/+1
| | | | | | | | Signed-off-by: James Letendre <james.letendre@gmail.com>
* | Update license headersChristoph Wurst2020-12-301-0/+1
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Bump icewind/streams from 0.7.1 to 0.7.2Christoph Wurst2020-12-291-3/+4
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Merge pull request #24594 from kofemann/dcacheJulius Härtl2020-12-221-2/+2
|\ \
| * | storage: update IStorage#file_put_contents docs to match usageTigran Mkrtchyan2020-12-211-2/+2
| |/ | | | | | | | | | | | | The current phpdoc of IStorage#file_put_contents doesnt corresponds to it's actual usage in code, e.g. Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
* / Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-0/+1
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* use in objectstore copyRobin Appelman2020-11-245-5/+83
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Allow config to specify the bucket existsRoeland Jago Douma2020-11-061-1/+2
| | | | | | | | | | | | | | | In the 99% case the bucket is just always there. And if it is not the read/write will fail hard anyways. Esp on big instances the Objectstore is not always fast and this can save a few hundered ms of each request that acess the objectstore. In short it is adding 'verify_bucket_exists' => false To the S3 config part Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>