Commit Graph
15 Commits
Author SHA1 Message Date
niksis02 4756b4d236 feat: add STS web identity federation, IAM policy Condition support, and access control enforcement
Implements the `AssumeRoleWithWebIdentity` and `GetCallerIdentity` STS actions, letting callers exchange an external OIDC token for temporary credentials scoped to an IAM role. Token handling covers JWT claim parsing, issuer/audience resolution (including `azp` override semantics), JWKS fetching and caching with `singleflight`-deduplicated refresh, and rate-limited forced refresh on unrecognized `kid` values. OIDC provider thumbprint fetching now performs a real TLS handshake verified against the system trust store and the provider hostname (previously `InsecureSkipVerify`), since the observed certificate is persisted as a long-lived trust anchor rather than used once and discarded; all discovery-document and JWKS fetches go through an SSRF-safe HTTP client with bounded redirects and response size.

Adds policy `Condition` block evaluation, supporting `String`, `Numeric`, `Date`, `Bool`, `BinaryEquals`, and `IpAddress` operators along with their `IfExists`/`Not` variants and `ForAllValues`/`ForAnyValues` set qualifiers, plus policy variable substitution (e.g. `${aws:username}`) in supported operators. Adds identity-based inline policy evaluation and a new IAM authorization middleware that authorizes each request against action, resource, and condition context together, applying the session-policy-intersects-role-policy semantics for assumed-role sessions.

Adds a new debug logger `--log-level` flag (`silent`/`debug`/`unsafe`), along with a tree-based XML masker that redacts secrets and tokens at the property level in logged request/response bodies instead of skipping the whole body. The old `--debug/VGW_DEBUG` flag is kept as a deprecated alias for `--log-level=debug`, printing a console warning that points users at `--log-level` for finer-grained control.

Fixes a Vault storage bug where CAS (check-and-set) writes always read the current document version as 0 because `kvVersion` asserted metadata as `float64` while the Vault client actually returns `json.Number`, causing every write past the first to be rejected as a concurrent modification. Also adds a constant-time `SecureCompare` for signature/token comparisons in sigv4 auth.

Adds an integration test suite (`iam_access_control.go`) covering IAM access control across user, role, and session identities.
2026-08-15 17:49:00 +04:00
Ben McClelland 1b8147c19c feat: add helm chart admin and webui ingress support
This change is needed to expose the admin API and WebUI through standard
Kubernetes Ingress resources instead of only through service access or Gateway
API routes. It adds configurable ingress blocks in values.yaml, and renders
dedicated ingress objects for admin and webui when enabled.

Also update corsAllowOrigin comment.

Fixes #2251
Fixes #2252
2026-07-16 11:10:58 -07:00
Ben McClelland 568d4a25cc feat: add chart sidecar and versioning directory support
The Helm chart now supports dedicated sidecar metadata and versioning
directories alongside the primary data directory. For POSIX deployments,
users can configure a sidecar metadata path without forcing backend flags
through a single args string, and POSIX or ScoutFS deployments can expose
a persistent versioning directory through the chart as well.

This makes the chart usable for filesystem-backed setups that need
sidecar metadata storage or object versioning support, while keeping the
configuration aligned with the existing persistent data and IAM layout.
The chart version is bumped to reflect the new deployment behavior.

Fixes #2204
Fixes #2216
2026-07-03 14:51:20 -07:00
Mart-Kuc 4599daafb1 feat: Add 'topologySpreadConstraints' 2026-06-18 09:02:40 +02:00
Peter Dahlberg 27e90ce86e feat(helm): Make it possible to specify deployment strategy 2026-06-15 14:20:55 +02:00
Marc Singerandniksis02 375c2764d5 Add website integration tests and remove NotImplemented stubs
Replace PutBucketWebsite, GetBucketWebsite, DeleteBucketWebsite
NotImplemented test stubs with comprehensive integration tests covering:
- non-existing bucket errors
- validation (empty suffix, suffix with slash, invalid protocol, mutual
  exclusion of RedirectAllRequestsTo and IndexDocument)
- successful put/get round-trips for both index+error and redirect-all configs
- delete idempotency and verification

Signed-off-by: Marc Singer <marc@singer.gg>

Add error document serving, routing rules, and integration tests

Implement Features 1 and 2 of S3 static website hosting:

- WebsiteErrorDocument controller wrapper intercepts 4xx errors on
  website-enabled buckets and serves the configured error document or
  evaluates post-request routing rules (error code match redirects)
- ResolveWebsiteIndex middleware now caches parsed WebsiteConfiguration
  in context, handles RedirectAllRequestsTo, evaluates pre-request
  routing rules (key prefix match redirects), and rewrites directory
  keys for index document
- MatchPreRequestRule and MatchPostRequestRule methods on
  WebsiteConfiguration for routing rule evaluation
- 14 unit tests for routing rule matching
- 7 integration tests covering error document, routing rules,
  redirect-all, and index document behavior

Signed-off-by: Marc Singer <marc@singer.gg>

Add separate website hosting endpoint with virtual-host routing

Signed-off-by: Marc Singer <marc@singer.gg>

Support catch-all mode for website endpoint when --website-domain is omitted

Signed-off-by: Marc Singer <marc@singer.gg>
2026-06-10 12:41:51 +04:00
686f58c9be chart/README.md hostPath usage warning
Co-authored-by: Jack Henschel <jackdev@mailbox.org>
2026-03-13 22:51:25 +07:00
shoce 755029db26 feat: add persistence.hostPath to Helm chart 2026-03-13 02:37:31 +07:00
Jack HenschelandBen McClelland b44952d7aa fix: allow Helm chart users to use their own, existing PVC
closes https://github.com/versity/versitygw/issues/1957
2026-03-10 12:31:56 -07:00
Anthony Clerici b15470732d fix(chart): fix multidoc separator when 2 routes are enabled 2026-03-06 21:21:49 -08:00
Ben McClellandandGitHub 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
Jack Henschel b47ef4e05d feat(chart): enable persistence by default, discuss more in README 2026-03-06 17:35:00 +01: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
Jack Henschel af1a99c4dc feat: add Helm chart for versitygw 2026-03-04 21:02:33 +01:00