more complete admin API #298

Merged
lx merged 48 commits from admin-api into main 2022-05-24 10:16:40 +00:00
Owner

Spec:

  • Start writing
  • Specify all layout endpoints
  • Specify all endpoints for operations on keys
  • Specify all endpoints for operations on key/bucket permissions
  • Specify all endpoints for operations on buckets
  • 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:

  • Refactor code for admin api to use common api code that was created for K2V

General endpoints:

  • Metrics
  • GetClusterStatus
  • ConnectClusterNodes
  • GetClusterLayout
  • UpdateClusterLayout
  • ApplyClusterLayout
  • RevertClusterLayout

Key-related endpoints:

  • ListKeys
  • CreateKey
  • ImportKey
  • GetKeyInfo
  • UpdateKey
  • DeleteKey

Bucket-related endpoints:

  • ListBuckets
  • CreateBucket
  • GetBucketInfo
  • DeleteBucket
  • PutBucketWebsite
  • DeleteBucketWebsite

Operations on key/bucket permissions:

  • BucketAllowKey
  • BucketDenyKey

Operations on bucket aliases:

  • GlobalAliasBucket
  • GlobalUnaliasBucket
  • LocalAliasBucket
  • LocalUnaliasBucket

And also:

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

Fix #231
Fix #295

**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
lx force-pushed admin-api from 60af164433 to d19ed12f92 2022-05-09 09:13:46 +00:00 Compare
lx changed target branch from k2v to main 2022-05-10 11:13:36 +00:00
lx added 1 commit 2022-05-10 11:15:51 +00:00
Merge branch 'main' into k2v
Some checks reported errors
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build was killed
aa5b54fe19
lx force-pushed admin-api from e97d24e008 to dd54d0b2b1 2022-05-10 11:25:20 +00:00 Compare
lx added 1 commit 2022-05-10 11:36:49 +00:00
Update Cargo.nix and improve log message
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
bb6ec9ebd9
lx added 1 commit 2022-05-11 08:28:06 +00:00
Add API access key admin endpoints
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
f97a7845e9
lx added 1 commit 2022-05-11 09:10:41 +00:00
First key endpoints: ListKeys and GetKeyInfo
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
5c00c9fb46
lx added 1 commit 2022-05-11 09:40:44 +00:00
Implement CreateKey, DeleteKey and rudimentary UpdateKey
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
393b76ecba
lx added 1 commit 2022-05-11 09:51:23 +00:00
Short doc on UpdateKey
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
aeb978552a
lx added 1 commit 2022-05-12 08:22:52 +00:00
ListBucket and GetBucketInfo
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2b93a01d2b
lx added 1 commit 2022-05-12 08:45:21 +00:00
CreateBucket
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
de1a5b87b6
lx added 1 commit 2022-05-12 09:02:48 +00:00
DeleteBucket
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
fe399a3265
lx added 1 commit 2022-05-12 09:19:53 +00:00
BucketAllowKey and BucketDenyKey
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
fc2f73ddb5
lx added 1 commit 2022-05-12 09:21:31 +00:00
Simplify
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
ed76893581
lx added 2 commits 2022-05-12 15:12:27 +00:00
Fix clippy
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is passing
e4e1f8f0d6
lx added 3 commits 2022-05-13 13:05:16 +00:00
Error refactoring
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
96b11524d5
lx added 2 commits 2022-05-13 13:21:50 +00:00
More error refactoring
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
7a5d329e49
lx added 1 commit 2022-05-13 13:44:52 +00:00
Separate error types for k2v and signature
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
ec16d166f9
lx added 1 commit 2022-05-13 17:19:06 +00:00
More error refactoring
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
ea325d78d3
lx added 1 commit 2022-05-13 17:28:38 +00:00
Json body for custom errors
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
5a535788fc
lx added 1 commit 2022-05-13 17:36:31 +00:00
More precisions in errors & small refactoring
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
8033bdb0b4
lx added 1 commit 2022-05-13 17:43:56 +00:00
Revert useless thing
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
d7736cb614
lx added 1 commit 2022-05-13 17:49:16 +00:00
Remove useless string conversions
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
ec50ffac42
lx added 4 commits 2022-05-17 11:11:03 +00:00
Fix ReadIndex spec and add JSON5 remark to doc
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
176715c5b2
K2V: Fix end parameter and add tests (fix #305)
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
c692f55d5c
Merge branch 'main' into admin-api
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
86a3fe8ec5
lx added 1 commit 2022-05-17 14:43:10 +00:00
Return website config in GetBucketInfo, use serde(rename_all)
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
8ff95f09c9
lx added 1 commit 2022-05-17 14:48:42 +00:00
Fix error code
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
8b1338ef2f
lx added 2 commits 2022-05-17 15:17:01 +00:00
Specify and implement {Global,Local}{Alias,Unalias}Bucket
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2ce3513c10
lx added 2 commits 2022-05-17 15:52:18 +00:00
Prefix all APIs with v0/
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
440a577563
lx added 1 commit 2022-05-17 16:44:06 +00:00
Implement ConnectClusterNodes
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
70383b4363
lx added 1 commit 2022-05-17 17:02:38 +00:00
Implement ImportKey
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
dcfa408887
lx added 1 commit 2022-05-17 22:28:31 +00:00
Rename error varian for Clippy
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
926b3c0fad
lx added 1 commit 2022-05-17 22:33:06 +00:00
Fix fmt
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
30e393b439
lx added 1 commit 2022-05-18 08:10:34 +00:00
Refactor bucket emptiness check and add k2v check
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
5367f8adb2
lx added 1 commit 2022-05-18 20:36:04 +00:00
Merge branch 'main' into admin-api
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
99976e11f8
lx added 1 commit 2022-05-23 10:06:23 +00:00
Update documentation with warning
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
d768f559da
lx added 1 commit 2022-05-23 14:40:37 +00:00
Make authorization token mandatory for admin API
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
1c88ee9bc5
lx added 1 commit 2022-05-23 15:39:33 +00:00
fix doc
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2f250a83e1
lx added 1 commit 2022-05-24 09:53:09 +00:00
Fix some docs and change syntax of CreateBucket permissions
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
0b43a71351
lx added 1 commit 2022-05-24 09:54:04 +00:00
cargo fmt
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
be59cafd47
lx changed title from WIP: more complete admin API to more complete admin API 2022-05-24 10:16:01 +00:00
lx merged commit 382e74c798 into main 2022-05-24 10:16:40 +00:00
lx referenced this pull request from a commit 2022-05-24 10:16:41 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#298
No description provided.