* feat(vector): integrate S3 Vectors catalog and APIs Add scoped Vector resources, managed Lance storage, IAM checks, and Gateway REST JSON operations with compatibility and recovery tests. * fix(vector): adapt owned requests and preserve native quota errors * test(ci): exercise Vector KMS archive consumers * feat(vector): add maintenance and recovery workflows * test(multipart): assert typed quota refusal causes Verify the retained quota cause and its current and limit values alongside the existing refusal-order assertions. Remove the retired authentication compatibility entry after the main rebase. * fix(vector): move maintenance dispatch guard ownership Retain the namespace guard in the returned maintenance owner. Synchronize Gateway dependencies for corpus recording and format the existing audit test in its external module. * feat(vector): add shared pagination sessions * fix(vector): bound managed request and catalog futures * test(vector): adapt managed fixtures to Gateway request envelopes * test(vector): verify maintenance across uniform deployments * test: simplify SSE-C counting and Catalog fixture ownership * fix(test): propagate owned device validation errors * fix(auth): bound early authorization futures * feat(vector): complete resource pagination and bucket retirement * fix(vector): harden bucket lifecycle, retirement, authz, and layering Preserve continuous bucket incarnation fencing across Vector bucket Catalog parent initialization, map deleted-bucket races during DeleteVectorBucket to NotFoundException, and re-evaluate IAM, resource policies, and ABAC bucket tags inside the storage bucket lock across all five Vector bucket mutations. Scale used-bucket Catalog retirement proof, plan, and execution linearly across multi-resource multi-page histories, sweep uncommitted pre-authority page artifacts before rewriting authority records, enforce manifest completeness and immutable delete-intent source-copy identity, and allow same-name recreation over v4 deleted Vector tombstones. Make ListVectorBuckets and ListIndexes resilient to concurrent deletions with single-pass bucket authorization and bounded sparse-prefix scan budgets, preserve literal plus characters when decoding UntagResource tagKeys query parameters to match Gateway SigV4 canonicalization, and normalize operation-scoped Kms*Exception codes across all 21 S3 Vectors APIs. Extract ManagedLanceObjects into app::vector_usecase::managed_objects, inject background node admission into Vector maintenance startup to eliminate the app-composition cycle, and widen scripts/check_layer_dependencies.sh to detect inline reverse-layer crate paths while recording the 12 pre-existing non-Vector inline edges from main in scripts/layer-dependency-baseline.txt (backlog#1834) with zero Vector exemptions. * chore(vector): remove Batch 1 dead code and test debug residue * chore(vector): remove Batch 2 dead test code and gate test-only APIs * refactor(vector,iam): simplify dead branches and pass-through wrappers * fix(object,test): bound PutObject futures and cover reconciled routes * feat(vector,object,connect): activate S3 Vectors and fix CI regressions * test(object,vector): fix copy future size check and vector dispatch test
RustFS Policy - Policy Engine
Advanced policy engine and access control system for RustFS distributed object storage
📖 Documentation
· 🐛 Bug Reports
· 💬 Discussions
📖 Overview
RustFS Policy provides advanced policy engine and access control capabilities for the RustFS distributed object storage system. For the complete RustFS experience, please visit the main RustFS repository.
✨ Features
- AWS-compatible bucket policy engine
- Fine-grained resource-based access control
- Condition-based policy evaluation
- Policy validation and syntax checking
- Role-based access control integration
- Dynamic policy evaluation with context
Stored bucket tags in OPA input
When the OPA authorization plugin is enabled, IAM resolves the addressed bucket's stored tags before sending its decision request. Tags appear in the existing conditions map; no additional S3 calls or credentials are needed by OPA:
{
"input": {
"resource": { "bucket": "financial-reports", "object": "annual/report.parquet" },
"action": "s3:GetObject",
"context": {
"conditions": {
"ExistingBucketTag/department": ["finance"],
"ExistingBucketTag/environment": ["production"]
}
}
}
}
The example omits unchanged identity and context fields. Tag names and values
are case-sensitive. Values use single-element string arrays, including [""]
for an empty tag value. A simple resource predicate is:
package rustfs.example
import rego.v1
finance_bucket if {
input.context.conditions["ExistingBucketTag/department"] == ["finance"]
}
Combine this predicate with the policy's identity and action checks; tags do not
establish caller roles or grant access by themselves. Restrict PutBucketTagging
and DeleteBucketTagging separately when tags control access.
- Only server-resolved, stored tags populate
ExistingBucketTag/<key>. Incoming conditions in that namespace (including case variants and thes3:alias) are discarded before enrichment. Headers, claims, requested replacement tags and object tags cannot override it. - A confirmed missing bucket, or a bucket with no stored tags, contributes no bucket-tag conditions. New bucket creation therefore has no existing tags; a create request naming an existing bucket uses its stored tags. Bucketless requests, including STS and the global ListBuckets check, have no bucket tags.
- Bucket metadata lookup failures, unreadable tag XML, and ambiguous/incomplete tags fail closed, even if a separate bucket policy would allow the request. This applies to requests evaluated by OPA even if the policy does not inspect tags. Boolean IAM callers deny on a lookup error; S3 access checks propagate it.
- Object reads/writes, versions, listing and multipart checks use their addressed bucket. CopyObject and UploadPartCopy authorize source and destination with each bucket's own tags. Tag replacement/removal uses the existing stored state.
- ListBuckets retains its existing contract: a global
s3:ListAllMyBucketsallow lists all buckets. Otherwise, per-buckets3:ListBucket/s3:GetBucketLocationchecks carry each candidate's tags and can filter the result. - Resolution reuses the IAM storage instance's authoritative metadata reader and existing metadata cache/reload machinery, not a separate OPA cache. Local tag updates/removal update the local cache, and tag mutations wait for healthy-peer reload attempts before responding. Failed peer notification can leave that peer's cached tags stale until a later reload or distributed metadata refresh (normally every 15 minutes). This adds no stronger consistency barrier or partition-time revocation guarantee, and does not revoke in-flight requests.
This is an OPA input extension, not a new native IAM condition key. Native policy
evaluation, owner/anonymous handling, and existing authorization combination rules
remain unchanged. For S3 authorization, an OPA false decision is an implicit IAM
denial that an applicable bucket-policy Allow may supplement. A tag mismatch alone
therefore does not revoke access granted by such a bucket policy; policy authors
must account for those grants when relying on tags to restrict access. ListBuckets
filtering remains IAM-only. Lookup errors on the OPA path abort authorization and
never fall through to a bucket-policy Allow. Custom IAM Store implementations
must implement load_bucket_tags to support bucket-scoped OPA requests; the default
fails closed.
📚 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.
