Commit Graph

23 Commits

Author SHA1 Message Date
Alex Auvolat f37d5d2b08 admin api: convert most bucket operations 2025-01-30 13:36:25 +01:00
Alex Auvolat 420bbc162d admin api: clearer syntax for AddBucketAlias and RemoveBucketAlias 2025-01-29 19:26:16 +01:00
Alex Auvolat 12ea4cda5f admin api: merge calls to manage global/local aliases 2025-01-29 19:26:16 +01:00
Alex Auvolat 5fefbd94e9 admin api: rename allow/deny api calls in api v2 2025-01-29 19:26:16 +01:00
Alex Auvolat ba810b2e81 admin api: rename bucket aliasing operations 2025-01-29 19:26:16 +01:00
Alex Auvolat ed58f8b0fe admin api: update semantics of some endpoints, and update doc 2025-01-29 19:26:16 +01:00
Alex Auvolat c99bfe69ea admin api: new router_v2 with unified path syntax 2025-01-29 19:26:16 +01:00
Alex Auvolat 831f2b0207 admin api: make all handlers impls of a single trait 2025-01-29 19:26:16 +01:00
Alex Auvolat c1eb1610ba admin api: create structs for all requests/responess in src/api/admin/api.rs 2025-01-29 19:26:16 +01:00
Alex Auvolat 59f61c966a Merge branch 'main' into next-0.10 2024-02-22 15:45:45 +01:00
Alex Auvolat cff702a951 [lock-createbucket] Add node-global lock for bucket/key operations (fix #723) 2024-02-22 12:28:21 +01:00
Alex Auvolat cf2af186fc Merge branch 'main' into next-0.10 2024-02-13 11:36:28 +01:00
Alex Auvolat a22bd31920 [dep-upgrade-202402] migration to http/hyper 1.0 for k2v api 2024-02-05 19:27:12 +01:00
Alex Auvolat 0bb5b77530 [dep-upgrade-202402] wip: port to http/hyper crates v1 2024-02-05 18:49:54 +01:00
Alex Auvolat 4a9c94514f avoid using layout_watch in System directly 2023-11-08 16:41:00 +01:00
Alex Auvolat 12d1dbfc6b remove Ring and use ClusterLayout everywhere 2023-11-08 15:41:24 +01:00
Alex Auvolat 412ab77b08 comments and clippy lint fixes 2023-06-09 16:23:37 +02:00
Alex Auvolat 511e07ecd4 fix mpu counter (add missing workers) and report info at appropriate places 2023-06-09 16:23:37 +02:00
Alex Auvolat 8e93d69974 More clippy fixes 2023-01-26 17:26:32 +01:00
Quentin Dufour dc50fa3b34 Fix typo in admin API on BucketInfo 2022-11-11 16:56:56 +01:00
Alex 77e3fd6db2 improve internal item counter mechanisms and implement bucket quotas (#326)
- [x] Refactoring of internal counting API
- [x] Repair procedure for counters (it's an offline procedure!!!)
- [x] New counter for objects in buckets
- [x] Add quotas to buckets struct
- [x] Add CLI to manage bucket quotas
- [x] Add admin API to manage bucket quotas
- [x] Apply quotas by adding checks on put operations
- [x] Proof-read

Co-authored-by: Alex Auvolat <alex@adnab.me>
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/326
Co-authored-by: Alex <alex@adnab.me>
Co-committed-by: Alex <alex@adnab.me>
2022-06-15 20:20:28 +02:00
Alex Auvolat ff06d3f082 Fix Content-Type headers for {admin,k2v} errors and admin responses
Fix #315
2022-05-25 17:09:33 +02:00
Alex 382e74c798 First version of admin API (#298)
**Spec:**

- [x] Start writing
- [x] Specify all layout endpoints
- [x] Specify all endpoints for operations on keys
- [x] Specify all endpoints for operations on key/bucket permissions
- [x] Specify all endpoints for operations on buckets
- [x] Specify all endpoints for operations on bucket aliases

View rendered spec at <https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/admin-api/doc/drafts/admin-api.md>

**Code:**

- [x] Refactor code for admin api to use common api code that was created for K2V

**General endpoints:**

- [x] Metrics
- [x] GetClusterStatus
- [x] ConnectClusterNodes
- [x] GetClusterLayout
- [x] UpdateClusterLayout
- [x] ApplyClusterLayout
- [x] RevertClusterLayout

**Key-related endpoints:**

- [x] ListKeys
- [x] CreateKey
- [x] ImportKey
- [x] GetKeyInfo
- [x] UpdateKey
- [x] DeleteKey

**Bucket-related endpoints:**

- [x] ListBuckets
- [x] CreateBucket
- [x] GetBucketInfo
- [x] DeleteBucket
- [x] PutBucketWebsite
- [x] DeleteBucketWebsite

**Operations on key/bucket permissions:**

- [x] BucketAllowKey
- [x] BucketDenyKey

**Operations on bucket aliases:**

- [x] GlobalAliasBucket
- [x] GlobalUnaliasBucket
- [x] LocalAliasBucket
- [x] LocalUnaliasBucket

**And also:**

- [x] Separate error type for the admin API (this PR includes a quite big refactoring of error handling)
- [x] Add management of website access
- [ ] Check that nothing is missing wrt what can be done using the CLI
- [ ] Improve formatting of the spec
- [x] Make sure everyone is cool with the API design

Fix #231
Fix #295

Co-authored-by: Alex Auvolat <alex@adnab.me>
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/298
Co-authored-by: Alex <alex@adnab.me>
Co-committed-by: Alex <alex@adnab.me>
2022-05-24 12:16:39 +02:00