Commit Graph
100 Commits
Author SHA1 Message Date
Chris Lu 3d1f710485 remove the .versions directory when all versions are deleted 2026-01-20 18:08:40 -08:00
Chris Lu b0a1a503a9 Merge branch 'master' of https://github.com/seaweedfs/seaweedfs 2026-01-18 20:41:33 -08:00
Chris Lu bfd267bfd7 removing the problematic Microsoft package sources 2026-01-18 20:41:27 -08:00
Chris Lu bc853bdee5 4.07 2026-01-18 15:48:09 -08:00
Chris Lu ce8e2db893 Merge branch 'master' of https://github.com/seaweedfs/seaweedfs 2026-01-18 15:04:59 -08:00
Chris Lu 3e5d34dd67 skip md5 validation if Content-MD5 is not provided 2026-01-18 15:04:56 -08:00
Chris Lu ce23c4fca7 missing changes 2026-01-17 23:15:33 -08:00
Chris Lu b8dc8d12f2 ErrNoSuchKey should not be reported as an error in the logs 2026-01-17 23:07:49 -08:00
Chris Lu 1dedc8daf9 adjust logs 2026-01-17 18:40:48 -08:00
Chris Lu df3f308740 s3api: use updateAuthenticationState helper and clarified log message 2026-01-14 13:14:14 -08:00
Chris Lu e11c0425f8 s3api: extract updateAuthenticationState helper method 2026-01-14 13:13:08 -08:00
Chris Lu 39c4155ba6 s3api: remove redundant isAuthEnabled assignment in constructor 2026-01-14 13:12:49 -08:00
Chris Lu 851b92fe35 Implement optional path-prefix and method scoping for Filer HTTP JWT 2026-01-12 15:57:18 -08:00
Chris Lu 6b0eade6d4 storage: upgrade protobuf API in store_state.go 2026-01-12 10:50:47 -08:00
Chris Lu 587e782feb storage: use non-blocking send to StateUpdateChan 2026-01-12 10:50:46 -08:00
Chris Lu 2b5e951390 use context.WithoutCancel to avoid context cancellation when the client connection is closed 2026-01-11 11:59:44 -08:00
Chris Lu ce6e9be66b 4.06 2026-01-10 12:08:16 -08:00
Chris Lu 1ea6b0c0d9 cleanup: deduplicate environment variable credential loading
Previously, `weed mini` logic duplicated the credential loading process
by creating a temporary IAM config file from environment variables.
`auth_credentials.go` also had fallback logic to load these variables.

This change:
1. Updates `auth_credentials.go` to *always* check for and merge
   AWS environment variable credentials (`AWS_ACCESS_KEY_ID`, etc.)
   into the identity list. This ensures they are available regardless
   of whether other configurations (static file or filer) are loaded.
2. Removes the redundant file creation logic from `weed/command/mini.go`.
3. Updates `weed mini` user messages to accurately reflect that
   credentials are loaded from environment variables in-memory.

This results in a cleaner implementation where `weed/s3api` manages
all credential loading logic, and `weed mini` simply relies on it.
2026-01-08 20:35:37 -08:00
Chris Lu 7f1182472a fix: enable dual loading of static and dynamic IAM configuration
Refactored `NewIdentityAccessManagementWithStore` to remove mutual
exclusivity between static (file-based) and dynamic (filer-based)
configuration loading.

Previously, if a static config configuration was present (including the
legacy `IamConfig` option used by `weed mini`), it prevented loading
users from the filer.

Now, the system loads the static configuration first (if present), and
then *always* attempts to merge in the dynamic configuration from the
filer. This ensures that:
1. Static users (e.g. from `weed mini` env vars or `-s3.config`) are loaded and protected.
2. Dynamic users (e.g. created via Admin UI and stored in Filer) are also loaded and available.
2026-01-08 20:22:04 -08:00
Chris Lu 451b897d56 fix: support loading static config from IamConfig option for mini mode
`weed mini` sets the `-s3.iam.config` flag instead of `-s3.config`,
which populates `S3ApiServerOption.IamConfig`.

Previously, `NewIdentityAccessManagementWithStore` only checked
`option.Config`. This caused `weed mini` generated credentials (written
to a temp file passed via IamConfig) to be ignored, breaking S3 access
in mini mode even when environment variables were provided.

This change ensures we try to load the configuration from `IamConfig`
if `Config` is empty, restoring functionality for `weed mini`.
2026-01-08 20:17:33 -08:00
Chris Lu 48ded6b965 fix: allow environment variable fallback when filer config is empty
Fixed regression where AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
environment variables were not being loaded as fallback credentials.

The issue was that configLoaded was set to true when filer call
succeeded, even if it returned an empty configuration. This blocked
the environment variable fallback logic.

Now only set configLoaded = true when we actually have loaded
identities, allowing env vars to work correctly in mini mode and
other scenarios where filer config is empty.
2026-01-08 20:11:57 -08:00
Chris Lu 6bf0c16862 fix admin copy text functions 2026-01-08 18:44:36 -08:00
Chris Lu 4ba89bf73b adjust log level 2026-01-08 10:57:59 -08:00
Chris Lu bd237999bb weed mini can optionally skip s3 2026-01-08 10:05:42 -08:00
Chris Lu 5a3aade445 less logs 2026-01-08 10:00:22 -08:00
Chris Lu f02e283ad2 add a nginx with ssl for easier testing 2026-01-08 09:59:31 -08:00
Chris Lu d2f0d6c03b go mod 2026-01-05 17:56:11 -08:00
Chris Lu 21a871f3ad Merge branch 'master' of https://github.com/seaweedfs/seaweedfs 2026-01-04 11:40:49 -08:00
Chris Lu 0e9f433ec4 refactoring 2026-01-04 11:40:42 -08:00
Chris Lu 8269dc136d simplify 2026-01-04 11:26:21 -08:00
Chris Lu 0b5a65e00b avoid extra missing shard warning
fix https://github.com/seaweedfs/seaweedfs/issues/7956
2026-01-04 00:38:53 -08:00
Chris Lu 4d4b2e2d4a add debug messages 2026-01-02 17:15:51 -08:00
Chris Lu 7b20d7da3c Delete SSE-C_IMPLEMENTATION.md 2026-01-02 11:34:20 -08:00
Chris Lu fca0a38435 Update s3api_object_handlers.go 2026-01-02 11:19:29 -08:00
Chris Lu 87b71029f7 4.05 2026-01-01 20:39:22 -08:00
Chris Lu ade2e58cf4 refactoring 2026-01-01 19:20:59 -08:00
Chris Lu 998bcf2b3f classify grpc errors 2025-12-31 13:40:14 -08:00
Chris Lu f7f133166a adjust fuse logs 2025-12-31 13:04:05 -08:00
Chris Lu 60707f99d8 customizable adminServer 2025-12-31 12:02:16 -08:00
Chris Lu 8f182e68e8 Update README.md 2025-12-30 23:00:24 -08:00
Chris Lu 29a245052e tidy 2025-12-28 19:31:54 -08:00
Chris Lu e8baeb3616 s3api: Allow anonymous access to SOSAPI virtual objects
Enable discovery of SOSAPI capabilities without requiring credentials.

- Modify AuthWithPublicRead to bypass auth for SOSAPI objects if bucket exists
- Supports Veeam's initial discovery phase before full IAM setup
- Validates bucket existence to prevent information disclosure
2025-12-28 12:57:01 -08:00
Chris Lu a757ef77b1 s3api: Integrate SOSAPI handlers into GetObject and HeadObject
Add early interception for SOSAPI virtual objects in GetObjectHandler and HeadObjectHandler.

- Check for SOSAPI objects (.system-*/system.xml, .system-*/capacity.xml) before normal processing
- Delegate to handleSOSAPIGetObject and handleSOSAPIHeadObject when detected
- Ensures virtual objects are served without hitting storage layer
2025-12-28 12:56:51 -08:00
Chris Lu fba67ce0f0 s3api: Add SOSAPI core implementation and tests
Implement Smart Object Storage API (SOSAPI) support for Veeam integration.

- Add s3api_sosapi.go with XML structures and handlers for system.xml and capacity.xml
- Implement virtual object detection and dynamic XML generation
- Add capacity retrieval via gRPC (to be optimized in follow-up)
- Include comprehensive unit tests covering detection, XML generation, and edge cases

This enables Veeam Backup & Replication to discover SeaweedFS capabilities and capacity.
2025-12-28 12:56:41 -08:00
Chris Lu f88b9a643d add one example 2025-12-28 11:39:06 -08:00
Chris Lu 694218dc13 Merge branch 'master' of https://github.com/seaweedfs/seaweedfs 2025-12-27 18:37:55 -08:00
Chris Lu a3c090e606 adjust layout 2025-12-27 18:37:53 -08:00
Chris Lu c688b69700 reduce logs 2025-12-26 13:26:25 -08:00
Chris Lu 95716a2f87 less verbose 2025-12-26 12:55:19 -08:00
Chris Lu 2b3ff3cd05 verbose mode 2025-12-26 12:42:00 -08:00
Chris Lu 1e3ace54a0 Merge branch 'master' of https://github.com/seaweedfs/seaweedfs 2025-12-24 11:06:56 -08:00
Chris Lu 71cc233fac add missing action 2025-12-24 11:06:53 -08:00
Chris Lu 8d75290601 4.04 2025-12-22 23:46:30 -08:00
Chris Lu 683e3d06a4 go mod tidy 2025-12-22 18:48:13 -08:00
Chris Lu aaa6de7712 Increase timeout from 5m to 10m for S3 HTTPS test workflow 2025-12-22 15:57:32 -08:00
Chris Lu 1dfda78e59 update doc 2025-12-21 12:49:05 -08:00
chrislu 4a764dbb37 fmt 2025-12-19 15:33:16 -08:00
chrislu 77a56c2857 adjust default concurrent reader and writer
related to https://github.com/seaweedfs/seaweedfs-csi-driver/pull/221
2025-12-19 13:27:00 -08:00
chrislu 9e9c97ec61 fix bucket link 2025-12-16 23:16:45 -08:00
chrislu 956c5a1626 s3: fix pagination by collecting all versions when keyMarker is set
When paginating with keyMarker, we must collect all versions first because
filtering happens after sorting. Previously, we limited collection to maxKeys+1
which caused us to miss versions beyond the marker when there were many versions
before it.
2025-12-16 00:15:36 -08:00
chrislu daa3af826f ci: fix stress tests by adding server start/stop 2025-12-16 00:02:00 -08:00
chrislu aff144f8b5 ci: run versioning stress tests on all PRs, not just master pushes 2025-12-15 23:42:50 -08:00
chrislu 9150d84eea test: use -master.peers=none for faster test server startup 2025-12-15 23:37:44 -08:00
chrislu 5dd34e3260 s3: fix ListObjectVersions pagination by implementing key-marker filtering
The ListObjectVersions API was receiving key-marker and version-id-marker
parameters but not using them to filter results. This caused infinite
pagination loops when clients tried to paginate through results.

Fix by adding filtering logic after sorting:
- Skip versions with key < keyMarker (already returned in previous pages)
- For key == keyMarker, skip versions with versionId >= versionIdMarker
- Include versions with key > keyMarker or (key == keyMarker and versionId < versionIdMarker)

This respects the S3 sort order (key ascending, versionId descending for same key)
and correctly returns only versions that come AFTER the marker position.
2025-12-15 23:35:55 -08:00
chrislu 26121c55c9 test: improve pagination stress test with QUICK_TEST option and better assertions 2025-12-15 23:23:50 -08:00
chrislu f517bc39fc test: fix nil pointer dereference and add debugging to pagination stress tests 2025-12-15 23:16:01 -08:00
chrislu 8236df1368 ci: enable pagination stress tests in GitHub CI
Add pagination stress tests (>1000 versions) to the S3 versioning stress
test job in GitHub CI. These tests run on master branch pushes to validate
that ListObjectVersions correctly handles objects with more than 1000
versions using pagination.
2025-12-15 23:11:24 -08:00
chrislu 0972a0acf3 test: add pagination stress tests for S3 versioning with >1000 versions 2025-12-15 23:06:57 -08:00
chrislu 44cd07f835 Update cluster_ec_volumes_templ.go 2025-12-15 20:51:27 -08:00
chrislu bcce8d164c 4.03 2025-12-15 01:06:55 -08:00
chrislu 8bdc4390a0 Update constants.go 2025-12-14 16:16:55 -08:00
chrislu f734b2d4bf Refactor: Extract common IAM logic into shared weed/iam package (#7747)
This resolves GitHub issue #7747 by extracting duplicated IAM code into
a shared package that both the embedded S3 IAM and standalone IAM use.

New shared package (weed/iam/):
- constants.go: Common constants (charsets, action strings, error messages)
- helpers.go: Shared helper functions (Hash, GenerateRandomString,
  GenerateAccessKeyId, GenerateSecretAccessKey, StringSlicesEqual,
  MapToStatementAction, MapToIdentitiesAction, MaskAccessKey)
- responses.go: Common IAM response structs (CommonResponse, ListUsersResponse,
  CreateUserResponse, etc.)
- helpers_test.go: Unit tests for shared helpers

Updated files:
- weed/s3api/s3api_embedded_iam.go: Use type aliases and function wrappers
  to the shared package, removing ~200 lines of duplicated code
- weed/iamapi/iamapi_management_handlers.go: Use shared package for constants
  and helper functions, removing ~100 lines of duplicated code
- weed/iamapi/iamapi_response.go: Re-export types from shared package for
  backwards compatibility

Benefits:
- Single source of truth for IAM constants and helpers
- Easier maintenance - changes only need to be made in one place
- Reduced risk of inconsistencies between embedded and standalone IAM
- Better test coverage through shared test suite
2025-12-14 16:08:56 -08:00
chrislu 1ee03b6411 fmt 2025-12-10 20:54:42 -08:00
chrislu 2188d1ccc5 fix object name 2025-12-10 12:50:48 -08:00
chrislu 1856eaca03 Update notification.toml 2025-12-08 11:09:59 -08:00
chrislu 95f6a2bc13 Added a complete webhook configuration example 2025-12-08 11:03:41 -08:00
chrislu 805950b401 4.02 2025-12-08 01:38:16 -08:00
chrislu e28629bb5f reduce minFreeSpacePercent to 1
addressing https://github.com/seaweedfs/seaweedfs/issues/7110#issuecomment-3622472545
2025-12-08 01:34:53 -08:00
chrislu dcc200fec0 Remove allowEmptyFolder from s3tests.yml workflow 2025-12-06 21:59:00 -08:00
chrislu 5167bbd2a9 Remove deprecated allowEmptyFolder CLI option
The allowEmptyFolder option is no longer functional because:
1. The code that used it was already commented out
2. Empty folder cleanup is now handled asynchronously by EmptyFolderCleaner

The CLI flags are kept for backward compatibility but marked as deprecated
and ignored. This removes:
- S3ApiServerOption.AllowEmptyFolder field
- The actual usage in s3api_object_handlers_list.go
- Helm chart values and template references
- References in test Makefiles and docker-compose files
2025-12-06 21:54:12 -08:00
chrislu 5dd2d44858 Update README.md 2025-12-05 19:52:43 -08:00
chrislu 8d110b29dd fmt 2025-12-04 10:40:01 -08:00
Chris Lu 1a67e6118e Set S3_ENDPOINT environment variable in CI workflow for tagging tests 2025-12-01 16:39:22 -08:00
Chris Lu 208d008fe3 Fix tagging test pattern to run our comprehensive tests instead of basic tests 2025-12-01 16:34:13 -08:00
Chris Lu ec41795594 Update s3-tagging-tests to use Makefile server management like other S3 tests 2025-12-01 16:22:51 -08:00
Chris Lu 5d50baad5a Fix port conflict in s3-tagging-tests CI job by changing volume port from 8084 to 8085 2025-12-01 16:16:01 -08:00
Chris Lu 60487e75f3 Fix port conflict in s3-tagging-tests CI job by changing volume port from 8084 to 8085 2025-12-01 16:08:48 -08:00
Chris Lu 1eafaecd70 Add comment to s3-tagging-tests job to trigger CI re-run 2025-12-01 15:47:19 -08:00
Chris Lu 310be2aece Fix CI workflow: remove cd weed since working directory is already set to weed 2025-12-01 15:43:32 -08:00
Chris Lu a33e5a9e6a Add S3 object tagging tests to CI workflow
- Modified test/s3/tagging/s3_tagging_test.go to use environment variables for configurable endpoint and credentials
- Added s3-tagging-tests job to .github/workflows/s3-go-tests.yml to run tagging tests in CI
- Tests will now run automatically on pull requests
2025-12-01 15:40:06 -08:00
Chris Lu 8c585a9682 Fix S3 object tagging issue #7589
- Add X-Amz-Tagging header parsing in putToFiler function for PUT object operations
- Store tags with X-Amz-Tagging- prefix in entry.Extended metadata
- Add comprehensive test suite for S3 object tagging functionality
- Tests cover upload tagging, API operations, special characters, and edge cases
2025-12-01 15:21:30 -08:00
chrislu 626954b76c unified builds 2025-11-27 23:13:51 -08:00
chrislu 755b1b55ff reduce dockerhub operations 2025-11-27 23:04:32 -08:00
chrislu 5734223b2b fix git checkout 2025-11-27 22:50:38 -08:00
chrislu 0064e37206 fix build issues 2025-11-27 22:50:29 -08:00
chrislu 487c0f92a9 fmt 2025-11-27 22:44:35 -08:00
Chris Lu 49f6edc001 build use https://mirror.gcr.io 2025-11-27 16:07:54 -08:00
Chris Lu 8102fb5642 Add Docker Hub registry mirror to avoid rate limits 2025-11-27 15:58:23 -08:00
Chris Lu 76b9611881 fix nil map 2025-11-27 15:06:37 -08:00
Chris Lu 50fb79be2b Merge branch 'master' of https://github.com/seaweedfs/seaweedfs 2025-11-27 14:50:49 -08:00