Expand description
Bucket inspector: aggregates read-only bucket properties in parallel.
§Design
Each bucket property is fetched as an independent S3 API call via
tokio::join!. Every call is classified into one of four outcomes:
SectionResult::Value(T)— the call succeeded and returned a value.SectionResult::Denied { iam_action }—AccessDenied; also recorded intoCapabilityCacheso the UI can render “Requiress3:GetBucketX”.SectionResult::Unsupported { reason }— the provider does not implement this API (e.g. LocalStack free-tier, MinIO, R2).SectionResult::Deferred { reason }— intentionally omitted from v1 (currently onlybucket_policy).
Any error that does not map to Denied or Unsupported is treated as a
critical failure and bubbles up as Err(AppError) for the whole call.
In practice, only NoSuchBucket (bucket deleted mid-inspect) is a hard
failure; all capability errors degrade gracefully at the section level.
§OCP
- Adding a new section: one new field on
BucketInspectorReport+ one parallel arm insideinspect_bucket. No existing sections change. - Adding a new
SectionResultdiscriminator: one variant + one arm in consumermatchblocks. Existing variants are untouched. - Capability cache writes happen automatically from
Deniedoutcomes; the frontend never needs to callcapability_getexplicitly.
Structs§
- AclSummary
- ACL summary: owner display name + total grant count.
- Bucket
Inspector Report - Aggregated read-only properties of a bucket.
- Cors
Rule - A single CORS rule summary.
- Encryption
Config - Summary of server-side encryption configuration (read-only in v1).
- Lifecycle
Rule - A single lifecycle rule summary.
- Logging
Config - Bucket logging configuration.
- Notification
Config - S3 event notification configuration summary.
- Object
Head - All properties returned by
HeadObjectfor a single S3 object. - Object
Inspector Report - Aggregated read-only properties for a single S3 object.
- Object
Lock Config - Object-lock configuration summary.
- Ownership
Controls - Bucket ownership controls.
- Public
Access Block Config - Public access block configuration.
- Replication
Config - Replication configuration summary.
- Restore
Status - Glacier / Deep Archive restore status for an object.
- Website
Config - Static website hosting configuration summary.
Enums§
- Section
Result - The result of fetching one bucket property section.
- Versioning
Status - Bucket versioning state.
Functions§
- classify_
service_ 🔒error - Classify a generic service-error code into
SectionResult. - fetch_
cors 🔒 - Fetch CORS rules via
GetBucketCors. - fetch_
encryption 🔒 - Fetch SSE configuration via
GetBucketEncryption. - fetch_
lifecycle 🔒 - Fetch lifecycle rules via
GetBucketLifecycleConfiguration. - fetch_
logging 🔒 - Fetch logging configuration via
GetBucketLogging. - fetch_
notifications 🔒 - Fetch S3 event notification configuration via
GetBucketNotificationConfiguration. - fetch_
object_ 🔒acl - Fetch object ACL summary via
GetObjectAcl. - fetch_
object_ 🔒lock - Fetch object-lock configuration via
GetObjectLockConfiguration. - fetch_
object_ 🔒tags - Fetch object tags via
GetObjectTagging. - fetch_
ownership_ 🔒controls - Fetch ownership controls via
GetBucketOwnershipControls. - fetch_
public_ 🔒access_ block - Fetch public access block configuration via
GetPublicAccessBlock. - fetch_
region 🔒 - Fetch the bucket region via
GetBucketLocation. - fetch_
replication 🔒 - Fetch replication configuration via
GetBucketReplication. - fetch_
requester_ 🔒pays - Fetch requester-pays status via
GetBucketRequestPayment. - fetch_
tags 🔒 - Fetch bucket tags via
GetBucketTagging. - fetch_
versioning 🔒 - Fetch versioning state via
GetBucketVersioning. - fetch_
website 🔒 - Fetch static website configuration via
GetBucketWebsite. - head_
object - Fetch only
HeadObjectfor a single S3 object, returning anObjectHead. - inspect_
bucket - Fetch all supported bucket properties in parallel and return an aggregated
BucketInspectorReport. - inspect_
object - Fetch all object properties in parallel and return an
ObjectInspectorReport. - is_
glacier_ 🔒class - Glacier-class storage class codes recognised for restore-status parsing.
- is_
unsupported_ 🔒code - Return
truefor codes that indicate the API is not supported by this provider (LocalStack free-tier, MinIO, R2, …). - parse_
expiry_ 🔒date - Attempt to parse a Glacier restore expiry date to a Unix timestamp.
- parse_
restore_ 🔒header - Parse the Glacier restore header string into a
RestoreStatus. - record_
denied 🔒 - Record a
Deniedcapability into the cache when the section isDenied.