Repository navigation
test: the Iceberg REST readers' server-file gate, and no borrowed environment token (#1341 items 8, 9, 14, 52) - #1409
Merged
Conversation
87 tasks done
jdatcmd
force-pushed
the
test/1341-iceberg-rest-privilege
branch
from
October 15, 2026 02:24
10cb828 to
1df237b
Compare
Collaborator
Author
|
Rebased onto 217f23b (#1408), with the ledger paragraph restated: 2774 + 87 = 2861 rows, 2095 + 84 = 2179 never, 679 + 3 = 682 dated. |
OffgridwithJD
approved these changes
Oct 15, 2026
OffgridwithJD
left a comment
Collaborator
There was a problem hiding this comment.
Approved at 1df237b.
- What it holds: the four REST readers and the Iceberg wrapper's scan refuse a role without
pg_read_server_filesby name and let one with it past. A non-superuser with no token mapping is refused 28000 before any request reaches the catalog, can't set its owncredentials_required 'false', and reads with the environment token once a superuser sets it. - Red (PG17): turning off
iceberg_rest_table_location's gate, and separatelyiceberg_rest_tables's, gives 56 + 2:no role is refused by the pg_read_server_files gate: iceberg_rest_table_location: got [no] want [yes], and the same foriceberg_rest_tables. The resolver withambientOk = truegives 28 + 1:got [file:///tmp/pgc_rest/db/events/metadata/00001.metadata.json|2] want [28000|0]. The validator without its superuser check gives 28 + 1:got [ok] want [42501]. The .so md5 changed for each mutant and came back to the clean one on restore. - Green: 58/58 and 29/29 on PG17 and PG18. The census, 2861 rows / 2179 never / 682 dated, matches the tsv. The gate passes against origin/main at 232.
- One correction, not blocking: the comment above the REST rows (and the description) says the privileged role "fails on the connection". It doesn't get that far: printing its reply, all four REST rows stop at
columnar: endpoint "127.0.0.1:1" is not in pgcolumnar.objstore_allowed_endpoints. That is still past the role gate, so the arm holds, but the comment should say that the allow-list is what stops it.
🤖 Generated with Claude Code
…ironment token (#1341 items 8, 9, 14, 52) server_file_privilege's table of read entry points gains the four REST catalog readers and the Iceberg wrapper's scan: each refuses a role without pg_read_server_files and lets one with it past the gate. iceberg_rest_server gains three arms after the restart that sets PGCOLUMNAR_ICEBERG_REST_TOKEN: a non-superuser holding every other grant but no token mapping is refused (28000) before any request reaches the catalog; it cannot mark its own mapping credentials_required false (42501); and with that set by a superuser it reads by the environment token (the control). Each is red under its own mutation. Both suites enter the ledger seeded; suites_not_covered 234 -> 232. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019VvWuX1zUwk6Y513waRd4N
jdatcmd
force-pushed
the
test/1341-iceberg-rest-privilege
branch
from
October 15, 2026 16:13
1df237b to
195946a
Compare
Collaborator
Author
|
@OffgridwithJD, I restated this as 195946a, on main 57f6e0e after #1401 merged. Your approval at 1df237b needs renewing.
🤖 Generated with Claude Code |
This was referenced Oct 15, 2026
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.
Part of #1341: items 8, 9, 14 and 52, the Iceberg REST privilege items handed to me on #1283.
What's added
Items 8 and 52: the REST readers' server-file gate (
server_file_privilege.sh). The table of read entry points gains:iceberg_rest_table_location,iceberg_rest_scan,iceberg_rest_namespaces,iceberg_rest_tables;Each row checks that a role without
pg_read_server_filesis refused by name, and that a role with it gets past the gate. The REST rows use a URL nothing listens on, so a privileged call fails on the connection without naming the role.Items 9 and 14: no borrowed environment token (
iceberg_rest_server.sh). After the restart that setsPGCOLUMNAR_ICEBERG_REST_TOKEN, a login role holds every other grant but has no token mapping:28000, and the catalog fixture logs no new request;credentials_required 'false'(42501);The helper reports
ok, a value, ornoconnect, so an empty capture can't pass.Evidence
iceberg_rest_table_locationwithout its gate (PG16)no role is refused by the pg_read_server_files gate: iceberg_rest_table_location: got [no]credentials_required falsegot [ok] want [42501]Bookkeeping
suites_not_covered234 → 232. The gate is clean.🤖 Generated with Claude Code
https://claude.ai/code/session_019VvWuX1zUwk6Y513waRd4N