Commit Graph

3057 Commits

Author SHA1 Message Date
Alex Auvolat 34c1237d2b doc: update s3 compatibility matrix 2026-11-25 09:51:27 +01:00
Alex Auvolat c8cae1ce13 s3: add tests for tagging xml 2026-11-25 09:51:27 +01:00
Alex Auvolat 23ad16cbf5 s3 api: proper result to Get*Tagging when no tags 2026-11-25 09:51:27 +01:00
Alex Auvolat 1c3e60d915 s3: add tests for tagging api 2026-11-25 09:51:27 +01:00
Alex Auvolat 04f3adbaa5 s3: implement tagging in createmultipartupload/completemultipartupload 2026-11-25 09:51:27 +01:00
Alex Auvolat ed9605e5eb s3 api: implement tagging for put/post/copyobject 2026-11-25 09:51:27 +01:00
Alex Auvolat fa091f6899 s3: implement x-amz-tagging-count for get/headobject 2026-11-25 09:51:27 +01:00
Alex Auvolat 5089e80ebe s3: refactor get/headobject code 2026-11-25 09:51:27 +01:00
Alex Auvolat bb4edcd366 s3 api: implement get/put/deleteobjecttagging 2026-11-25 09:51:27 +01:00
Alex Auvolat 9a5e676f23 s3 api: stricter tag set validation 2026-11-25 09:51:27 +01:00
Alex Auvolat aaf945282d model: object tagging 2026-11-25 09:51:27 +01:00
Alex Auvolat 5ce996c6b1 admin api: support getting and updating bucket tags 2026-11-25 09:51:27 +01:00
Alex Auvolat d7bae61462 s3: implement Get/Put/DeleteBucketTagging 2026-11-25 09:51:27 +01:00
Alex Auvolat 7be94940ed data structures for bucket tagging 2026-11-25 09:51:27 +01:00
Alex Auvolat 16890435d6 model: consider Conflict state as a tombstone in object CRDT 2026-11-25 09:51:27 +01:00
Alex Auvolat 3a8ddff336 model: rename Deleted as Conflict in object_table, and fix .is_complete() 2026-11-25 09:51:27 +01:00
Alex Auvolat 422239d4a4 model: use Default::default in migration
This way, the migration uses a timestamp of zero instead of the current timestamp.

- Avoids the migration producing different values on different nodes
- Avoids a migration running after an update canceling out the update
2026-11-25 09:51:27 +01:00
Alex Auvolat 4c2622df31 admin: remove meaningless is_up in LocalGetNodeInfoResponse 2026-11-25 09:51:27 +01:00
Alex Auvolat f81df654dd admin: fix last FIXMEs 2026-11-25 09:51:27 +01:00
Alex Auvolat c80501c2e1 admin: remove Option<> around layout statistics 2026-11-25 09:51:27 +01:00
Alex Auvolat 660d95abc3 admin: remove freeform response in LocalGetNodeStatisticsResponse 2026-11-25 09:51:27 +01:00
Alex Auvolat 690a9a19e0 admin: remove freeform in GetClusterStatisticsResponse 2026-11-25 09:51:27 +01:00
Alex Auvolat 6f4721e760 admin: update openapi spec 2026-11-25 09:51:25 +01:00
Alex Auvolat a17d4e2545 website: don't delete configuration when disabling website access (fix #1547) 2026-11-25 09:50:49 +01:00
Alex Auvolat baaaa7ad3d model: add missing derive Arbitrary 2026-11-25 09:50:49 +01:00
Alex Auvolat da2a27c436 model: ensure invariant on allowed_operations 2026-11-25 09:50:49 +01:00
Alex Auvolat c4ff4dd818 model: fix bucket migration 2026-11-25 09:50:49 +01:00
Alex Auvolat 14f1a84beb uniformize error type for anonymous access denied 2026-11-25 09:50:49 +01:00
Alex Auvolat 84c14fcf94 update admin api schema 2026-11-25 09:50:49 +01:00
Alex Auvolat 83a94f4711 s3 api: allow anonymous ListObjects(v2) and ListParts 2026-11-25 09:50:49 +01:00
Alex Auvolat 2a791c993c change anonymous access to be just a list of strings 2026-11-25 09:50:48 +01:00
Alex Auvolat 4a627bc91c s3 api: simplify ReqCtxEnum 2026-11-25 09:50:48 +01:00
Antoine Popineau d0706be988 Refactor how anonymous access is checked and add granular method grants.
Anonymous access can now be configured by allowing specific S3 methods.
Currently, this only includes `s3:HeadObject` and `s3:GetObject`. Umbrella
grants can also be used that translate to lists of methods (`garage:ReadObject` ->
[`s3:HeadObject`, `s3:GetObject`].

The CLI takes either a list of `--allow`ed methods, or a `--revoke-all`.

`ReqCtx` is now represented by an enum of either an authenticated requests
or an anonymous one. Handlers will take either one of those depending on whether
they allow anonymous access or not. `ReqCtxEnum` implements `TryInto` to transform
into the requested type (where building an anonymous context always works, but
building an authenticated one only works if the request contained valid
credentials).

When building an anonymous context, the bucket anonymous configuration will
be checked against the requested endpoint to check if all required methods are
allowed anonymously.
2026-11-25 09:50:48 +01:00
Antoine Popineau 8bf75679b9 Add bucket-level anonymous HTTP access. 2026-11-25 09:50:48 +01:00
Arthur Carcano a3b1711ab8 Fix bug found by fuzzing the object CRDT (fix #1542) (#1541)
Merging this would be a breaking change.

Fixes the bug found in  #1540 (issue #1542)

Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1541
2026-11-25 09:50:48 +01:00
Alex Auvolat 0348a8df2e update prometheus dashboard 2026-11-25 09:50:48 +01:00
Alex Auvolat 6121855a21 doc: update monitoring.md reference manual (it might still miss things) 2026-11-25 09:50:48 +01:00
Alex Auvolat a5fe811c70 metrics: uniformize _total suffix 2026-11-25 09:50:48 +01:00
Alex Auvolat ceefa2cabc metrics: uniformize garage_ prefix in metric names 2026-11-25 09:50:48 +01:00
Alex Auvolat ecc371409a config: increase default block_size and block_ram_buffer_max 2026-11-25 09:50:48 +01:00
Alex Auvolat 4a1ec4183c db: add test for tree.clear() 2026-11-25 09:50:48 +01:00
Alex Auvolat cdeeb2df62 fjall: fix allow fsync 2026-11-25 09:50:48 +01:00
marvin-j97 57729b6d12 refactor: fjall tx 2026-11-25 09:50:48 +01:00
marvin-j97 b31bde000e fix: lint 2026-11-25 09:50:48 +01:00
marvin-j97 8d69576648 use fjall-native tree clear fn 2026-11-25 09:50:48 +01:00
marvin-j97 fd2094d9fb fix: fjall optimistic tx 2026-11-25 09:50:48 +01:00
marvin-j97 fd5d293bbc refactor: fjall persist mode 2026-11-25 09:50:48 +01:00
Alex Auvolat 746fc998d0 update fjall to v3 (#1346) 2026-11-25 09:50:48 +01:00
Dominik Menke 447a7d97ff fix: improve routing of keys starting with "/" (fix #1178) (#1465)
Path-style URLs of the form /bucket//key address an object whose key begins with "/". Two greedy uses of `trim_start_matches('/')` were collapsing these leading slashes away:

- `uri.path().trim_start_matches('/')` stripped all leading slashes from the raw path before any further parsing.
- `p.trim_start_matches('/')` stripped leading slashes from the remainder after `split_once('/')` had already consumed the bucket/key separator

The combined effect wath that `HEAD /bucket//` and `GET /bucket//` produced an empty key, which the router treated as bucket-level operations (HeadBucket -> 200 OK, and ListObjectsV2) instead of an object-level op (HeadObject/GetObject -> 404 NoSuchKey).

The fix is simple: Replace the first `trim_start_matches` with `strip_prefix` (to strip exactly one separator slash) and remove the second one entirely. Path-style and vhost-style requests are now consistent: a double slash in the URL correctly addresses a key whose name begins with "/".

Regression tests added for `HEAD //` and `GET //` requests in both request styles.

Fixes: #1464

---

Disclaimer: I'm not fluent in Rust and I did use an LLM to explain the code to me. All code was written by me.

I'm not sure whether the large `test_cases!` block in the `test_aws_doc_examples` function is the right place for my tests (it certainly was a convenient one).

Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1465
2026-11-25 09:50:48 +01:00
Alex Auvolat 4b76639bd7 tests: check than all metrics name start with 'garage_' prefix 2026-11-25 09:50:48 +01:00