Commit Graph

30 Commits

Author SHA1 Message Date
Alex Auvolat aa4e4656b1 GetKeyInfo: properly list locally-aliased buckets even if they have no permissions 2026-07-25 14:24:58 +02:00
Alex Auvolat bacc6c98b2 replace expiration field with custom type that merges to min value 2026-05-13 11:20:10 +02:00
Alex Auvolat bf0a24ea69 replace Option CRDT by explicit CancelingOption and MergingOption types 2026-05-13 11:20:06 +02:00
Roman Ivanov 2cfd92e0c3 Use error NoSuchAccessKey in get info request processing (#1293) (#1356)
Fix for https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/1293

Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1356
Reviewed-by: Alex <lx@deuxfleurs.fr>
Co-authored-by: Roman Ivanov <xatikopro@gmail.com>
Co-committed-by: Roman Ivanov <xatikopro@gmail.com>
2026-02-27 18:11:57 +00:00
Gwen Lg f2f6669bf0 style: clean use for question_mark
- remove useless `Ok` enclosing with `?`
lint message: enclosing `Ok` and `?` operator are unneeded
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_question_mark
- use question mark instead of manual implementation
lint message: this `match` expression can be replaced with `?`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#question_mark
2026-01-29 20:49:28 +01:00
trinity-1686a d975960be3 hide keys without any permissions from admin api 2025-08-02 17:28:14 +02:00
Alex Auvolat 5d338f0b8f add never_expires to remove expiration dates of admin tokens and access keys 2025-04-17 11:44:09 +02:00
Alex Auvolat 590c9bb4db possibility to update access key expiration date 2025-04-17 11:30:58 +02:00
Alex Auvolat c56b7e20c3 add creation date and expiration date to access keys 2025-04-17 11:28:44 +02:00
Alex Auvolat d067a40b3f admin api: add functions to manage admin api tokens 2025-03-11 15:17:31 +01:00
Alex Auvolat 7c8fc04b96 massively speed up compilation of garage_api_admin by not using async_trait 2025-02-05 19:37:38 +01:00
Alex Auvolat 89ff9f5576 admin api: base infrastructure for local endpoints
admin api: rename EndpointHandler into RequestHandler to avoid confusion with RPC

wip: infrastructure for local api calls

admin api: fix things

admin api: first local endpoint to work with new scheme

admin api: implement SetWorkerVariable
2025-02-03 18:54:51 +01:00
Alex Auvolat fe937c2901 Merge branch 'main' into next-v2 2025-02-01 19:07:17 +01:00
Alex Auvolat 84f1db91c4 fix things up 2025-01-31 18:34:57 +01:00
Alex Auvolat 9fa20d45be wip: split garage_api into garage_api_{common,s3,k2v,admin} 2025-01-31 18:18:29 +01:00
Alex Auvolat 1c03941b19 admin api: fix panic on GetKeyInfo with no args 2025-01-29 19:26:16 +01:00
Alex Auvolat 420bbc162d admin api: clearer syntax for AddBucketAlias and RemoveBucketAlias 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 cff702a951 [lock-createbucket] Add node-global lock for bucket/key operations (fix #723) 2024-02-22 12:28:21 +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 8ef42c9609 admin docs: reformatting, key admin: add check 2023-06-14 17:19:25 +02:00
Alex Auvolat 7895f99d3a admin and cli: hide secret keys unless asked 2023-06-14 16:56:15 +02:00
Alex Auvolat 28cc9f178a admin api: make name optionnal for CreateKey 2023-06-14 13:56:37 +02:00
Alex Auvolat bf19a44fd9 admin API: add missing camelCase conversions (fix #381) 2023-06-13 16:15:50 +02:00
Alex Auvolat 412ab77b08 comments and clippy lint fixes 2023-06-09 16:23:37 +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