Repository navigation
[Server] Keep an explicitly keyed id authoritative in KeyMapper - #1939
Merged
Merged
Conversation
Follow-up to the Iceberg REST authorization work: a keyed resource id must win over one derived from a caller-supplied location path. - `KeyMapper` merges the ids resolved from an `EXTERNAL_LOCATION` path with `putIfAbsent` instead of `putAll`: - the caller controls the body's location, so its owning-entity ids may add a key the request did not resolve, but never replace an explicitly keyed `CATALOG`/`SCHEMA`/`TABLE`, which names the resource the request acts on. - Defense in depth, not the sole guard: the create policies still reject a mismatched location via `#no_overlap_with_data_securable` (external) and the staging-ownership check (managed). Signed-off-by: Yi Li <[email protected]>
Collaborator
|
may you provide a link to the original PR this is a follow up to? |
Collaborator
Author
Added a link. |
timothyw553
approved these changes
Oct 24, 2026
shba24
added a commit
to shba24/unitycatalog
that referenced
this pull request
Nov 4, 2026
KeyMapperTest (added on main in unitycatalog#1939) opened its own in-memory H2 database and relied on Hibernate creating the tables. The server no longer lets Hibernate change the schema, so the test found no tables. It now uses the shared test database, which the schema steps build, like the other tests that write entities directly. Co-authored-by: Isaac <[email protected]> Signed-off-by: Shubham Bansal <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🥞 Stacked PR
Use this link to review incremental changes.
Follow-up to the comment on Iceberg REST authorization work: a keyed resource id must win over one derived from a caller-supplied location path.
KeyMappermerges the ids resolved from anEXTERNAL_LOCATIONpath withputIfAbsentinstead ofputAll:CATALOG/SCHEMA/TABLE, which names the resource the request acts on.#no_overlap_with_data_securable(external) and the staging-ownership check (managed).Signed-off-by: Yi Li [email protected]
PR Checklist
docsis updatedDescription of changes