Skip to content

Add prefix middleware for bucket scoped storage#907

Merged
gaul merged 2 commits intogaul:masterfrom
forwardnetworks:prefix-middleware
Nov 7, 2025
Merged

Add prefix middleware for bucket scoped storage#907
gaul merged 2 commits intogaul:masterfrom
forwardnetworks:prefix-middleware

Conversation

@captainpacket
Copy link
Contributor

Summary

  • add a PrefixBlobStore middleware that scopes virtual buckets to a fixed backend prefix
  • wire prefix parsing into startup so buckets configured with s3proxy.prefix-blobstore.* always use the new middleware
  • document the prefix middleware and include it in the middleware index

Testing

  • mvn test

Copy link
Owner

@gaul gaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments but looks good.

}

if (!Strings.isNullOrEmpty(requestedMarker)) {
effective.afterMarker(addPrefix(container, requestedMarker));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work for storage backends with opaque markers. I think it would probably be better to do:

if (Quirks.OPAQUE_MARKERS.contains(blobStoreType)) {
    throw new UnsupportedOperationException("Only supports opaque markers");
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Middleware now rejects opaque-marker providers as suggested. Let me know if anything else is needed.

@gaul gaul merged commit 3080d9e into gaul:master Nov 7, 2025
3 checks passed
@gaul
Copy link
Owner

gaul commented Nov 7, 2025

Thank you for your contribution @captainpacket!

@captainpacket captainpacket deleted the prefix-middleware branch November 9, 2025 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants