Commit graph

229 commits

Author SHA1 Message Date
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
Evgeniy Kulikov
c49d2824a1 Remove legacy subpackage 2020-08-06 13:47:44 +03:00
Evgeniy Kulikov
f055e7d269 Merge pull request #9 from nspcc-dev/fixes-for-object-receive
Simplify receiving object from NeoFS
2020-08-05 16:52:43 +03:00
Evgeniy Kulikov
06df8642b3 Simplify receiving object from NeoFS
- add function to receive object with payload
- simplify receiving object for layer.Get
- simplify receiving object for layer.objectGet

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-05 16:47:09 +03:00
Evgeniy Kulikov
06c9a126d1 Merge pull request #7 from nspcc-dev/fixes-around-new-layer
Fixes for new NeoFS layer client
2020-08-03 18:22:24 +03:00
Evgeniy Kulikov
f7dc2095b1 Fixes for new NeoFS layer client
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-03 18:19:56 +03:00
Evgeniy Kulikov
8101161e51 Merge pull request #6 from nspcc-dev/layer-get-neofs-object
Add NeoFS helper to fetch object by refs.Address
2020-08-03 18:13:49 +03:00
Evgeniy Kulikov
a8c8bdaadf Add NeoFS helper to fetch object by refs.Address
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-03 18:08:55 +03:00
Evgeniy Kulikov
2b5b71ac83 Merge pull request #5 from nspcc-dev/object-layer
Refactoring ObjectLayer
2020-08-03 17:36:20 +03:00
Evgeniy Kulikov
2731246239 Refactoring ObjectLayer
- simplify layer.Client
- refactoring neofs pool client

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-08-03 14:51:28 +03:00
Evgeniy Kulikov
b64c986b1c Merge pull request #4 from nspcc-dev/NFSSVC-27
NFSSVC-27 Add session token workaround to connection pool
2020-07-29 14:37:37 +03:00
Evgeniy Kulikov
a200ae327a NFSSVC-27 Add session token workaround to connection pool
- Renew token for connections
- Pool.SessionToken for connection and options

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-07-29 14:30:20 +03:00
Evgeniy Kulikov
55dacf20c1 Merge pull request #3 from nspcc-dev/issue/2
#2 Fix AWS V4 signature regexp

closes #2
2020-07-28 19:14:32 +03:00