Commit graph

441 commits

Author SHA1 Message Date
Evgeniy Kulikov
0bea843d90 Fix DeleteObject handler
DeleteObject should remove all objects with passed nice name

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-20 22:41:52 +03:00
Evgeniy Kulikov
34f6eb7d55 Add note about multiple delete of objects
Could not find how to use it.
I propose open issue and describe how to use it and then implement method.

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-20 22:35:39 +03:00
Evgeniy Kulikov
21591ebe65 Add method to find all ID's for the nice names
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-20 22:33:59 +03:00
Evgeniy Kulikov
a3c95cffb1 Merge pull request #22 from nspcc-dev/api-handlers
API Handlers
2020-08-20 14:07:52 +03:00
Evgeniy Kulikov
5bb2c34052 Cleanup unimplemented handlers
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-20 02:37:06 +03:00
Evgeniy Kulikov
1d98c4ecc2 Implement GetObject handler
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-20 02:36:46 +03:00
Evgeniy Kulikov
bfc4b8786f Implement HeadObject handler
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-20 02:36:34 +03:00
Evgeniy Kulikov
9493f3d281 Implement PutObject handler
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-20 02:36:17 +03:00
Evgeniy Kulikov
9746978b1d Implement DeleteObject handler
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-20 02:36:00 +03:00
Evgeniy Kulikov
9ab0571d29 Implement CopyObject handler
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-20 02:35:51 +03:00
Evgeniy Kulikov
c6d4b6d731 Implement MarshalXML for StringMap type
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-20 02:34:47 +03:00
Evgeniy Kulikov
fb13d1fcb3 Move ListObjects and ListBuckets in same file
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-20 02:33:43 +03:00
Evgeniy Kulikov
edd44ea981 Check that aws filename wasn't set
we should check that filename header wasn't set, otherwise we should not change custom filename

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-20 02:32:42 +03:00
Evgeniy Kulikov
00a17d8316 CopyObject should contains custom headers
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-20 02:31:04 +03:00
Evgeniy Kulikov
fb00af23fb Fixed possible NPE in PutObject
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-20 02:30:18 +03:00
Evgeniy Kulikov
447a255d18 Add func to debug requests
- logging middleware
- response writer with status code

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-20 02:28:16 +03:00
Evgeniy Kulikov
5df041f7d7 Add func to write headers only
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-20 02:27:13 +03:00
Evgeniy Kulikov
4dd33ff237 Merge pull request #20 from nspcc-dev/fix/19-fix-accesskey-regexp
[#19] Bug with AccessKey
2020-08-19 16:56:45 +03:00
Evgeniy Kulikov
f486c22ff4 Merge pull request #18 from nspcc-dev/api-handlers
API Handlers (bucket info + unsupported)
2020-08-19 16:55:00 +03:00
Pavel Korotkov
0528eed7b6 [#19] Bug with AccessKey
Closes #19.

Signed-off-by: Pavel Korotkov <pkorotkov@gmail.com>
2020-08-19 16:28:17 +03:00
Evgeniy Kulikov
cea8f9d4ca Add bucket info handler
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-19 14:53:17 +03:00
Evgeniy Kulikov
92b039fa5e Add unsupported handlers
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-19 14:52:44 +03:00
Evgeniy Kulikov
9986a82fca Merge pull request #17 from nspcc-dev/api-handlers
API Handlers (Bucket)
2020-08-13 20:38:48 +03:00
Evgeniy Kulikov
b14e2d54c8 Prepare list-objects handler
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-11 17:37:20 +03:00
Evgeniy Kulikov
ccd481e4e2 Prepare list-buckets handler
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-11 17:36:52 +03:00
Evgeniy Kulikov
d9f691a59a Refactoring API handlers
- add responses for list-objects and list-buckets
- set `implement me` errors more useful

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-11 17:35:54 +03:00
Evgeniy Kulikov
b2a2b5478b Refactoring API
- api.Error should implement error interface
- add method that encodes the response into ResponseWriter

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-11 17:34:06 +03:00
Evgeniy Kulikov
4d4e52fea7 Merge pull request #16 from nspcc-dev/api-refactoring-for-request-id
Refactoring API package
2020-08-11 15:06:38 +03:00
Evgeniy Kulikov
64429d736d Refactoring API layer
- logging RequestID
- should return error, when headers already received

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-11 14:32:04 +03:00
Evgeniy Kulikov
59e26d45fd Refactoring API router
- method to fetch request id
- middleware to set request id and info
- fixes for getAPIErrorResponse (fix possible NPE)

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-11 14:30:02 +03:00
Evgeniy Kulikov
26f1df2721 Refactoring request info
- simplify
- more usable

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-11 14:27:31 +03:00
pkorotkov
93e54bc681 Merge pull request #11 from nspcc-dev/feature/8-rework_auth_scheme
[#8] Rework auth procedure and use package authmate
2020-08-07 14:21:13 +03:00
Pavel Korotkov
f6cb0a6ecc [#8] Update deps
Signed-off-by: Pavel Korotkov <pkorotkov@gmail.com>
2020-08-07 14:14:52 +03:00
Pavel Korotkov
8d4017f1d3 [#8] Use proper creds contructor to avoid unnatural convertions
Signed-off-by: Pavel Korotkov <pkorotkov@gmail.com>
2020-08-07 14:12:27 +03:00
Pavel Korotkov
c5489da3cc [#8] Check error after setting gate's auth keys
Signed-off-by: Pavel Korotkov <pkorotkov@gmail.com>
2020-08-07 14:12:27 +03:00
Pavel Korotkov
1e608634e7 [#8] Accept directly bytes from gate key file
Signed-off-by: Pavel Korotkov <pkorotkov@gmail.com>
2020-08-07 14:12:27 +03:00
Pavel Korotkov
d70fe6410b [#8] Active validation of AWS V4 signature
Signed-off-by: Pavel Korotkov <pkorotkov@gmail.com>
2020-08-07 14:12:27 +03:00
Pavel Korotkov
fdc6d7acbd [#8] Turn on creds and manager
Signed-off-by: Pavel Korotkov <pkorotkov@gmail.com>
2020-08-07 14:12:27 +03:00
Pavel Korotkov
4f7a2f3a9a [#8] Rename key-related flags
Signed-off-by: Pavel Korotkov <pkorotkov@gmail.com>
2020-08-07 14:12:27 +03:00
Pavel Korotkov
c972682430 [#8] Switch outer code to using the new auth scheme
* Removed CLI flag for RSA key
* Passed through peers to auth center to be able to independently interact with a NeoFS node
* Added flag and loader for curve25519 (private) key

Signed-off-by: Pavel Korotkov <pkorotkov@gmail.com>
2020-08-07 14:12:27 +03:00
Pavel Korotkov
490254c69e [#8] Add an early changes to auth package
Signed-off-by: Pavel Korotkov <pkorotkov@gmail.com>
2020-08-07 14:12:27 +03:00
Evgeniy Kulikov
0d7f782b93 Merge pull request #14 from nspcc-dev/cleanup
Cleanup and refactoring code structure
2020-08-06 15:10:02 +03:00
Evgeniy Kulikov
0161d2fbd3 [#13] Rename go module name according to NSPCC standards
- refactoring s3 gate structure
- cleanup unused code
- rename go module to `github.com/nspcc-dev/neofs-s3-gate`

closes #13

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-06 15:02:13 +03:00
Evgeniy Kulikov
e7f72fc670 Cleanup README.md
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-06 14:51:56 +03:00
Evgeniy Kulikov
91ae8b72f8 Cleanup from legacy files
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-06 14:49:15 +03:00
Evgeniy Kulikov
9a7f7064f4 Merge pull request #12 from nspcc-dev/cleanup
Cleanup from legacy code usage
2020-08-06 14:05:14 +03:00
Evgeniy Kulikov
4c6572141b Update dependencies (cleanup from legacy code usage) 2020-08-06 13:51:03 +03:00
Evgeniy Kulikov
26dda9ef2b Fixes for handler initialize 2020-08-06 13:50:04 +03:00
Evgeniy Kulikov
e223876d53 Remove legacy code usage 2020-08-06 13:49:25 +03:00
Evgeniy Kulikov
28fa75fb69 Remove pkg-legacy subpackage 2020-08-06 13:48:03 +03:00