Commit Graph

2176 Commits

Author SHA1 Message Date
dependabot[bot]
496b098953 chore(deps): bump goreleaser/goreleaser-action from 6 to 7
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 6 to 7.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](https://github.com/goreleaser/goreleaser-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-23 22:35:41 +00:00
Ben McClelland
757c4146aa Merge pull request #1890 from versity/ben/maxlerebourg-fix-ui
fix: make webui sidebar responsive on mobile
2026-02-23 13:16:59 -08:00
Ben McClelland
5298f09373 Merge pull request #1883 from versity/ben/gateways-config
feat: add cli options to specify webui gateway/admin listing
2026-02-23 12:34:33 -08:00
Ben McClelland
ab80ac6e26 Merge pull request #1876 from versity/sis/create-bucket-response
feat: adds `Location`, `x-amz-bucket-arn` response headers in CreateBucket
2026-02-23 12:34:05 -08:00
maxlerebourg
3d5663655f fix: make webui sidebar responsive on mobile
On small screens the sidebar now collapses out of view by default,
replaced by a visible toggle button that slides it back in. Without
this, the sidebar occupied the full screen width on phones and tablets,
leaving no room for page content.

Co-authored-by: Ben McClelland <ben.mcclelland@versity.com>
2026-02-23 12:11:53 -08:00
Ben McClelland
f8f00aecca Merge pull request #1862 from versity/test/rest_cors
test: REST CORS commands - initial checks
2026-02-23 11:52:47 -08:00
Ben McClelland
e7a1231e77 feat: add cli options to specify webui gateway/admin listing
New cli options added:
webui-gateways - override auto-detected S3 gateway URLs for WebUI
webui-admin-gateways - override auto-detected admin gateway URLs
 for WebUI

These also accept env vars VGW_WEBUI_GATEWAYS and
VGW_WEBUI_ADMIN_GATEWAYS for the options.

When setting these, this will override the url auto-detection for
the webui service urls dropdown options. By default, the gateway
auto-detects URLs based on the configured port settings. Use these
options to specify custom URLs when the auto-detected values are
incorrect (e.g., when running behind a reverse proxy or load
balancer). Multiple URLs can be specified with repeated options
or a comma-separated list with the environment variables.
for example:
--webui-gateways https://s3.example.com \
--webui-gateways http://192.168.1.100:7070
or
VGW_WEBUI_GATEWAYS=https://s3.example.com,http://192.168.1.100:7070

The gateway will validate the provided URLs with warnings for any
invalid URL specified. The gateway will terminate if these options
are set but contain no valid URLs.

Also added sorting to the auto-detected URLs so that localhost
URLs will be last in the list, since these will not likely work
on remote systems. The specified lists when provided are left
in the order they are specified to allow admins to determine
dropdown list ordering.

Fixes #1851
2026-02-21 11:35:01 -08:00
niksis02
7fb3dedecc feat: adds Location, x-amz-bucket-arn response headers in CreateBucket
Closes #1873
2026-02-20 13:02:51 +04:00
Luke McCrone
5fc7357a03 test: REST CORS - initial tests 2026-02-19 20:19:05 -03:00
Ben McClelland
a81f9e5152 Merge pull request #1871 from versity/sis/create-bucket-private-canned-acl
fix: correct private canned ACL behavior on bucket creation
2026-02-18 09:55:36 -08:00
Ben McClelland
ac2b36e9c9 Merge pull request #1865 from versity/sis/obj-default-content-type
fix: fixes object default Content-Type
2026-02-18 09:31:57 -08:00
Ben McClelland
c1e0ce9457 Merge pull request #1843 from versity/ben/multi-ports
feat: add multi-address listener for s3/admin/webui
2026-02-18 09:31:24 -08:00
niksis02
f1577fd00b fix: correct private canned ACL behavior on bucket creation
Fixes #1869

Generally, when object ownership is not explicitly specified during bucket creation, it defaults to `BucketOwnerEnforced`. With `BucketOwnerEnforced`, ACLs are disabled and any attempt to set one results in an `InvalidBucketAclWithObjectOwnership` error.

However, there is an edge case. When the `private` canned ACL is used during bucket creation—which is effectively the default ACL for all buckets—`BucketOwnerEnforced` is still permitted. Moreover, if no explicit object ownership is specified together with the `private` canned ACL, the ownership defaults to `BucketOwnerPreferred`.

This fix also resolves the issue with rclone bucket creation, since rclone sends `x-amz-acl: private` by default:

```
rclone mkdir vgw:test
```
2026-02-18 20:32:05 +04:00
Ben McClelland
599ab1b743 feat: add multi-address listener for s3/admin/webui
This allows specifying the following options more than once:
port, admin-port, webui

or using a comma-separated list for the env vars:
e.g., VGW_PORT=:7070,:8080,localhost:9090

This will also expand multiple interfaces from hostnames, for example
"localhost" in this case would resolve to both IPv4 and IPv6 interfaces:
localhost has address 127.0.0.1
localhost has IPv6 address ::1

This updates the banner to reflect all of the listening interfaces/ports,
and starts the service listener on all requested interfaces/ports.

Fixes #1761
2026-02-17 14:16:43 -08:00
niksis02
46bcc8af35 fix: fixes object default Content-Type
Fixes #1849

If no `Content-Type` is provided during object upload, S3 defaults it to `application/octet-stream`. This behavior was missing in the gateway, causing backends to persist an empty `Content-Type`, which Fiber then overrides with its default `text/plain`. The behavior has now been corrected for the object upload operations: `PutObject`, `CreateMultipartUpload`, and `CopyObject`.
2026-02-18 01:44:52 +04:00
Ben McClelland
919436d473 Merge pull request #1854 from versity/sis/posix-rate-limiter
feat: add posix concurrency-limiter
2026-02-17 10:25:16 -08:00
Ben McClelland
c8bd4b3716 Merge pull request #1848 from versity/sis/fiber-rate-limiter
feat: adds fiber max connections and in-flight requests limiter
2026-02-17 10:23:29 -08:00
niksis02
4b11f540cb feat: add posix concurrency-limiter
Closes #1815

Implements posix actions concurrency limiter. Since posix actions perform filesystem-heavy syscalls, a semaphore-based limiter is introduced to cap the maximum number of concurrent posix actions. When the limit is reached, additional action calls block until a slot becomes available.

For internal posix calls, the `no_acquire_slot` context key is used to prevent acquiring the limiter multiple times within a single action (e.g., PutObject internally calling PutObjectLegalHold).

The posix concurrency limit can be configured via the gateway posix subcommand flag (--concurrency) or the environment variable `VGW_POSIX_CONCURRENCY`. The default value is `5000`.
2026-02-17 14:59:32 +04:00
niksis02
f7814adcf5 feat: adds fiber max connections and in-flight requests limiter
This is part of the thread exhaustion issue (#1815).

This PR introduces:

* A **maximum Fiber HTTP connections limit**
* A middleware that enforces a **hard limit on in-flight HTTP requests**

When the in-flight request limit is reached, the middleware returns an **S3-compatible `503 SlowDown`** error.

The same mechanism is implemented for the **admin server** (both max connections and max in-flight requests).

All limits are configurable via **CLI flags** and **environment variables**, for both the `s3api` server and the `admin` server.

---

| Setting         | CLI Flag            | Alias | Environment Variable  | Default |
| --------------- | ------------------- | ----- | --------------------- | ------- |
| Max Connections | `--max-connections` | `-mc` | `VGW_MAX_CONNECTIONS` | 250000  |
| Max Requests    | `--max-requests`    | `-mr` | `VGW_MAX_REQUESTS`    | 100000  |

---

| Setting         | CLI Flag                  | Alias  | Environment Variable        | Default |
| --------------- | ------------------------- | ------ | --------------------------- | ------- |
| Max Connections | `--admin-max-connections` | `-amc` | `VGW_ADMIN_MAX_CONNECTIONS` | 250000  |
| Max Requests    | `--admin-max-requests`    | `-amr` | `VGW_ADMIN_MAX_REQUESTS`    | 100000  |
2026-02-17 12:20:54 +04:00
Ben McClelland
87fc640213 Merge pull request #1861 from versity/ben/fix-system-workflow
chore: fix warning in system.yml github workflow
2026-02-16 14:33:01 -08:00
Ben McClelland
930e337719 Merge pull request #1860 from versity/ben/readme
chore: update readme for testing overview
2026-02-16 14:13:52 -08:00
Ben McClelland
4264d481ac Merge pull request #1859 from versity/dependabot/go_modules/dev-dependencies-ecbd0c0999
chore(deps): bump github.com/clipperhouse/uax29/v2 from 2.6.0 to 2.7.0 in the dev-dependencies group
2026-02-16 14:13:32 -08:00
Ben McClelland
4fa7d38e56 chore: fix warning in system.yml github workflow
The system.yml file was giving this warning:
Context access might be invalid: SAFE_RUN_SET

The warning occurs because this was trying to access env.SAFE_RUN_SET
in a with: key of an action, but GitHub Actions has restrictions on where
context variables can be accessed.

The env context isn't always guaranteed to be available in the with: key
of actions, especially when it depends on runtime values set in previous
steps.

The recommended fix is to change from $GITHUB_ENV to $GITHUB_OUTPUT
for this case.
2026-02-16 14:00:58 -08:00
Ben McClelland
dc0572bf42 chore: update readme for testing overview 2026-02-16 13:51:22 -08:00
dependabot[bot]
6e9f0db0c7 chore(deps): bump github.com/clipperhouse/uax29/v2
Bumps the dev-dependencies group with 1 update: [github.com/clipperhouse/uax29/v2](https://github.com/clipperhouse/uax29).


Updates `github.com/clipperhouse/uax29/v2` from 2.6.0 to 2.7.0
- [Release notes](https://github.com/clipperhouse/uax29/releases)
- [Commits](https://github.com/clipperhouse/uax29/compare/v2.6.0...v2.7.0)

---
updated-dependencies:
- dependency-name: github.com/clipperhouse/uax29/v2
  dependency-version: 2.7.0
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-16 21:40:05 +00:00
Ben McClelland
c9198846d5 Merge pull request #1858 from versity/ben/go-mod-tidy
chore: cleanup go.mod with go mod tidy
2026-02-16 13:38:15 -08:00
Ben McClelland
3f2de08620 chore: cleanup go.mod with go mod tidy 2026-02-16 12:58:49 -08:00
Ben McClelland
a420d8b340 Merge pull request #1856 from versity/sis/error-response-content-type
fix: adds application/xml Content-Type to error responses
2026-02-16 12:53:26 -08:00
Ben McClelland
107f2b3ae3 Merge pull request #1850 from versity/sis/internal-error-debug-logger
fix: replace `debuglogger.Logf("Internal Error, %v", err)` with `debuglogger.InternalError(err)`
2026-02-16 12:25:57 -08:00
niksis02
2232efd328 fix: adds application/xml Content-Type to error responses
Fixes #1852
Fixes #1821

Fiber used to return the `text/plain` default `Content-Type` for error responses, because it wasn't explicitly set. Now for all error responses the `application/xml` content type is set.
2026-02-16 21:54:11 +04:00
niksis02
68755ca700 fix: replace debuglogger.Logf("Internal Error, %v", err) with debuglogger.InternalError(err) 2026-02-13 21:03:58 +04:00
Ben McClelland
f782bbcdce Merge pull request #1841 from versity/test/templates
test: test for not-implemented content-type, add first template test
2026-02-11 15:08:22 -08:00
Luke McCrone
e810d4204d test: not-implemented type test, first template usage 2026-02-11 16:52:20 -03:00
Andrii Bratanin
9c212997dc feat: allow anonymous access for s3proxy backend
* Update client.go to support anonymous S3 access

* Update s3.go to make access and secret parameters optional

* Update example.conf for more clear S3 access and secret usage

Fixes #1836
2026-02-11 11:03:02 -08:00
Ben McClelland
a9043041c9 Merge pull request #1829 from versity/dependabot/go_modules/dev-dependencies-93e58d7d82
chore(deps): bump the dev-dependencies group with 7 updates
2026-02-11 11:00:57 -08:00
Ben McClelland
3e26175265 feat: replace aws-sdk-go-v2 s3 manager with transfermanager
The latest version of the go sdk has deprecate the s3 manager in
favor of the new transfermanager. This updates to the new
transfermanager functionality for the two places we were using
the manager, iam s3 and integration tests.

This also removes the pinning of nats nkeys since they have fixed
the tags in their repo now. And general cleanup of the go.mod.
2026-02-11 09:58:15 -08:00
dependabot[bot]
09544283c7 chore(deps): bump the dev-dependencies group with 7 updates
Bumps the dev-dependencies group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [golang.org/x/sys](https://github.com/golang/sys) | `0.40.0` | `0.41.0` |
| [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) | `1.21.1` | `1.22.0` |
| [github.com/clipperhouse/uax29/v2](https://github.com/clipperhouse/uax29) | `2.5.0` | `2.6.0` |
| [github.com/klauspost/compress](https://github.com/klauspost/compress) | `1.18.3` | `1.18.4` |
| [golang.org/x/crypto](https://github.com/golang/crypto) | `0.47.0` | `0.48.0` |
| [golang.org/x/net](https://github.com/golang/net) | `0.49.0` | `0.50.0` |
| [golang.org/x/text](https://github.com/golang/text) | `0.33.0` | `0.34.0` |


Updates `golang.org/x/sys` from 0.40.0 to 0.41.0
- [Commits](https://github.com/golang/sys/compare/v0.40.0...v0.41.0)

Updates `github.com/aws/aws-sdk-go-v2/feature/s3/manager` from 1.21.1 to 1.22.0
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.21.1...v1.22.0)

Updates `github.com/clipperhouse/uax29/v2` from 2.5.0 to 2.6.0
- [Release notes](https://github.com/clipperhouse/uax29/releases)
- [Commits](https://github.com/clipperhouse/uax29/compare/v2.5.0...v2.6.0)

Updates `github.com/klauspost/compress` from 1.18.3 to 1.18.4
- [Release notes](https://github.com/klauspost/compress/releases)
- [Commits](https://github.com/klauspost/compress/compare/v1.18.3...v1.18.4)

Updates `golang.org/x/crypto` from 0.47.0 to 0.48.0
- [Commits](https://github.com/golang/crypto/compare/v0.47.0...v0.48.0)

Updates `golang.org/x/net` from 0.49.0 to 0.50.0
- [Commits](https://github.com/golang/net/compare/v0.49.0...v0.50.0)

Updates `golang.org/x/text` from 0.33.0 to 0.34.0
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.33.0...v0.34.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.41.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager
  dependency-version: 1.22.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: github.com/clipperhouse/uax29/v2
  dependency-version: 2.6.0
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: github.com/klauspost/compress
  dependency-version: 1.18.4
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
- dependency-name: golang.org/x/crypto
  dependency-version: 0.48.0
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: golang.org/x/net
  dependency-version: 0.50.0
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: golang.org/x/text
  dependency-version: 0.34.0
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-11 08:23:08 -08:00
Ben McClelland
f2daa0ad48 Merge pull request #1840 from versity/sis/webui-favicon
feat: add favicon to all pages in webui
2026-02-11 08:19:14 -08:00
Ben McClelland
3856f99904 Merge pull request #1839 from versity/sis/deleteobject-if-match-etag-quotes
fix: fixes DeleteObject if-match quoted comparison
2026-02-11 08:18:35 -08:00
Ben McClelland
3219eb76e6 Merge pull request #1834 from versity/ben/copy-source-decoding
fix: CopyObject with URL-encoded special chars
2026-02-11 08:13:16 -08:00
niksis02
fd0c9dfbfa feat: add favicon to all pages in webui
Adds versity favicon to all web pages in webui.
2026-02-11 19:46:01 +04:00
niksis02
89aa822a40 fix: fixes DeleteObject if-match quoted comparison
Fixes #1835

If-Match in DeleteObject is a precondition header that compares the client-provided ETag with the server-side ETag before deleting the object. Previously, the comparison failed when the client sent an unquoted ETag, because server ETags are stored with quotes. The implementation now trims quotes from both the input ETag and the server ETag before comparison to avoid mismatches. Both quoted and unquoted ETags are valid according to S3.
2026-02-11 16:45:36 +04:00
Ben McClelland
e702a4860a fix: CopyObject with URL-encoded special chars
CopyObject was failing with NoSuchKey when source keys contained special
characters like {} or spaces. The X-Amz-Copy-Source header is URL-encoded
by clients, but ParseCopySource wasn't decoding before filesystem access.

Added url.QueryUnescape() to properly decode bucket and object names,
fixing copy operations for keys with special characters.

Fixing this also uncovered an errors with azure blob url encoding with
similar special character handling. Added this fix in for the integration
tests to pass.

Fixes #1832
Fixes #1637
2026-02-10 14:55:18 -08:00
Ben McClelland
a4323d5338 Merge pull request #1831 from versity/dependabot/github_actions/actions/download-artifact-7 2026-02-10 01:55:54 -08:00
dependabot[bot]
d4ea895a9c chore(deps): bump actions/download-artifact from 4 to 7
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-10 00:12:44 +00:00
Ben McClelland
76cb616b96 Merge pull request #1830 from versity/dependabot/github_actions/actions/upload-artifact-6
chore(deps): bump actions/upload-artifact from 4 to 6
2026-02-09 16:11:39 -08:00
Ben McClelland
afbea9f878 Merge pull request #1828 from versity/ben/readme-updates
chore: update README.md to highlight new web gui feature
2026-02-09 16:10:57 -08:00
dependabot[bot]
790bac2b3d chore(deps): bump actions/upload-artifact from 4 to 6
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-09 23:57:05 +00:00
Ben McClelland
af76584a9d chore: update README.md to highlight new web gui feature 2026-02-09 15:36:54 -08:00
Ben McClelland
7f7b804958 Merge pull request #1827 from versity/ben/webgui-object-lock-md5
fix: webui md5 missing error when enabling directory object lock
v1.2.0
2026-02-09 13:56:22 -08:00