Commit graph

423 commits

Author SHA1 Message Date
Kent Delante
6ce657f2ee fix(s3): ignore prefixes with repeating delimiters
Signed-off-by: Kent Delante <kent@delante.me>

Amazon's hosted S3 service allows repeating delimiters in keys
(e.g. 'path/to//file.txt' or 'path/to///file.txt') and we get
repeating directories in the filecache as a result (based on the
previous examples we get 'path/to/to/file.txt' or
'path/to/to/to/file.txt'). This ignores it and its contents for S3 external storage.
2026-04-22 16:07:45 +08:00
Stephen Cuppett
cdaeed02b6 feat(objectstore): Add AWS SSE-KMS encryption support for S3 storage
Add support for Server-Side Encryption with AWS Key Management Service
(SSE-KMS) for S3 object storage. This allows Nextcloud to encrypt data
at rest in S3 using AWS-managed keys.

Key features:
- New config options: sse_kms_enabled and sse_kms_key_id
- Backward compatible with existing SSE-C (customer-provided keys)
- SSE-C takes precedence when both SSE-C and SSE-KMS are configured

Implementation details:
- Added getServerSideEncryptionParameters() method to centralize
  encryption parameter logic for both SSE-C and SSE-KMS
- Updated multipart uploads to use unified encryption parameters
- Added comprehensive PHPUnit tests for SSE-KMS scenarios
- Tested with AWS bucket and KMS keys in us-east-1 region

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Stephen Cuppett <steve@cuppett.com>
2026-04-16 13:21:53 -04:00
Robin Appelman
e96a89e630 feat: add permissions mask variant that only masks one directory
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-09 16:19:10 +02:00
Hendrik Leidinger
6e88edb0a6
fix: make psalm and rector happy
Signed-off-by: Hendrik Leidinger <hendrik.leidinger@nextcloud.com>
2026-03-31 12:35:09 +02:00
Hendrik Leidinger
33e35afad2
fix: modified touch function of the SFTP storage to update mtimes instead
Signed-off-by: Hendrik Leidinger <hendrik.leidinger@nextcloud.com>
2026-03-31 12:35:08 +02:00
Hendrik Leidinger
6d26c71b48
fix: manually set modified time to SFTP files after editing
Signed-off-by: Hendrik Leidinger <hendrik.leidinger@nextcloud.com>
2026-03-31 12:35:08 +02:00
Josh
b7bdd76731
feat(files_external/s3): rename legacy signature (v2) for clarity
Avoid the use of "authentication" here since this is really about signing compatibility, not the source of credentials. Also prefix with "Use" for UI consistency.

Signed-off-by: Josh <josh.t.richards@gmail.com>
2026-03-25 16:21:35 -04:00
Josh
00100427be
feat(files_external/s3): Adjust auth meth/parameter field names
Signed-off-by: Josh <josh.t.richards@gmail.com>
2026-03-25 16:10:35 -04:00
Josh
958e67687b
fix(s3): Fix 0 folder handling in External Storage
Signed-off-by: Josh <josh.t.richards@gmail.com>
2026-03-02 13:44:19 +01:00
Côme Chilliet
e7c4dbf2cb
Merge pull request #58642 from nextcloud/jtr/perf-s3-external-cache-sizing
perf(files_external): Increase S3 cache caps
2026-03-02 13:36:01 +01:00
Josh
bde043d13b
chore(files_external/s3): drop no-op $this->filesCache use sites
Signed-off-by: Josh <josh.t.richards@gmail.com>
2026-03-01 12:53:57 -05:00
Josh
08b465d219
refactor(files_external/S3): drop unused methods
getContentLength() and getLastModified() are dead code. Originally added in PR #11518 and made defunct in PR #29220.

Signed-off-by: Josh <josh.t.richards@gmail.com>
2026-03-01 12:45:01 -05:00
Josh
430975ce96
perf(files_external): Increase S3 metadata cache caps
Signed-off-by: Josh <josh.t.richards@gmail.com>
2026-02-28 09:08:00 -05:00
Ferdinand Thiessen
694e2312fd
Merge pull request #58589 from nextcloud/fix/external-missing
fix(files_external): boolean comparison of array
2026-02-27 15:40:14 +01:00
Kent Delante
8d1cb50048 fix: pass only object key to deleteObjects call
Some S3-compatible object storage hosts don't like the ETag being included in
the request and return a MalformedXML response. In the AWS API documentation,
only the object key is required so just pass that in.

Signed-off-by: Kent Delante <kent.delante@proton.me>
2026-02-27 10:54:23 +08:00
Ferdinand Thiessen
d50fbfe37d
fix(files_external): boolean comparison of array
To check if there are no missing required dependencies we need to check
if the required dependencies are **empty** because `!array` is still
true.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-02-26 14:21:50 +01:00
Jan-Philipp Litza
0f4d6b8027 fix(files_external): ignore unsatisfied optional dependencies
Signed-off-by: Jan-Philipp Litza <janphilipp@litza.de>
2026-02-17 18:03:56 +01:00
Git'Fellow
b1e71ae646 fix(sftp): Handle empty port parameter to allow host-defined ports
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2026-02-14 12:29:38 +01:00
provokateurin
f12cecb684
feat(rector): Enable SafeDeclareStrictTypesRector
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-02-09 10:59:31 +01:00
Carl Schwan
3979c493f9
refactor: Apply second batch of comments
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2026-02-06 13:52:51 +01:00
pac0san
e48f871bd0
fix(files_external): Respect explicit port configuration
It allows the use of the alternative SFTP port defined in the GUI (external storage), instead of the default port (22).

Signed-off-by: pac0san <7056343+pac0san@users.noreply.github.com>
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-02-02 11:27:42 +01:00
Carl Schwan
916ce3f8ec
feat(external-storage): Implement IPartialMountPoint
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-28 17:09:22 +01:00
Robin Appelman
9fde2523e6
Merge pull request #57493 from nextcloud/smb-invalid-arg-unavailable
fix: handle InvalidArumentException as availability failure in smb->getFileInfo
2026-01-14 12:00:03 +01:00
Robin Appelman
ae74dbef2b
Merge pull request #56499 from nextcloud/authoritative-mount-provider-files_external
Add api for authoritative mount providers and implement it for files_external
2026-01-13 16:36:33 +01:00
Ferdinand Thiessen
0e22ae1efe refactor(files_external): migrate public key auth to Vue 3
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-01-13 01:30:37 +00:00
Ferdinand Thiessen
545c72becb chore: remove non working and legacy OAuth2 auth schema
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-01-13 01:30:37 +00:00
Robin Appelman
4dcd4223de fix: make smb auth failure on forbidden exception more reliable
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-01-12 15:23:57 +01:00
Robin Appelman
43727cb72c fix: handle InvalidArumentException as availability failure in smb->getFileInfo
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-01-12 15:23:57 +01:00
Robin Appelman
272d6141ca
fix: improve handling updated storages
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-01-09 17:53:55 +01:00
Robin Appelman
9dffca2f07
fix: improve handling of unavailable storages
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-01-09 17:53:52 +01:00
Robin Appelman
5565cdb390
feat: make external storage mount provider authoritative
Signed-off-by: Robin Appelman <robin@icewind.nl>

# Conflicts:
#	apps/files_external/lib/AppInfo/Application.php
2026-01-09 17:53:50 +01:00
Carl Schwan
98192fc17c
feat(external-s3): Expose config option to enable direct s3 preview
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-02 17:13:43 +01:00
Carl Schwan
2ea1bd4cdc
feat(movie-preview): Use getDirectDownloadById for generating preview
Allow to speed-up considerably the creation of previews for movies
stored on S3.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-02 17:13:41 +01:00
invario
ffe91b48dc
feat(previews): allow ffmpeg to connect direct for AWS S3 buckets
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: invario <67800603+invario@users.noreply.github.com>
2026-01-02 10:48:39 +01:00
Edward Ly
1490ea95cb
Merge pull request #56781 from nextcloud/fix/s3-name
fix(s3): rename 'Amazon S3' to 'S3 Storage'
2025-12-02 09:20:34 -08:00
Edward Ly
09f774a61f fix(s3): rename 'Amazon S3' to 'S3 Storage'
The current name may be confusing to users who take advantage of other S3-compatible storage solutions not offered by Amazon, so a more generic name is preferred here.

Signed-off-by: Edward Ly <contact@edward.ly>
2025-12-02 08:33:06 -08:00
Côme Chilliet
69b85fab32 fix(files_external): Properly register event listeners in register method
This is the clean solution, LoginCredentials was the only auth class
 actually registering stuff in constructor.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-11-25 15:08:35 +01:00
Kent Delante
b57db10814 fix: pass only necessary information when deleting mulitple objects
DeleteObjects currently fails when the request includes all the
information returned by ListObjects. Send only the necessary
information in the request. Note: 'Size' and 'DateModified' is now
only supported by directory buckets.

Signed-off-by: Kent Delante <kent.delante@proton.me>
2025-11-18 12:07:53 +08:00
Ferdinand Thiessen
660f3f6fd1
refactor: use logical && || instead of weak and or operators
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-09-27 23:02:18 +02:00
Josh
af53e9ca06
chore(files_external): Remove oauth1 constant
Signed-off-by: Josh <josh.t.richards@gmail.com>
2025-08-07 22:25:51 -04:00
Josh
57c62e1ca1
refactor(files_external): Drop OAuth1.php
Signed-off-by: Josh <josh.t.richards@gmail.com>
2025-08-07 21:54:33 -04:00
Robin Appelman
6f0120af16
fix: handle smb timeouts as storage not available
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-08-05 17:39:12 +02:00
Arthur Schiwon
80f891eee0
style(PHP): code cleanup, no effective changes
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2025-07-10 23:21:16 +02:00
Arthur Schiwon
fd799afc17
fix(Krb): switch away from deprecated and broken KerberosApacheAuth()
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2025-07-10 23:21:16 +02:00
Ferdinand Thiessen
5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +02:00
Robin Appelman
4242520d64
feat: improve logging of fopen failures for smb
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-06-10 15:14:04 +02:00
Robin Appelman
f97495bf5a feat: add command to check files_external dependencies
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-13 09:46:19 +02:00
Git'Fellow
2d68644e11 fix(files_external): Safely check if the timestamp is numeric
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2025-05-08 11:46:52 +02:00
provokateurin
db5f6a4e96
fix(files_external): Mark password fields for LoginCredentials and SessionCredentials as hidden and optional
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-05 13:19:48 +02:00
provokateurin
01d2a9f76a
fix(files_external): Convert VALUE_HIDDEN to FLAG_HIDDEN to allow combining VALUE_PASSWORD and FLAG_HIDDEN
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-05 13:19:43 +02:00