mirror of
https://github.com/rustfs/rustfs.git
synced 2026-11-30 20:57:35 +00:00
ac6253cf38
* fix(policy): scope NotAction Allow to named action families Confine Allow statements built from NotAction to the action families named in their exclusion list so S3 NotAction policies on wildcard or bucket resources cannot implicitly grant admin, STS, or KMS actions. Fail closed when both Action and NotAction are empty, preserve explicit Deny + NotAction reach across all action families, and preserve explicit admin NotAction coverage for sibling admin actions. Refs: rustfs/backlog#3321 * fix(policy,utils): eliminate exponential wildcard matching Replace recursive backtracking in wildcard matching (rustfs-policy and rustfs-utils) with iterative O(name.len())-space dynamic programming that collapses consecutive '*' wildcards and preserves allocation-free fast paths for literal and single-'*' patterns. Also cap versioning ExcludedPrefixes count (100) and byte length (1024) in validate_bucket_versioning_update as defense in depth. Refs: rustfs/backlog#3318 * fix(policy): prefer parent over raw sub for aws:userid variable Share a single resolve_userid_values helper between VariableResolver::resolve and resolve_multiple that prefers the issuer-scoped parent claim over raw sub, aligning the ${aws:userid} policy variable with the aws:userid condition key derived in auth facts while retaining sub as a fallback when parent is absent. Refs: rustfs/backlog#3339 * fix(policy): treat anonymous-matching principals as public Add Principal::is_public() matching either '*' or the empty anonymous account '' through the same wildcard matcher used during request authorization, and switch execute_put_bucket_policy and execute_get_bucket_policy_status to use it so empty and leading-'?' principals cannot bypass BlockPublicPolicy or evade public status classification. Refs: rustfs/backlog#3357 * fix(s3select): restrict SQL functions to an explicit allowlist Replace unfiltered DataFusion default scalar, aggregate, and window UDF registration in SimpleFunctionMetadataManager with an explicit S3 Select allowlist, register allowlisted scalar aliases directly, and remove the session scalar-function fallback from MetadataProvider::get_function_meta. Wrap retained expanding scalar functions (concat, concat_ws, to_char) and any manually registered count-sized functions (repeat, lpad, rpad) with a pre-allocation result-size guard that also re-wraps scalar UDFs produced during expression simplification. Refs: rustfs/backlog#3317 * fix(s3select): bound SQL operator and nesting depth at parse Add BoundedRustFsDialect enforcing a per-parse infix/postfix operator budget (MAX_SELECT_OPERATORS) via Dialect::parse_infix returning ParserError::RecursionLimitExceeded, and wire it into both ExtParser::parse_sql and legacy_json_source_from_input. Also bound set-operation keyword counts before parsing (preventing deeply nested SetExpr chains from overflowing on drop) and bound nested field-access chains during statement preparation. Refs: rustfs/backlog#3319 * fix(s3select): bound uncompressed record sizes and decoding Apply RecordSizeTracker (MAX_SELECT_RECORD_BYTES) across uncompressed plain, ScanRange, and ScanRange header reads in EcObjectStore, recognizing CR, LF, and CRLF line endings for default CSV inputs without a custom RecordDelimiter. Bound session batch sizes and disable batch coalescing for CSV and JSON Lines, replace DataFusion's unbounded stock listing table scan with a byte-bounded, memory-pool-accounted DelimitedSelectTable, keep multi-record JSON Lines schema sampling within the session memory pool budget, and add a StreamFilterOutput physical optimizer rule so FilterExec streams filtered batches without re-coalescing. Refs: rustfs/backlog#3348 * fix(rpc): gate gRPC boot-epoch proofs on verified signatures Stop computing and attaching secret-keyed boot-epoch, replay-cache, and msgpack capability response proofs before gRPC authentication runs in RpcRequestPathService::call. Gate proof generation on an RpcSignatureVerified request marker raised by check_auth only after the internode HMAC signature has verified, including post-HMAC rejections (stale boot epoch, replay-scope retries, replay detection, and replay-cache/background admission resource exhaustion) required for cluster recovery. Verify the method-bound v2 HMAC signature before returning replay_scope_required in verify_tonic_rpc_signature_with_policy so unsigned, legacy-only, or forged callers never trigger a post-HMAC rejection reason or consume replay-cache capacity. Refs: rustfs/backlog#3326 * fix(keystone): namespace parent_user by Keystone user ID Set Credentials.parent_user in KeystoneAuthProvider::keystone_token_to_credentials to the namespaced Keystone identity (keystone:<user_id>, matching access_key) instead of the bare Keystone username. This prevents an external Keystone username from colliding with a local IAM user or the root access key in service-account ownership checks and the is-admin handler while keeping the username available in Credentials.name and claims["keystone_username"]. Update the keystone unit tests and HTTP/3 external stack test expectations, and add regression coverage verifying colliding usernames are never placed in parent_user. Refs: rustfs/backlog#3362 --------- Co-authored-by: Hauser Zhi <housemecn@gmail.com>
RustFS S3Select API - SQL Query Interface
AWS S3 Select compatible SQL query API for RustFS distributed object storage
📖 Documentation
· 🐛 Bug Reports
· 💬 Discussions
📖 Overview
RustFS S3Select API provides AWS S3 Select compatible SQL query capabilities for the RustFS distributed object storage system. For the complete RustFS experience, please visit the main RustFS repository.
✨ Features
- Standard SQL query support (SELECT, WHERE, GROUP BY, ORDER BY)
- Multiple data format support (CSV, JSON, Parquet, Arrow)
- Streaming processing for large files
- AWS S3 Select API compatibility
- Parallel query execution
- Predicate pushdown optimization
📚 Documentation
For comprehensive documentation, examples, and usage guides, please visit the main RustFS repository.
📄 License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
