Commit Graph

24 Commits

Author SHA1 Message Date
slasher
c713d78265 chore(style): fix up semgrep for ip v4 and v6
Signed-off-by: slasher <shenjie1@oppo.com>
2025-02-19 10:05:11 +08:00
slasher
5c7898354f style(all): format all codes with golangci tools
closes #3371

@formatter:off

Signed-off-by: slasher <shenjie1@oppo.com>
2024-05-14 09:54:13 +08:00
slasher
1d84f74acd chore(format): format all code with gofumpt
Signed-off-by: slasher <shenjie1@oppo.com>
2024-01-12 14:21:16 +08:00
yhjiango
c8e92fb0f0 feat(objectnode): support local and external audit log
Signed-off-by: yhjiango <jiangyunhua@oppo.com>
2023-11-01 14:46:14 +08:00
yhjiango
4401624f96 feat(objectnode): s3 sts and signature auth
1. sts federation token
2. signature auth code refactor

Signed-off-by: yhjiango <jiangyunhua@oppo.com>
2023-08-30 20:05:32 +08:00
yhjiango
e5989dec41 fix(objectnode): fix md5 check failure when uploading keys with all empty characters
Signed-off-by: yhjiango <jiangyunhua@oppo.com>
2023-05-18 10:48:57 +08:00
yhjiango
0affc88413 fix(objectnode): fully compatible with s3
Signed-off-by: yhjiango <jiangyunhua@oppo.com>
2023-05-18 10:48:57 +08:00
leonrayang
9a30b9f884 update: update to CubeFS
Signed-off-by: leonrayang <chl696@sina.com>
2022-08-22 18:16:09 +08:00
leonrayang
3fdd01cae9 feature: add qos flow limit control process for 2nd cache layer
1) update master inteface of datanode enable qos
2) master clean client info if long time no report
3) enable qos online shutdown and startup
4) master set client alloc preriod and count of girds hit trigger condition
5) datanode qos limit value set by master and add disable conf and http interface
6) client qos init buffer calculate according on real buffer storage
7) create limiter for both hot and cold volume

Signed-off-by: leonrayang <chl696@sina.com>
2022-08-10 22:05:45 +08:00
leonrayang
2970e2c3d1 update. go import path change from chubaofs to cubefs
Signed-off-by: leonrayang <chl696@sina.com>
2022-01-25 18:17:02 +08:00
Mofei Zhang
fb9750c480 Fix: key encoding issue of S3 ListObjects API.
Parse parameter 'encoding-type' from request. It this parameter
specified and match with 'url', then encode content keys by using url
encoding function.

Signed-off-by: Mofei Zhang <mofei2816@gmail.com>
2020-09-27 18:20:27 +08:00
wenjia322
5b587bf0ce enhancement: add 'Expires' and 'Cache-Control' when putObject/copyObject/getObject/headObject
Signed-off-by: wenjia322 <buaa1214wwj@126.com>
2020-05-29 10:57:13 +08:00
Mofei Zhang
df4b7f9a42
Fix: parallel-safe issue in conn pool and metanode conn serve
1. Fix: parallel-safe issue in conn pool and metanode conn serve
2. Fix: nil pointer issue when list parts for non-exist uploadId
3. Enhancement: validate read size while read from connnect.
4. Enhancement: clean up useless data on failure while upload part.
5. Enhancement: generate ETag if do not exist when listing.
6. Enhancement: include error message when formatting packet to string.
7. Enhancement: improve compatile with old version SDK.
8. Enhancement:  success when retry add exist multipart part.

Signed-off-by: Mofei Zhang <mofei2816@gmail.com>
Signed-off-by: 张墨飞 <zhangmofei@jd.com>
2020-05-21 12:28:18 +08:00
Mofei Zhang
ab4851d14b
Fix: ignore x-amz-metadata-directive header
Ignore 'x-amz-metadata-directive' header on parsing user-defined
metadata when process copy object.

Signed-off-by: Mofei Zhang <mofei2816@gmail.com>
2020-05-19 11:19:14 +08:00
Mofei Zhang
01240bd867
Enhancement: partial support user-defined metadata
The PutObject interface supports setting user-defined metadata. The
GetObject and HeadObject interfaces can correctly return the stored
user-defined metadata.

Signed-off-by: Mofei Zhang <mofei2816@gmail.com>
2020-05-06 00:52:04 +08:00
Mofei Zhang
323e529ee0
Enhancement: make ETag versioned
When ETag is stored, it is versioned by encoding, which can make
the file system interface and object storage interface more closely
integrated.

Referring to the Amazon AWS S3 Developer Guide:
"Amazon S3 response includes an ETag that uniquely identifies the
combined object data. This ETag will not necessarily be an MD5 hash
of the object data."

When a new object is written to ChubaoFS through the object storage
interface, ChubaoFS calculates the ETag value for it, and uses the
modification time of the object as its version information when
encoding and storing.

If this file is modified by the file system interface, the ETag of
this file will be invalid because the version information will be
inconsistent with modification time.

After the object storage interface finds that the ETag is invalid,
it will automatically generate a new ETag matching its modification
time.

Signed-off-by: Mofei Zhang <mofei2816@gmail.com>
2020-05-05 12:56:00 +08:00
xuxihao
176475a671 Fix: using local time to replace UTC in S3 modify action
Signed-off-by: xuxihao <xuxihao3@jd.com>
2020-04-16 17:46:41 +08:00
Mofei Zhang
7a57837f74
Fix: third-party license information
Adjust the format of the license header information of the third-party
code used to make the format more compliant. The NOTICE file supplements
the third-party code NOTIC information and explains the use of the code.

Signed-off-by: Mofei Zhang <mofei2816@gmail.com>
2020-04-14 19:29:39 +08:00
yuboLee
c28e4a8b0c Enhancement: add conditional parameter support
Implemented the following conditional parameters in the GetObject
and HeadObject interfaces:
- If-Match
- If-Modified-Since
- If-None-Match
- If-Unmodified-Since

Signed-off-by: yuboLee <pangbolee@gmail.com>
2020-04-10 15:17:49 +08:00
Mofei Zhang
4edef106d5
Enhancement: add routing for unimplemented APIs
In view of the particularity of the AWS S3 protocol rules, additional
routes are implemented for unimplemented APIs to prevent users from
incorrectly routing to other APIs when requesting unimplemented APIs.

Signed-off-by: Mofei Zhang <mofei2816@gmail.com>
2020-04-08 11:21:25 +08:00
Mofei Zhang
509d96c3d1
Enhancement: folder operations in S3 APIs
Supports folder operations in the same way as Amazon AWS S3.
  - Get folder meta info by HeadObject interface.
  - Create folder when header specifies Content-Type as
    application/directory and Content-Length as 0 on PutObject interface.
  - Delete an empty folder by DeleteObject interface.
  - The GetObject interface responds normally when the target is an
    existing directory.
  - Differentiate folders and files on the ListObject interface through the
    CommonPrefix property (already supported).

Following object storage interface haven been implemented folder operations:
  - HeadObject
  - GetObject
  - DeleteObject
  - DeleteObjects
  - ListObjects
  - ListObjectsV2

Signed-off-by: Mofei Zhang <mofei2816@gmail.com>
2020-03-30 17:01:45 +08:00
Mofei Zhang
b4434486c9
fix: unit test building issues and log format pattern issues.
Signed-off-by: Mofei Zhang <mofei2816@gmail.com>
2019-12-20 18:19:01 +08:00
Mofei Zhang
ebfe9e297c
supplementary licence information and documents
Signed-off-by: Mofei Zhang <mofei2816@gmail.com>
2019-12-19 19:03:30 +08:00
Mofei Zhang
d609fedb5c feature: object storage interface
Add ObjectNode provides S3-compatibile APIs.
Fusion Storage interface expose two interface (POSIX and S3-compatible) for file operation.

Signed-off-by: Mofei Zhang <mofei2816@gmail.com>
2019-12-17 17:36:53 +08:00