Skip to content

Enforce 2KB size limit on user-defined object metadata #9728

@zubron

Description

@zubron

S3 enforces a 2KB size limit on user-defined metadata. lakeFS currently doesn't enforce this, allowing applications to write metadata that would fail when used with real S3.

S3 behaviour:

Input:  {'key': 'a' * 2100}  (>2KB)
Response: Error 400 - MetadataTooLarge

Current lakeFS behaviour:

Input:  {'key': 'a' * 2100}  (>2KB)
Response: Success (accepted and stored)

From AWS docs:

"Within the PUT request header, the user-defined metadata is limited to 2 KB in size. The size of user-defined metadata is measured by taking the sum of the number of bytes in the UTF-8 encoding of each key and value."

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2area/APIImprovements or additions to the APIarea/gatewayChanges to the gatewaygood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions