Skip to content

iceberg: support bucket names with dots in URIs#29071

Merged
nvartolomei merged 1 commit intoredpanda-data:devfrom
nvartolomei:nv/iceberg-bucket-with-dots
Dec 22, 2025
Merged

iceberg: support bucket names with dots in URIs#29071
nvartolomei merged 1 commit intoredpanda-data:devfrom
nvartolomei:nv/iceberg-bucket-with-dots

Conversation

@nvartolomei
Copy link
Copy Markdown
Contributor

@nvartolomei nvartolomei commented Dec 19, 2025

Previously, the URI parser would reject bucket names containing dots by treating any host with a dot as an unsupported virtual host-style URI. This prevented using S3 buckets with dots in their names.

We also change slightly the behavior to reject uris like s3://bucket.s3.amazonaws.com/path/to/object. I never seen them in the wild and I think it is unsafe to accept them without additional checks.

Fixes https://redpandadata.atlassian.net/browse/CORE-15069

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v25.3.x
  • v25.2.x
  • v25.1.x

Release Notes

Bug Fixes

  • Iceberg: Allow bucket names with dots. Also, reject URIs returned by catalog that look like s3://bucket.s3.amazonaws.com/path/to/object.

Copilot AI review requested due to automatic review settings December 19, 2025 16:11
Previously, the URI parser would reject bucket names containing dots
by treating any host with a dot as an unsupported virtual host-style
URI. This prevented using S3 buckets with dots in their names.

We also change slightly the behavior to reject uris like
`s3://bucket.s3.amazonaws.com/path/to/object`. I never seen them in the
wild and I think it is unsafe to accept them without additional checks.

Fixes https://redpandadata.atlassian.net/browse/CORE-15069
@nvartolomei nvartolomei force-pushed the nv/iceberg-bucket-with-dots branch from c643382 to 1ddaad0 Compare December 19, 2025 16:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug in Iceberg's URI parser that incorrectly rejected S3 bucket names containing dots. Previously, the parser treated any hostname with a dot as an unsupported virtual host-style URI, preventing the use of valid bucket names like "test.bucket.name".

Key Changes:

  • Simplified URI validation logic to accept bucket names with dots
  • Added test coverage for bucket names containing dots
  • Updated comments to clarify the rejection of virtual host-style URIs

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/v/iceberg/uri.cc Removed dot-checking logic that prevented bucket names with dots from being parsed
src/v/iceberg/tests/uri_test.cc Added test case for bucket names with dots and refactored test structure
src/v/iceberg/tests/BUILD Removed unused test_schemas dependency

@dotnwat
Copy link
Copy Markdown
Member

dotnwat commented Dec 22, 2025

s3://bucket.s3.amazonaws.com/path/to/object

can you explicitly say what is wrong with this? looks fine to me...

Copy link
Copy Markdown
Member

@dotnwat dotnwat left a comment

Choose a reason for hiding this comment

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

should we include a ducktape test? it seems like bucket names end up getting used in many additional places inside and outside redpanda so having something that can catch regressions with issues with dot-containing-bucket-names seems good?

@nvartolomei
Copy link
Copy Markdown
Contributor Author

can you explicitly say what is wrong with this? looks fine to me...

without a more throughout input validation we could mistake a table returned uri s3://bucket.s3.amazonaws.com/path/to/object as being the same s3://bucket.minio.example.com/path/to/object. So currently we actually have a bug here. I believe these URIs are actually invalid so instead of properly validating (pretty complex) I'm rejecting them.

@nvartolomei nvartolomei merged commit 93910f0 into redpanda-data:dev Dec 22, 2025
20 checks passed
@vbotbuildovich
Copy link
Copy Markdown
Collaborator

/backport v25.3.x

@vbotbuildovich
Copy link
Copy Markdown
Collaborator

/backport v25.2.x

@vbotbuildovich
Copy link
Copy Markdown
Collaborator

/backport v25.1.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants