Commit Graph

2273 Commits

Author SHA1 Message Date
Ben McClelland
b573aeecc3 Merge pull request #1950 from versity/dependabot/github_actions/sigstore/cosign-installer-4.1.0
chore(deps): bump sigstore/cosign-installer from 4.0.0 to 4.1.0
2026-03-09 15:36:52 -07:00
Ben McClelland
a066966945 Merge pull request #1949 from versity/dependabot/github_actions/docker/setup-qemu-action-4
chore(deps): bump docker/setup-qemu-action from 3 to 4
2026-03-09 15:36:32 -07:00
dependabot[bot]
d2152b0c7a chore(deps): bump sigstore/cosign-installer from 4.0.0 to 4.1.0
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v4.0.0...v4.1.0)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-version: 4.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 22:01:28 +00:00
dependabot[bot]
b27e42b2ee chore(deps): bump docker/setup-qemu-action from 3 to 4
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 22:01:25 +00:00
Ben McClelland
5f9e62dd04 Merge pull request #1933 from versity/ben/noop-plugin
feat: noop plugin for gateway load testing
2026-03-09 11:17:02 -07:00
Ben McClelland
b220eeb27d Merge pull request #1946 from versity/ben/helm-lint-action
chore: add helm lint to pr tests
2026-03-09 09:23:09 -07:00
Ben McClelland
73730d9f6d feat: noop plugin for gateway load testing
This adds an example plugin that can be useful for benchmarking
the gateway frontend without adding any storage I/O on the
backend. This can also be a useful template for developers
looking to implement a new plugin for the gateway.

Also add a build verification to the go workflow for every plugin
in the plugins directory.
2026-03-09 09:08:49 -07:00
Ben McClelland
c3add18215 Merge pull request #1932 from versity/ben/uds-listener
feat: add unix domain socket listener support to port option
2026-03-09 09:06:47 -07:00
Ben McClelland
ff873ce18f Merge pull request #1947 from aclerici38/fix-login
fix(chart): use docker login for helm and cosign
2026-03-09 09:06:24 -07:00
Ben McClelland
7f9c943b8e chore: add helm lint to pr tests 2026-03-09 08:21:34 -07:00
Anthony Clerici
53ce309719 fix(chart): use docker login for helm and cosign 2026-03-09 00:03:30 -07:00
Ben McClelland
710003f341 feat: add unix domain socket listener support to port option
This adds the ability to specify unix domain socket paths for the
service listener with the --port <path> option. Where <path> can
be either a path to a file in a filesystem or prefixed with @ for
an abstract socket name.

Anything not matching the <host>:<port> pattern in the --port
option will be considered a socket filename.
2026-03-07 22:05:41 -08:00
Ben McClelland
dde4cac1fa Merge pull request #1944 from aclerici38/cosign-version 2026-03-07 16:44:35 -08:00
Anthony Clerici
604848b0f3 fix(chart): fix cosign-installer tag 2026-03-07 12:51:21 -08:00
Ben McClelland
204d349110 Merge pull request #1941 from aclerici38/fix-routes 2026-03-06 22:23:04 -08:00
Anthony Clerici
b15470732d fix(chart): fix multidoc separator when 2 routes are enabled 2026-03-06 21:21:49 -08:00
Ben McClelland
dbc3e23eb3 Merge pull request #1940 from aclerici38/fix-cosign
fix(chart): replace buggy chart-releaser action
2026-03-06 13:59:22 -08:00
Ben McClelland
6c79f26625 Merge pull request #1931 from versity/sis/object-metadata-limits
fix: add request headers and metadata headers limit
2026-03-06 13:17:14 -08:00
Anthony Clerici
47af907203 fix(chart): replace buggy chart-releaser action 2026-03-06 12:52:27 -08:00
Ben McClelland
e435f3a495 Merge pull request #1938 from versity/ben/systemd
fix: update deprecated StandardOutput/StandardError type
2026-03-06 11:37:02 -08:00
niksis02
21a636b3b5 fix: add request headers and metadata headers limit
Fixes #1606

According to AWS documentation:
> *“The PUT request header is limited to 8 KB in size. 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.”*

Based on this, object metadata size is now limited to **2 KB** for all object upload operations (`PutObject`, `CopyObject`, and `CreateMultipartUpload`).

Fixes handling of metadata HTTP headers when the same header appears multiple times with different casing or even if they are identical. According to S3 behavior, these headers must be merged into a single lower-cased metadata key, with values concatenated using commas.

Example:

```
x-amz-meta-Key: value1
x-amz-meta-kEy: value2
x-amz-meta-keY: value3
```

Translated to:

```
key: value1,value2,value3
```

This PR also introduces an **8 KB limit for request headers**. Although the S3 documentation explicitly mentions the 8 KB limit only for **PUT requests**, in practice this limit applies to **all requests**.

To enforce the header size limit, the Fiber configuration option `ReadBufferSize` is used. This parameter defines the maximum number of bytes read when parsing an incoming request. Note that this limit does not apply strictly to request headers only, since request parsing also includes other parts of the request line (e.g., the HTTP method, protocol string, and version such as `HTTP/1.1`). So `ReadBufferSize` is effectively a limit for request headers size, but not the exact limit.
2026-03-06 23:25:49 +04:00
Ben McClelland
92db3b6f26 Merge pull request #1939 from jacksgt/fix-helm-chart-updates
feat(chart): enable persistence by default, discuss more in README
2026-03-06 09:30:05 -08:00
Ben McClelland
310139d57b Merge pull request #1936 from aclerici38/chart/cosign
feat(chart): add cosign signing to chart OCI artifact
2026-03-06 09:29:07 -08:00
Ben McClelland
f3bb1acd3b Merge pull request #1935 from aclerici38/route
feat(chart): add HTTPRoute configuration
2026-03-06 09:28:21 -08:00
Ben McClelland
fbff3f6365 fix: update deprecated StandardOutput/StandardError type
Fix warnings from newer systemd:
Standard output type syslog is obsolete,
 automatically updating to journal.

This updates the stdout/stderr to journal output type which is
what is getting set anyways after the syslog type has been
deprecated.

No expected behavior change with this other than quieting
warnings.
2026-03-06 08:39:26 -08:00
Jack Henschel
b47ef4e05d feat(chart): enable persistence by default, discuss more in README 2026-03-06 17:35:00 +01:00
Anthony Clerici
db956fb477 feat: add cosign signing to chart OCI artifact 2026-03-06 02:55:23 -08:00
Anthony Clerici
3b76df1917 chore: consistent comments 2026-03-06 02:24:47 -08:00
Anthony Clerici
baf5cbf1d2 feat(chart): add HTTPRoute configuration 2026-03-06 02:13:11 -08:00
Ben McClelland
0f92d0ef4f Merge pull request #1916 from versity/ben/azure-test-falures
azure test failure fixes
2026-03-05 17:07:41 -08:00
Ben McClelland
bcb7bc5f9a Merge pull request #1922 from versity/test/update_remove_some_utils
test: some util file updates, changes, removals
2026-03-05 17:07:25 -08:00
Ben McClelland
6281391bb9 Merge pull request #1920 from versity/sis/posix-object-metadata
fix: change the way object metadata is stored in posix
2026-03-05 17:07:05 -08:00
Ben McClelland
570723a5d9 Merge pull request #1924 from jacksgt/feat-helm-chart
feat: add Helm chart for versitygw
2026-03-05 14:08:27 -08:00
niksis02
97bb70509f fix: change the way object metadata is stored in posix
Fixes #1909

Previously, the mapping between object metadata and posix object was as follows: for each metadata key, we stored a separate xattr with the `user.X-Amz-Meta.<key>` prefix. This resulted in syscall overhead when storing and deleting large numbers of metadata keys.
In addition, very long metadata keys caused failures because most posix filesystems limit xattr key lengths to 127–255 bytes, while S3 does not enforce such a per-key limit.

The logic has now been changed so that all object metadata is stored in a single xattr, `user.metadata`, as a JSON key/value object. For backward compatibility, metadata GET operations still fall back to the old mechanism (`metadata key -> xattr key`) when `user.metadata` is not present.

A new CLI utility has been added to convert all legacy object metadata to the new metadata format within the provided directory.

**Example usage:**

```
versitygw utils convert-xattr-metadata path/to/bucket
```

or

```
versitygw utils cxm path/to/bucket
```

It is recommended to run this command on bucket directories to convert all legacy metadata for every object in the bucket.
2026-03-06 01:44:14 +04:00
Ben McClelland
1595d2cf7f Merge pull request #1929 from versity/ben/webui-policy
fix: webui pass correct arguments to request() in putBucketPolicy
2026-03-04 18:49:06 -08:00
Ben McClelland
11f3f53bd3 Merge pull request #1927 from versity/ben/webui-ipv6
fix: bracket IPv6 addresses in auto-detected webui gateway URLs
2026-03-04 18:48:53 -08:00
Jack Henschel
af1a99c4dc feat: add Helm chart for versitygw 2026-03-04 21:02:33 +01:00
Ben McClelland
07c970e3fe fix: webui pass correct arguments to request() in putBucketPolicy
The fifth parameter of request() is useAdminEndpoint (boolean), but
putBucketPolicy was passing a Content-Type header object instead.
This caused useAdminEndpoint to be truthy and contentType to default
to 'application/xml' instead of 'application/json'.

Fixed by passing false for useAdminEndpoint and 'application/json'
as the contentType argument.

Fixes #1928
2026-03-04 10:32:52 -08:00
Ben McClelland
8534d2829f fix: bracket IPv6 addresses in auto-detected webui gateway URLs
Use net.JoinHostPort instead of manual string formatting in
buildServiceURLs so IPv6 addresses are properly wrapped in brackets.
This fixes malformed URLs like "http://::1:7070" being presented as
the default server URL in the WebUI login form when listening on an
IPv6 address; they now correctly render as "http://[::1]:7070".

Fixes #1926
2026-03-04 09:43:47 -08:00
Luke McCrone
038ae5e1ea test: update functions, transfer/remove some utils files 2026-03-04 14:15:00 -03:00
Ben McClelland
afbeb7cb6e fix: azure modernize part number loop check
The part number loop check can be simplified with slices.Contains.
2026-03-03 08:58:31 -08:00
Ben McClelland
271313b036 fix: azure close download body in CopyObject to prevent resource leak
When copying between two different Azure blobs, the source download
stream body was only consumed by PutObject but never explicitly closed.
If PutObject or any subsequent step returned an error, the underlying
HTTP connection held by the Azure SDK was never released, leaking both
the connection and any internal SDK retry goroutines attached to it.
Added a deferred close on downloadResp.Body immediately after the
successful DownloadStream call to ensure the body is always drained and
released regardless of the outcome.
2026-03-03 08:58:31 -08:00
Ben McClelland
dc31696e53 fix: azure ListBuckets pagination to use client-side continuation tokens
Azure's ListContainers Marker parameter requires an opaque internal token
(e.g. /accountname/containername) rather than a plain container name, so
passing MaxResults and our ContinuationToken directly to the Azure API
caused 400 OutOfRangeInput errors. Rework ListBuckets to iterate all Azure
pages client-side, skip entries at or before the ContinuationToken (matching
the posix backend's "start after" semantics), and stop once MaxBuckets items
have been collected, setting ContinuationToken to the last returned bucket
name. This avoids using Azure's NextMarker entirely and correctly handles
both unpaginated and paginated requests.
2026-03-03 08:58:31 -08:00
Ben McClelland
929048cbee fix: azure PresignedAuth_UploadPart test failure
Azure Storage's StageBlock REST API rejects Content-Length: 0
with InvalidHeaderValue. The tests (PresignedAuth_UploadPart,
UploadPart_success) upload a nil/empty body, which causes the
Azure SDK to send Content-Length: 0. Azurite is lenient and
accepts it; real Azure Storage does not.

Use a new metadata key ("Zerobytesparts") sett on the
.sgwtmp/multipart/<uploadId>/<object-hash> blob to track and
0 length parts.
2026-03-03 08:58:22 -08:00
Ben McClelland
703baeeed4 Merge pull request #1921 from versity/ben/windows
chore: enable windows test build and release binaries
v1.3.1
2026-03-03 08:42:03 -08:00
Ben McClelland
d49e830a6e Merge pull request #1915 from versity/ben/ignores
chore: add .DS_Store to .gitignore
2026-03-03 08:24:54 -08:00
Ben McClelland
29e46667bd chore: enable windows test build and release binaries 2026-03-03 08:22:05 -08:00
Ben McClelland
7d2ff59639 Merge pull request #1903 from versity/test/rest_cors_two
test: CORS - response header tests
2026-03-03 08:19:13 -08:00
Ben McClelland
5b186e62d6 Merge pull request #1918 from versity/sis/webserver-ipv6-addresses
fix: fixes webserver network type
2026-03-03 08:16:31 -08:00
Luke McCrone
7b201777c3 test: CORS response header tests 2026-03-03 10:54:21 -03:00