Commit Graph
100 Commits
Author SHA1 Message Date
Chris Lu 92800c31a2 adjust logs and errors 2026-01-27 07:45:24 -08:00
Chris Lu c5b53397c6 templ 2026-01-26 11:38:18 -08:00
Chris Lu 5ba0db7af4 Merge branch 'origin/master' into master
Resolved merge conflicts in:
- weed/admin/static/js/modal-alerts.js: Adopted incoming improvements and HTML support.
- weed/admin/view/app/collection_details.templ: Switched to showAlert info type.
- weed/admin/view/app/file_browser.templ: Used descriptive delete message.
- weed/admin/view/app/maintenance_workers.templ: Used encoding and headers in pauseWorker.
- weed/admin/view/app/object_store_users.templ: Restored accidentally deleted delete functions and used encodeURIComponent.
- weed/admin/view/app/policies.templ: Standardized on showAlert and descriptive confirmations.

Regenerated all templ files.
2026-01-26 11:37:12 -08:00
Chris Lu 759a6cd345 Merge branch 'fix/chrome-dialog-modal-approach' 2026-01-25 23:21:23 -08:00
Chris Lu 7e3bb4016e Fix syntax error in object_store_users.templ - remove duplicate closing braces 2026-01-25 23:18:40 -08:00
Chris Lu 1e09950ea7 Upgrade Bootstrap from 5.3.2 to 5.3.8 2026-01-25 23:12:27 -08:00
Chris Lu 74c7b10bc7 Fix Chrome dialog auto-dismiss with Bootstrap modals
- Add modal-alerts.js library with Bootstrap modal replacements
- Replace all 15 confirm() calls with showConfirm/showDeleteConfirm
- Auto-override window.alert() for all alert() calls
- Fixes Chrome 132+ aggressively blocking native dialogs
2026-01-25 23:09:14 -08:00
Chris Lu 31a1c87db0 fix compilation 2026-01-25 22:07:12 -08:00
Chris Lu 533650579d credential/filer_etc: improve migration merge logic 2026-01-25 13:53:48 -08:00
Chris Lu 74b5c57dcf credential/filer_etc: migrate to multi-file identity storage 2026-01-25 13:48:46 -08:00
Chris Lu 5a0c761976 Merge branch 'master' of https://github.com/seaweedfs/seaweedfs 2026-01-24 13:43:28 -08:00
Chris Lu b40551f960 helm: seaweedfs admin should not allow setting multiple admin servers 2026-01-24 13:43:08 -08:00
Chris Lu d3f79d4c38 Update detection.go 2026-01-23 21:38:51 -08:00
Chris Lu 57a16b0b87 Improve error handling in GetObjectStoreUsers per PR review 2026-01-23 20:34:39 -08:00
Chris Lu e559b8df37 Refactor Admin UI to use unified IAM storage and add Shutdown hook 2026-01-23 20:29:21 -08:00
Chris Lu 25a4691135 Update store_ec_recovery_test.go 2026-01-23 16:38:36 -08:00
Chris Lu afbe52f262 cleanup 2026-01-23 12:46:10 -08:00
Chris Lu 67b35757d7 Delete reproduce_issue_s3.sh 2026-01-23 12:35:23 -08:00
Chris Lu a5474c30d1 Merge branch 'master' of https://github.com/seaweedfs/seaweedfs 2026-01-22 22:18:49 -08:00
Chris Lu c8909cd031 Create reproduce_issue_s3.sh 2026-01-22 18:19:02 -08:00
Chris Lu 2e9a7e13e2 cast i to int64 first, ensuring the calculation happens in 64-bit space
fix https://github.com/seaweedfs/seaweedfs/issues/8086
2026-01-22 14:05:45 -08:00
Chris Lu 16c8aac7c9 minor 2026-01-21 13:05:28 -08:00
Chris Lu 3f879b8d2b copy the aws keys 2026-01-20 18:12:32 -08:00
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