-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for configurable max bucket & key length #8484
Add support for configurable max bucket & key length #8484
Conversation
fa812e6
to
6754405
Compare
src/endpoint/sts/sts_rest.js
Outdated
@@ -90,6 +90,8 @@ async function handle_request(req, res) { | |||
} | |||
req.op_name = op_name; | |||
|
|||
http_utils.validate_bucket_name_object_key_length(req); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is relevant to sts/iam requests at all - we don't parse a bucket/key params in those servers.
src/endpoint/iam/iam_rest.js
Outdated
@@ -105,6 +105,8 @@ async function handle_request(req, res) { | |||
} | |||
req.op_name = op_name; | |||
|
|||
http_utils.validate_bucket_name_object_key_length(req); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is relevant to sts/iam requests at all - we don't parse a bucket/key params in those servers.
src/endpoint/s3/s3_rest.js
Outdated
@@ -121,6 +121,8 @@ async function handle_request(req, res) { | |||
} | |||
req.op_name = op_name; | |||
|
|||
http_utils.validate_bucket_name_object_key_length(req); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems more relevant in my opinion that this validation will be part of get_bucket_and_key()
src/util/http_utils.js
Outdated
@@ -702,6 +702,15 @@ function validate_server_ip_whitelist(req) { | |||
throw new S3Error(S3Error.AccessDenied); | |||
} | |||
|
|||
function validate_bucket_name_object_key_length(req) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this fits http_utils, it can just be in s3_rest, or if we need to share it then maybe in s3_utils
Signed-off-by: Utkarsh Srivastava <[email protected]> add configurable for bucket name length Signed-off-by: Utkarsh Srivastava <[email protected]>
6754405
to
a80acc4
Compare
Explain the changes
This PR adds support for configurable max key length in NooBaa. Amazon S3 supports maximum of 1024 bytes long key name while NooBaa does not have any such limits. This sometimes become problematic hence this PR adds support for a config variable named
S3_MAX_KEY_LENGTH
which defaults toInfinity
for now implying no limit, however this can be changed to 1024 inconfig-local.js
.Issues: Fixed #xxx / Gap #xxx
Some known DBS3 issues.
Testing Instructions: