Skip to content

Iceberg on Google: a Google identity for REST catalogs, a per-source storage identity with a GCS reader, and one codec for every surface - #2196

Merged
aaj3f merged 69 commits into
mainfrom
feat/iceberg-google
Nov 2, 2026
Merged

aaj3f merged 69 commits into
mainfrom
feat/iceberg-google

Conversation

@aaj3f

@aaj3f aaj3f commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2194
Fixes #2195

Follow-up: #2182, #1914, #2189, #2192

This lets a graph source read BigQuery-managed Iceberg tables through Google's BigLake Iceberg REST catalog, from GCP or off it, without HMAC keys, and it reworks how connection, auth and storage config gets into db so that every surface says the same thing. Fair warning up front: it's a big one, with a breaking-change list to match, and Claude Code did a lot of the legwork here, including the design review, the wiremock suites, the mutation checks and the live runs against BigLake and GCS. The reviewer map below is the order I'd read it in.

What and why

Three things, and they turned out to want each other:

A Google identity behind catalog auth.

  • The new auth is {"type": "google", "credentials": …, "quota_project": "…", "scopes": "…"}. The credential comes from one of four sources:
    • external_account: Workload Identity Federation from AWS, keyless, with nothing secret stored; this is the recommended one;
    • service_account: a key held in an env var or secret reference, never a stored literal;
    • metadata: today's google_metadata, which keeps reading and round-tripping;
    • application_default: host ADC, for development.
  • It's hand-rolled as a validated subset over the existing CachedToken and hardened HTTP client, with no new dependencies, rather than adopting google-cloud-auth. A credential config can name arbitrary token URLs, files, URLs and executables, and accepting one from a source's config means validating it.
  • Tokens live in one process-wide cache keyed on the identity, refreshed single-flight before expiry.
  • quota_project goes out as x-goog-user-project. BigLake refuses every request without one, for every identity, and that now comes back as err:catalog/QuotaProjectRequired saying to set it.
  • Because the SQL graph source already reuses AuthConfig, a Google identity authenticates SQL endpoints too.

A per-source storage identity.

  • io.storage_auth is vended, ambient, catalog or google. Absent, it means what vended_credentials always meant, so stored records are untouched.
  • The engine never infers one. The CLI and Python default catalog for a bq:// warehouse and vended for bl://; HTTP stores exactly what it's sent.
  • Each identity serves only the schemes it can, so a path outside them is a typed err:storage/SchemeNotServed.
  • catalog is what makes BigLake federation work: it never vends, and Google's own model is that the catalog caller's identity reads the bucket.
  • Reads go through a GCS-native reader on object_store's GoogleCloudStorage (already linked into every shipped binary through delta_kernel), with read-only storage scopes.
  • Vended credentials, GCS tokens included now, renew inside the store.
  • Storage is built in exactly one place, Fluree::graph_source_storage, which returns the decision it made. Every location-keyed cache is scoped by the identity that read it.

Every host-derived identity under one policy.

  • Some identities belong to the host rather than the source: ambient AWS (optionally limited to a bucket allowlist), ambient Azure, the GCE metadata server, host ADC, and WIF signed with the host's own AWS identity.
  • They're governed by one operator policy: FLUREE_GRAPH_SOURCE_HOST_IDENTITIES and FLUREE_GRAPH_SOURCE_AMBIENT_BUCKETS, or with_host_identity_policy per instance. It defaults to everything allowed, so a single-tenant install behaves as before.
  • An embedder that serves several tenants can supply per-tenant AWS subject credentials (with_aws_subject_credentials) for WIF, which the policy doesn't gate.
  • A token minted from a host identity is attached only to Google's APIs: *.googleapis.com, plus any host the operator lists in FLUREE_GOOGLE_TOKEN_HOSTS.

One codec for every surface.

  • HTTP, the CLI and Python each used to translate their own flat auth_* fields with hand-written code, and those copies had drifted. Google metadata auth worked on /iceberg/map only, a partial OAuth2 set was silently ignored for Iceberg and SQL but refused for Delta, and precedence between auth modes differed per kind.
  • fluree-db-api/src/graph_source/surface.rs is now the one path. Structured input is exactly the stored JSON (catalog / io for Iceberg, auth for SQL, unity / io for Delta), on every route. The legacy flat fields still work through one converter per kind, and catalog auth through one converter for all three kinds.
  • Unknown fields are refused by parsing into the persisted type, re-serializing, and refusing any input key the result lacks, so the check can't drift from the types. So are the two forms mixed, and auth given two ways or only partly.
  • All of those are a 400, err:api/InvalidGraphSourceConfig, naming the field. Every ConfigValue on the wire goes through the same rules.
  • When serde can't parse a value, the refusal is built from the type's own terms: where in the input it stopped, the kind of value found, and the fields or variants the type expected (surface/refusal.rs, in 65f8c305c). serde's own message quotes the value it was given, which can be a credential pasted into the wrong field, so it never reaches the 400. The codec's own refusals stop repeating values too: an env var the operator doesn't list, an unknown storage identity, an unknown catalog mode. Acceptance is unchanged; serde_json still decides what parses.
  • Read-outs of stored configs are now redacted structurally: one exhaustive walk per auth type, so a new variant doesn't compile until it says which of its values are secret.

How to review it

Roughly in this order:

  • Identity:
    • fluree-db-iceberg/src/auth/google/: mod.rs holds the identity, the token destination rule and grantable_scopes; then external_account.rs, service_account.rs, adc.rs, metadata.rs, cache.rs, credentials.rs, aws_subject.rs and tests.rs.
    • fluree-db-iceberg/src/auth/mod.rs: request_headers(url), IdentityContext, AuthConfig::Google.
    • fluree-db-iceberg/src/host_identity.rs.
    • The three header callers: catalog/rest.rs, fluree-db-sql/src/trino.rs, fluree-db-delta/src/unity.rs.
  • Storage:
    • Iceberg crate:
      • fluree-db-iceberg/src/io/gcs.rs (the reader);
      • io/storage.rs, io/location.rs, io/scope.rs (scheme binding and StorageScope);
      • credential/vended.rs, credential/renewal.rs;
      • io/send_parquet.rs (the data-file cache key and its single-flight fill).
    • API crate:
      • fluree-db-api/src/graph_source/storage.rs (plan_storage and the one constructor), then its call sites in r2rml.rs, cache.rs and disk_catalog_cache.rs.
    • Delta's ambient path: fluree-db-delta/src/store.rs, table.rs.
  • Surface:
    • API:
      • fluree-db-api/src/graph_source/surface.rs and its tests.rs;
      • the builders in graph_source/config.rs;
      • the redactor in ledger_info.rs.
    • Server routes: fluree-db-server/src/routes/{iceberg,sql,delta,iceberg_ssrf}.rs.
    • CLI: fluree-db-cli/src/commands/source_auth.rs (the three flag groups) and commands/{iceberg,sql,delta}.rs.
    • Python: fluree-db-python/src/graph_source.rs, python/fluree/_sources.py.
  • Error codes:
    • The codes themselves: fluree-vocab/src/errors.rs.
    • The status and code tables: fluree-db-api/src/error.rs.
    • The error variants: fluree-db-iceberg/src/error.rs, fluree-db-query/src/error.rs, fluree-db-sql/src/error.rs, fluree-db-delta/src/error.rs.
  • Docs:
    • API: api/endpoints.md (a new "Iceberg connection" section), api/errors.md.
    • Graph sources: graph-sources/iceberg.md (a new "Google BigLake" section with the minimum roles), graph-sources/sql.md, graph-sources/delta.md.
    • Operations: operations/configuration.md (the policy and override env vars).
    • CLI: cli/iceberg.md, cli/sql.md, cli/delta.md, cli/server-integration.md.
    • Python: the README and docs/types.md.

Breaking changes

Rust API

  • Free functions removed: fluree_db_api::{browse_iceberg_catalog, preview_iceberg_table, verify_storage_access, sample_iceberg_rows, sample_column_values}. Use the Fluree methods; verify is Fluree::verify_iceberg_storage_access. A catalog read always runs under an instance's identity context (its policy, AWS subject and secret resolver), and the free functions had none. generate_r2rml and validate_r2rml now preview under the instance's context as well.
  • S3IcebergStorage::from_default_chain is #[doc(hidden)] and #[deprecated], and refuses gs:// without a GCS interop endpoint. Storage is decided and built by Fluree::graph_source_storage(&config, &CatalogGrant::direct()), which returns ResolvedStorage { backend, decision, scope } with a #[non_exhaustive] StorageDecision.
  • DeltaTable::open(name, location, io, identity: &IdentityContext), because a path source's ambient read is a host identity the policy governs. Embedders can call Fluree::open_delta_table(name, location, io) instead.
  • CatalogAuth / SendCatalogAuth: authorization_header() -> Result<Option<String>> is replaced by request_headers(&self, url: &str) -> Result<HeaderMap>. It's one method that returns every header (Google's x-goog-user-project included), and it takes the request URL so the provider decides where its credential may go.
  • Auth types:
    • GoogleMetadataAuth and GoogleMetadataConfig are removed; GoogleCatalogAuth over a GoogleIdentity serves both Google auth variants.
    • AuthConfig gains Google.
    • IoConfig gains storage_auth, defaulted and skipped when absent; no existing field is renamed or removed.
  • Host-identity policy:
    • FlureeBuilder::{file, memory, s3, from_json_ld} and Fluree::{new, from_backend, with_indexing_mode} now default to HostIdentityPolicy::from_env(), so an instance with no policy of its own takes the environment's.
    • HostIdentityPolicy has a new pub field ambient_azure, and HostIdentityKind a new Azure. An explicit FLUREE_GRAPH_SOURCE_HOST_IDENTITIES list must name azure to keep ambient-Azure Delta reads.
  • New error variants, so exhaustive matches break on purpose:
    • IcebergError::{GoogleTokenExchange, GoogleCredentialsInvalid, HostIdentityRefused, CatalogQuotaProjectRequired, SchemeNotServed, AmbientBucketRefused, AmbientEndpointRefused, LocalLocationFromCatalog, GoogleTokenHostRefused};
    • QueryError::{StorageSchemeNotServed, CatalogQuotaProjectRequired, GoogleTokenExchange, GoogleCredentialsInvalid, HostIdentityRefused, GoogleTokenHostRefused};
    • SqlError::Identity and DeltaError::Identity;
    • ApiError::GraphSourceInput.
  • Storage denials: IcebergError::StorageAccessDenied and QueryError::StorageAccessDenied gain scheme. A non-S3 denial arrives as ApiError::Query(QueryError::StorageAccessDenied), still 403 err:storage/AccessDenied.
  • New wire codes: err:auth/GoogleTokenExchange, err:auth/GoogleCredentialsInvalid, err:auth/HostIdentityRefused, err:catalog/QuotaProjectRequired, err:storage/SchemeNotServed, err:api/InvalidGraphSourceConfig.
  • Vended credentials: VendedCredentials is now S3(S3Credentials) | Gcs(GcsCredentials), and from_vended_credentials takes &S3Credentials. A vended GCS token with no expiry is refused.
  • Caches: R2rmlCache::{get,put}_metadata and SendParquetReader::with_caches take a &StorageScope.
  • SecretResolver::scope_id() is a new provided method, defaulting to None. A resolver that maps one reference name to different secrets per caller must return a scope id, so per-identity caches can tell them apart.
  • StorageAccessReport.credential_source gains catalog, google and local.
  • Builders:
    • IcebergConnectionConfig, IcebergCreateConfig and R2rmlCreateConfig gain with_auth / with_storage_auth.
    • with_storage_auth also sets vended_credentials to agree.
    • A setting the catalog mode can't honor, such as with_warehouse on Glue or with_oauth2_scope without OAuth2 auth, is now refused at validate() (typed, naming the actual mode) rather than logged and ignored.
    • IcebergConnectionConfig has a private field, so it can't be built with a struct literal outside the crate.
    • Every existing builder method is kept as a thin wrapper.

Behavior

  • Registration runs the engine's own validation in every mode, the same IcebergGsConfig::validate a query runs on the stored config. That covers:

    • the storage identity: catalog needs a Google catalog identity, and vended needs a REST catalog;
    • a static check of a Google identity's scopes, quota project and federation config;
    • a Direct location that names its namespace/table.

    Separately, a Direct or Delta path source whose storage the policy refuses fails registration with the 403 a query would give. Every catalog read (browse, preview, verify, generate, validate) validates its connection first.

  • A source's storage identity is decided by its config, deliberately. An ambient source, explicit or from vended_credentials: false, reads with the ambient identity even when the catalog happens to vend credentials it didn't ask for. Before, those unrequested credentials were used.

  • Catalog-only clients: the Glue and S3 Tables catalog clients are the aws host identity, governed by the policy like the ambient reads.

  • With FLUREE_GRAPH_SOURCE_AMBIENT_BUCKETS set, an ambient source may not also name an s3_endpoint. The allowlist names buckets on AWS's own endpoint, and a bucket name means something else on another one.

  • Local files are read only by a Direct source under the operator's local roots. A catalog that places a table on local disk is refused with err:storage/SchemeNotServed.

  • Host tokens: a host identity's Google token goes only to *.googleapis.com and the hosts listed in FLUREE_GOOGLE_TOKEN_HOSTS. A deployment that points the metadata server, ADC or host-signed WIF at a private, non-googleapis endpoint needs to list that host.

  • Quota projects:

    • A catalog's quota project bills the catalog's requests, never storage reads.
    • Under storage_auth: catalog, GCS gets no x-goog-user-project.
    • A storage read names a billing project only when one is configured for storage: storage_auth: google's own quota_project, or the gcs.user-project a catalog vends.
    • A service-account key file's quota_project_id no longer bills storage reads. Anyone relying on that should set storage_auth.quota_project.
  • User ADC (authorized_user) tokens are minted for cloud-platform, for the catalog and storage alike. A refresh grant can only ask for scopes the user consented to, and gcloud's login consents to cloud-platform. Service-account, WIF and metadata tokens are still minted read-only for storage.

  • Cache keys: vended sources, ambient sources with an endpoint override, and instances with a non-default identity context re-key their catalog and data-file caches once on upgrade. The default ambient, no-endpoint configuration keeps its keys.

HTTP

  • Every Iceberg route, sql/map and every Delta route now answer 400 err:api/InvalidGraphSourceConfig, naming the field, for:
    • an unknown field;
    • flat and structured fields together;
    • two ways to authenticate (a bearer beside OAuth2 or a Google identity);
    • auth given only partly. An oauth2_* field without both the token URL and the secret used to store no auth at all.
  • The value rules:
    • an env var the operator doesn't list in FLUREE_GRAPH_SOURCE_SECRET_ENV_VARS is refused, on every route and for every value, azure_client_secret_env included;
    • a secret_ref is accepted only when the instance has a resolver;
    • a service-account key is never a literal;
    • default_val, java_property and a metadata_url are refused.
  • auth_google_metadata now reaches every read-only Iceberg route. sql/map gains auth_bearer_env, oauth2_client_secret_env and a structured auth; the Delta routes gain oauth2_audience and a structured unity / io.
  • delta/catalog/preview and verify refuse an Azure principal, since Unity issues the table's credentials.
  • HTTP never defaults storage_auth or the quota project: an omitted one keeps today's behavior.

CLI

  • New flags on iceberg map and sql map:
    • --auth-google-metadata, --auth-google-adc;
    • --auth-google-service-account-env VAR;
    • --auth-google-wif-config FILE, which is read and stored inline (it's not a secret);
    • --auth-google-quota-project, --auth-google-scopes.
  • iceberg map also takes --storage-identity vended|ambient|catalog|google and --storage-google-*. --no-vended-credentials conflicts with --storage-identity.
  • sql map gains --auth-bearer-env and --oauth2-client-secret-env.
  • The Delta commands' auth flags are now the shared catalog-auth group, with --oauth2-audience. Their old clap requires = "unity_uri" is checked by the converter instead.
  • Defaults for a REST catalog:
    • with no storage flag, a bq:// warehouse reads with catalog and a bl:// one with vended;
    • a bq:// warehouse without a Google catalog identity is refused, naming the flags to use;
    • a Google catalog identity with no quota project takes the warehouse's project.
  • Half-given or doubly-given auth is refused in the flags' own spelling.
  • Remote iceberg map / sql map send the structured connection their local form would store, so remote and local register the same record.
  • The shipped CLI is unaffected by one consequence of that: its default features, which dist builds, include iceberg. Only a custom --no-default-features build without iceberg can no longer send iceberg map / sql map to a remote server.
  • The Delta commands still send flat fields, so a CLI without the delta feature can still drive a server.

Python

  • fluree.Google(credentials="metadata" | "application_default" | EnvVar | dict | path, quota_project=None, scopes=None) is new. A literal key string is refused.
  • Auth now includes Google.
  • map_iceberg(storage=…) is new, along with the StorageIdentity type. It takes the same bq:// / bl:// defaults as the CLI, and a Google identity takes the warehouse's quota project.
  • The native layer now goes through the builders rather than writing RestCatalogMode.auth / io directly. The REST-only refusals come at registration, with the same messages.

Tests and validation

On the final tree, with the iceberg, native, sql and delta features unless noted. All pass.

Iceberg crate

Suite Result
lib --features aws 454
lib, default features 369
it_scan / it_value_codec 10 / 9
doc 3

SQL and Delta crates

Suite Result
sql lib / protocol 40 / 9
delta lib 56
delta reader / no_log_cache / pruning 28 / 1 / 1

API crate

Suite Result
lib --all-features 1315
grp_graphsource 255
it_graph_source_r2rml 68 (2 ignored, as before)
it_iceberg_local_fs / it_iceberg_policy / it_iceberg_warehouse_root 10 / 15 / 1
it_sql_graph_source / it_sql_pushdown_lane 6 / 21
it_delta_local_fs / it_delta_differential 16 / 3
it_host_identity_env_default (new; re-execs itself so the env policy stays in its own process) 1
it_google_storage_billing (new) 1
it_iceberg_direct (aws-testcontainers, LocalStack) 3

Server, CLI and Python

Suite Result
server --all-features lib 235, grp_http 138, grp_policy 95, grp_proxy 53, grp_query 186, grp_raft 20, grp_search 20, grp_bolt 28 (counted in the round before the live fixes, which reran them green)
CLI lib 267, integration 184, graph_source_flags (new) 3, and the other targets
Python (rebuilt wheel) 377; mypy clean; Sphinx -n -W clean

Gates, all clean:

  • cargo fmt --all --check;
  • cargo clippy --workspace --all-features --all-targets -- -D warnings;
  • cargo check --workspace --all-targets;
  • the server's no-default-features build;
  • both wasm32 gates;
  • RUSTDOCFLAGS=-D warnings docs for the iceberg and delta crates.

One flake to be aware of: grp_http::encryption_rotation_http::rotation_runs_and_verifies_over_http fails in some whole-binary runs. It polls a key rotation for 10 s, passes alone, and nothing here touches encryption.

No network in CI. Every Google and GCS path runs against wiremock:

  • Service-account JWTs: the token endpoint receives a JWT whose claims are checked and which verifies against the key's public half.
  • WIF: the STS request's subject token decodes to a SigV4-signed GetCallerIdentity with x-goog-cloud-target-resource signed, and impersonation's expireTime is parsed. Two embedder subjects with different principals make two exchanges for one config, never a shared token.
  • Token handling: single-flight (N concurrent callers make one token request), and a forced re-mint at most once per 30 s.
  • The federation config subset: gcloud's real emitted AWS config is accepted, and every refused field has its own test.
  • GCS reads: the reader's ranged read, HEAD, listing, 401 renewal and 403 denial.
  • End to end: it_google_storage_billing drives the metadata server, a BigLake-style catalog and GCS through verify_iceberg_storage_access, and pins which project each request bills.
  • Cross-identity cache isolation, for each cache layer.
  • Surfaces:
    • every surface 400;
    • the flat and structured forms storing identical records for every kind;
    • a CLI-to-server seam test showing a remote map stores the same record as a local one;
    • the read-only routes through the real router, where a deny-all policy proves the Google identity reached the provider.
  • Redaction: a per-variant test across every AuthConfig × GoogleCredentials × ConfigValue form.

Mutation checks. 98 were recorded across the storage, surface, review and live-fix rounds (29 + 10 + 18 + 18 + 11 + 12), with Phase 1 running its own. Each one broke the code on a committed tree, watched its test fail, and restored it. A few earned their keep by catching tests that didn't yet test anything:

  • the data-bound typed-fill test, whose two guards overlapped until it counted HEADs;
  • a mutation whose needle predated cargo fmt, which was rerun rather than counted.

Live validation against real BigLake and GCS, in a Google Cloud test project (us-central1), in two rounds:

  • The setup:
    • a BigLake federation warehouse (bq://projects/<P>/locations/us-central1);
    • BigQuery-managed Iceberg tables: a 5-row NUMERIC table and a 2,000,000-row (~24.5 MB) one;
    • a service account holding only roles/biglake.viewer and roles/bigquery.metadataViewer on the project and roles/storage.objectViewer on the bucket;
    • a WIF pool trusting an AWS role.
  • The first round ran a release build of this branch from before the live fixes, and everything it tripped on is now a commit here:
    • a service account with no quota project got a bare 403 at /v1/config, which now reads err:catalog/QuotaProjectRequired;
    • the catalog's quota project went to GCS as a billing project, so storage reads needed a serviceusage grant they had no business needing. It now bills the catalog only;
    • a GCS refusal quoted GCS's XML three times, and now says it once;
    • an expired AWS session behind a WIF subject token lost its cause, which the error now names;
    • gcloud user ADC failed with 400 invalid_scope on the storage token. A user's refresh grant can only ask for scopes the user consented to, so a user's token is now minted for cloud-platform;
    • a Direct gs:// source couldn't register, even with an identity that reads gs://;
    • and the CLI and Python taking the warehouse's project as the quota project came out of the same round.
  • The second round ran a release build of this branch with every fix in (only docs have changed since). Each source was registered fresh in a new local instance. Cold is a new process with an empty disk cache, warm is a new process with that cache warm, and every process pays its own token exchange.
Run Result Cold Warm
Service-account key + quota project + storage_auth: catalog, with no serviceusage role 5 correct rows matching BigQuery, NUMERIC as decimal(38,9) 1.12 s 112 / 91 ms
Control: the same identity, sending that same project to GCS as its billing project (storage_auth: google with a quota_project) refused, 403 UserProjectAccessDenied for lacking serviceusage.services.use, in one line
gcloud user ADC, no quota project given 5 correct rows; the CLI took the quota project from the bq:// warehouse 1.15 s 104 / 199 ms
WIF (AWS role → STS → SA impersonation) + quota project + storage_auth: catalog 5 correct rows 3.02 s 1.05 / 1.12 s
A policy that leaves out google-wif refused, typed, naming the env var, before any read

The control is what makes the first row mean something. The serviceusage grant the first round needed had been removed, and the control shows the removal took effect: GCS checks that permission and refused, while BigLake, billed to that same project, answered /v1/config and loadTable. WIF's warm runs are still new processes, so each one pays the STS exchange and the impersonation again; a long-running server caches the token for about an hour.

Decimal filters. On this branch alone, a FILTER(?v >= 0.05) on the NUMERIC column crashes the Parquet read (scale 2 is greater than precision 1), for every decimal variant. That's expected: it's the bug #2186 fixes, and this branch doesn't carry it. On a build combining this branch with #2186, all nine decimal FILTER variants (>=, >, = and < on 0.05, a typed xsd:decimal literal, bounds a hair past a stored value, and two on a second NUMERIC column) returned exactly the expected rows, 2.81 s cold and 2.48 / 2.56 s warm. Any FILTER on that table costs about 1.4 s more per one-shot process than the same query without one, on both builds and on a long column too, so it isn't from either change; I'd like to profile it separately. Outside the filters, the combined build matches this branch (warm, 0.98 vs 0.97 s).

Roles. The three roles above were enough for the catalog and storage both, with the quota project being the project that holds the tables, which is the default from the warehouse. Billing a different project wasn't tested. Google's rule for x-goog-user-project is that the identity then also needs serviceusage.services.use on that project (roles/serviceusage.serviceUsageConsumer), and the docs say it that way: the first case validated, the second Google's rule.

2M-row reads (first round) through the GCS-native reader with the catalog's identity:

Query Cold (first) Warm
COUNT 5.22 s 141–198 ms
GROUP BY (100 buckets) 6.66 s 190–285 ms
filter + ORDER BY + LIMIT 2.12 s 1.16–1.40 s

Against the S3-interop HMAC path (first round), each run a fresh process with a fresh disk cache:

Query GCS-native S3-interop HMAC
COUNT 1.18 / 1.12 s 1.05 / 0.96 s
GROUP BY 4.34 / 4.14 s 4.14 / 3.90 s

So the data path seems to be at parity. The fixed ~150–200 ms gap is one extra Google token exchange per process, because storage tokens carry their own read-only scope, and a long-running server caches it for about an hour.

Merge checklist

Review round (2026-10-30)

bplatz's two comments are folded in across 20 commits on 65f8c305c: the cached storage identity is resolved through the caller's resolver before every lookup (ccf1348f8); credential renewals back off and never hold up a caller with a still-valid credential (7f2857a13); remote sql map sends flat fields an older server reads (41f3f259f); the name-based redaction runs after the typed one (6f8e7c01d); a sent quota project's denial names it (0847dc198); GCS reads follow no redirects (5e44840e4); vended credentials are read only when the source reads with them (e7f1455e2); a stated catalog type selects its variant (5ad1f6d2f); every graph-source route ignores its sibling routes' fields while unknown keys are still refused (5737923f4, 885e9c2cd); plus the CLI, Python and Unity items and the docs, including the stricter behavior listed in compatibility.md.

Deferred

Happy to talk through any of this, especially the breaking changes. I think every one of them follows from the identity being decided in one place, but I may have drawn a line or two in the wrong spot.

aaj3f added 30 commits October 26, 2026 18:11
A graph source could reach a Google catalog (BigLake) only as the GCE
metadata server's service account. That rules out every host that is
not on Google, and a hosted stack where each tenant needs its own
identity.

GoogleCredentials names four sources: the metadata server, a
service-account key, Workload Identity Federation from AWS, and the
host's application-default credentials. All four are served by one
GoogleIdentity. AuthConfig::Google uses it, and the stored
google_metadata variant keeps reading and round-tripping unchanged. The
providers are written here, over the hardened HTTP client, instead of
taking google-cloud-auth: tenant-supplied credential JSON can name
arbitrary token endpoints, files, URLs and executables. Only a validated
subset is accepted. Credential sources must be AWS. STS, impersonation
and OAuth endpoints must be Google's own. The metadata URL is pinned
(an operator override only).

Tokens are cached process-wide and refreshed single-flight with a
margin; a still-valid token survives a failed refresh. The cache key
includes the AWS subject that signed a WIF exchange, so two tenants who
paste the same WIF config never share a token. It also includes a
digest of a service account's private key, so a key that only names
another tenant's service account never gets that tenant's token.

CatalogAuth::request_headers replaces authorization_header so the
quota project (x-goog-user-project) reaches every caller: the REST
catalog, the SQL source and Unity. Google's missing-quota-project 403
is typed with the fix.

Host-derived identities (ambient AWS, the metadata server, host ADC,
host-signed WIF) are now an operator decision. HostIdentityPolicy reads
FLUREE_GRAPH_SOURCE_HOST_IDENTITIES (default all) and fails closed on a
value it cannot parse. It is set per Fluree instance, and the server
reads it from the environment. An embedder can supply per-tenant AWS
subject credentials for WIF, and those are not gated by the policy.
Both travel in one IdentityContext to every place a provider is built,
and the api's client caches include the context in their keys, so a
client built for one tenant never serves another.

IoConfig.storage_auth (vended | ambient | catalog | google) is defined
and validated here; reads use it in a later phase. Absent means what
vended_credentials always meant, and the two may not contradict each
other.
A token exchange Google refused, invalid Google credentials, a host
identity the policy refuses, and a catalog that needs a quota project
used to fall into the generic wrappers: Internal (500) on the query
path, Config (400) on preview. A client could not tell "this identity
lacks a grant" from a server fault, and hosts went back to classifying
by message text.

Each one is now typed on the query, preview and provider-construction
paths, through one helper all three share, and survives the lazy
storage builder's IcebergError channel. The codes:
err:auth/GoogleTokenExchange (403 when Google said 403, 502 when Google
failed or never answered, otherwise 401), err:auth/GoogleCredentialsInvalid
(400), err:auth/HostIdentityRefused (403), err:catalog/QuotaProjectRequired
(403). The messages carry Google's error code, never a response body.
Pins three things. The instance's host-identity policy governs the
catalog auth built on the query path (shared_catalog_client) and on the
onboarding path (browse). It is set on the instance or on the builder.
A refusal is a typed 403 before any request is made. Clones carrying a
policy or an AWS subject leave the original alone, and their contexts
key the shared client caches apart.

Re-exports aws_credential_types::Credentials as AwsCredentials, so an
embedder implements AwsSubjectCredentials against the same version
without a dependency of its own.
wiremock pools its mock servers, so a test's server URL can be one an
earlier test used. The Google token cache keys on endpoints, so a reused
URL let one test be handed another's cached token. The REST route-prefix
cache is keyed by URL + warehouse, so a reused URL could also inherit
another test's prefix. A serial run of the iceberg lib tests failed this
way.

Test endpoints now carry a token-cache partition of their own (empty in
production, so no production key changes), and the new REST tests use
warehouses no other test does. Five of the existing REST tests fail the
same way under --test-threads=1 on main as well. They are left as they
are.
A cached Google token is keyed on an identity that a secret proves, and
the key now includes that secret wherever there is one, hashed and held
in memory only: a service account's private key, and the ADC file's
refresh token and client secret. The ADC file is read before the cache
is consulted, so a new gcloud login for the same account is exchanged
instead of being served the token the old refresh token minted. A file
that changed identity is still refused. sha2 becomes unconditional
because user ADC works without the `aws` feature.

A WIF config object that mixes reference keys (secret_ref, env_var, ...)
with an inline configuration's `type` is now refused as ambiguous instead
of being read as inline.

A build without request signing refuses service-account and WIF
credentials with the typed GoogleCredentialsInvalid ("not available in
this build") instead of a generic config error.

Also pins that clones of one Fluree with different AWS subjects or
policies never share a catalog client, while one context gets its
cached client back.
The SQL and Delta sources take their auth from the same AuthConfig as
Iceberg, so they meet the same identity refusals: a Google token
exchange refused, invalid Google credentials, a host identity the
policy refuses. Both flattened them into strings (SqlError::Auth,
DeltaError::Config / Catalog). A refused identity then answered 500 on
a query, or 400 err:config on the admin paths, while an Iceberg source
answered with its own code.

SqlError::Identity and DeltaError::Identity now carry the refusal
typed. Delta also recovers it from the object store's credential
provider, where a vended-credential renewal fails, so the refusal
survives that path too. The api lifts both through the same mapping the
Iceberg paths use, giving the same wire codes (err:auth/*,
err:catalog/QuotaProjectRequired) and statuses. That covers a SQL
query's client and scans, the SQL connection test and check, a Delta
query's Unity table, and Delta onboarding. IcebergError gains
is_identity_refusal() (the one list of these refusals) and Clone, so a
refusal lent out by an error chain can be recovered intact.

Also pins that IoConfig::with_storage_auth sets vended_credentials to
agree, so only hand-written JSON meets the contradiction check, and
documents why an ADC identity is not bound at construction.
The REST catalog tests failed under --test-threads=1, on main as well.
MockServer::start() hands out pooled servers, so a test can be given a
URL an earlier test used. The route-prefix cache (lock_prefixes) is
process-wide and keyed by catalog URL + warehouse, so such a test was
answered with the earlier test's cached prefix (/v1/p, /v1) and loaded
a route it never served. Five tests failed this way; the parallel
default run hid it by handing concurrent tests different servers.

Every test in the module now starts an unpooled server
(MockServer::builder().start()), on a port of its own. Test-only:
production code is untouched.
… identity

The storage layer could read object stores only through the S3 SDK with the
host's AWS chain or vended S3 keys. A BigLake runtime catalog vends
gcs.oauth2.token, which parsed as "vended nothing", and gs:// was read by any
S3 client as s3://same-name on AWS.

VendedCredentials is now S3 keys or a GCS token. Both expiry spellings
(gcs.oauth2.token-expires-at, gcs.oauth2.token_expires_at) parse, the gcs
token keys join CREDENTIAL_KEYS so a top-level token never stands in for a
matched entry, and a token without an expiry is refused.

GcsIcebergStorage reads gs:// through object_store's GCS backend (0.13.2,
the version Delta Kernel already links), behind one shim module. It is built
only with GoogleCloudStorageBuilder::new and an explicit credential provider,
never from_env, so it cannot fall back to host ADC or the metadata server.
Tokens come from a GoogleIdentity minted for devstorage.read_only, or a
vended token. A 401 renews the token and retries once; a 403 is
StorageAccessDenied. The endpoint is Google's unless the operator sets
FLUREE_GCS_ENDPOINT.

Vended credentials renew inside the store. RenewingVendedCredentials re-vends
single-flight inside a margin before expiry, through the catalog's per-table
credentials endpoint (SendCatalogClient::load_credentials, with a loadTable
fallback), and keeps a still-valid credential when renewal fails. The GCS
reader and, through the existing VendedAwsCredentialProvider, the S3 client
both use it, so a scan that outlives one token keeps reading.

Each backend refuses a path outside the schemes it serves
(err:storage/SchemeNotServed): S3 reads gs:// only through Google's interop
endpoint, GCS reads only gs://. An S3 client can carry the operator's
ambient-bucket allowlist. from_default_chain is deprecated and hidden: graph
sources get their storage from the decision Fluree applies, which the next
change adds.

StorageScope fingerprints the identity a read was made under. The Parquet
data-file cache, and so its single-flight fill, now key on it; the shared
scope keeps the file names caches had before. The footer cache needs none
because a footer is served only after the store answers the file's size,
which a test now pins.

The API call sites are adapted mechanically here and rebuilt on one
storage constructor next.
…rves

Direct mode accepted only s3://, s3a:// and local table locations, so a
catalog-less table on GCS could not be registered even with a Google
storage identity, the case io.storage_auth `google` exists for.

A gs:// table location is now accepted when the source's identity reads
gs://: a Google identity, or ambient AWS through Google's S3 interop
endpoint. Anything else is refused at registration, not at the first read.
The table identifier is derived from a gs:// location as from an s3:// one.
…orage

Storage for an Iceberg graph source was built in five places from one
boolean (vended or ambient), with no policy on the host's identity, and
the location-keyed caches served every source from one key space.

Fluree::graph_source_storage(config, grant) is now the one constructor.
plan_storage decides the identity from the source's configuration
(io.storage_auth, else what vended_credentials always meant), applies the
instance's HostIdentityPolicy (the `aws` kind and its bucket allowlist; the
Google host kinds where a Google identity is built), binds the identity to
the schemes it serves (err:storage/SchemeNotServed), proves a Google
identity by minting a storage token, and fixes the StorageScope every
cache is keyed by, all before any cache is consulted. StoragePlan::build
makes the store from the opaque CatalogGrant: vended S3 keys or a GCS token
that renew through the catalog's credentials endpoint, the catalog's or the
source's Google identity over the GCS reader, ambient AWS, or the local
filesystem. ResolvedStorage carries the store, a #[non_exhaustive]
StorageDecision and the scope. §2 is part of the plan: a vended source
granted nothing is refused, before a query reuses a store it built.

The query path (eager and pointer rungs), materialize, the /info row
counts, preview, verify, sample and the provisional query all build
through it. The native-AWS catalog clients (Glue, S3 Tables) call AWS with
the host chain, so they are the `aws` host identity too.

The in-memory table_metadata, scan_files and direct_metadata_locations
layers, and the disk metadata, scanfiles and countstats layers, key on the
scope; the default configuration (ambient, no endpoint, the default
identity context) keeps the bare key and the literal `shared` segment, so
existing entries stay warm. The cross-query loadTable key, which caches
vended credentials and is shared by every clone of a Fluree, carries a
non-default identity context too.

Browse, preview, verify and sample ran as free functions under the default
identity context, which allows every host identity: an embedder calling
them bypassed its own policy, and generate and validate called the free
preview internally. The free functions are removed; the Fluree methods,
which use the instance's context, are the only public forms.
Through the query path itself: two REST sources whose catalogs grant
different identities point at one metadata location. The pointer rung
serves the cached metadata only to the identity that read it, and the
COUNT(*) shortcut its manifest stats; the other identity goes to its
catalog. An explicitly ambient source builds the host's AWS client
whatever the catalog vended.
The verify probe, the sampler, the provisional query and the catalog
client still named helpers the storage constructor replaced. They now
name the decision itself, and the probe's credential_source lists the
identities it can report.
…nfig

HTTP, the CLI and Python each translated their own flat fields into
AuthConfig / IoConfig / Delta auth, about eighteen functions that had
drifted: Google auth reached only /iceberg/map, partial OAuth2 was dropped
silently for Iceberg and SQL but refused for Delta, precedence between auth
modes differed per kind, and an Azure secret variable skipped the server's
allowlist.

graph_source::surface is now the one path. Structured input is the stored
JSON, checked strictly by re-serializing the parsed value and refusing any
key it lacks, so the check cannot drift from the persisted types. Legacy
flat fields go through one converter per kind, with catalog auth decided by
one CatalogAuthFields::into_auth for Iceberg, SQL and Unity. Every
ConfigValue is checked against the caller's SecretRules: env allowlist,
secret_ref only with a resolver, no literal service-account key, no
metadata_url, no default_val/java_property. Refusals are a typed
ApiError::GraphSourceInput (400, err:api/InvalidGraphSourceConfig) naming
the field.

Builders gain with_auth / with_storage_auth; a setting the catalog mode
cannot honor is recorded and refused at validate() instead of warned and
ignored (the old message said "Direct catalog mode" for Glue too).
Registration now runs the engine's full IcebergGsConfig::validate for every
mode, storage identity included, and connection validate runs before every
catalog read. Direct validation no longer derives a table identifier when a
mapping names the tables.

Read-outs of stored configs are redacted structurally: one exhaustive walk
per auth type (auth::fields) classifies every ConfigValue, the redactor
masks the secret ones and every key the type does not know, and a config
its type cannot read is withheld whole.
…he codec

Each Iceberg route (map, browse, preview, verify, generate, validate), sql/map
and every Delta route now keeps only its own fields and hands the rest of the
body to the one codec. A request may give the structured catalog / io (Iceberg),
auth (SQL) or unity / io (Delta) exactly as the stored config spells them, or
the legacy flat fields; an unknown field, the two forms mixed, and auth given
two ways or half given are a typed 400 naming the field.

What this fixes:
- auth_google_metadata reached iceberg/map only. The read-only routes' request
  type had no such field, so serde dropped it and browse/preview ran with no
  auth. It now reaches every route.
- an Azure secret given as azure_client_secret_env skipped
  FLUREE_GRAPH_SOURCE_SECRET_ENV_VARS. Every ConfigValue on every route now goes
  through the allowlist.
- SQL secrets were literal-only over HTTP. sql/map gains auth_bearer_env /
  oauth2_client_secret_env and the structured auth, so a Google identity can
  authenticate a SQL endpoint.
- the SSRF guard read request fields, which a structured body would bypass. It
  now runs on the parsed config (catalog URI, OAuth2 token URL, S3 endpoint,
  Unity workspace).

Fluree::generate_r2rml and validate_r2rml previewed each table with the free
preview_iceberg_table, which builds auth under the default identity context.
So the instance's host-identity policy and per-tenant AWS subject never applied
to them (a deny-all instance still called the GCE metadata server). They now
use the instance's context, as browse/preview/verify already did.
…torage identity

iceberg map, sql map and the Delta Unity commands each declared and
translated their own auth flags, and they had drifted: SQL secrets were
literal-only, OAuth2 activated only on token URL plus secret (a token URL alone
registered no auth), and OAuth2 silently beat a bearer token. Three
#[command(flatten)] groups replace them, each with one conversion onto the
codec every surface uses:

- CatalogAuthArgs (bearer / OAuth2, literal or _env): iceberg map, sql map and
  every Delta command that takes a Unity Catalog.
- GoogleAuthArgs: --auth-google-metadata, --auth-google-adc,
  --auth-google-service-account-env VAR, --auth-google-wif-config FILE (read
  and stored inline; it is not a secret), --auth-google-quota-project,
  --auth-google-scopes. For iceberg map and sql map.
- StorageIdentityArgs: --storage-identity vended|ambient|catalog|google, plus
  --storage-google-* for a source's own Google identity (Direct mode on gs://).
  With no storage flag, a bq:// warehouse defaults to catalog and a bl:// one to
  vended (the surface chooses; the engine never infers). A bq:// warehouse
  without a Google catalog identity is refused, naming the flags to use.

The flat Iceberg converter moves into the API as IcebergConnectionFields, the
one conversion the legacy HTTP fields and these flags share. A refusal names
the flag (--oauth2-token-url needs --oauth2-client-secret ...).

Remote iceberg map and sql map now send the structured connection their local
form would store, built by the same conversion, so local and remote register
the same record (pinned by a CLI-to-server seam test). The Delta commands keep
sending flat fields, so a CLI built without the delta feature can still drive
a server that has it.
…urces

The public layer gains fluree.Google (the metadata server, application-default
credentials, a service-account key named by an EnvVar, or a Workload Identity
Federation configuration as a dict or file) as catalog auth for map_iceberg and
map_sql, and map_iceberg gains `storage` ("vended" / "ambient" / "catalog" or a
Google identity of the source's own). A service-account key is never taken
literally, since it would be stored with the source.

The native layer used to write RestCatalogMode.auth and io.vended_credentials
directly, past the builders. It now goes through them, so a setting the
catalog mode cannot honor is refused by the same rule (and message) as on the
CLI and server. Every auth and storage value is checked against the instance's
SecretRules: secret references only with a resolver, no default_val. Like the
CLI, a bq:// warehouse defaults to storage "catalog" and a bl:// one to
"vended" when the caller names neither storage nor vended_credentials.
…torage identity

endpoints.md documents the connection every Iceberg route takes: the
structured catalog / io (exactly the stored shape, with every auth,
GoogleCredentials and storage_auth variant) beside the legacy flat fields, and
the 400s (err:api/InvalidGraphSourceConfig) for an unknown field, the two forms
mixed, and auth given two ways or only partly. sql/map gains structured auth
and the _env fields, the Delta routes their structured unity / io.

The CLI pages document the shared catalog-auth, Google and --storage-identity
groups, the bq:// and bl:// defaults, and remote mode sending the structured
connection. configuration.md documents FLUREE_GRAPH_SOURCE_HOST_IDENTITIES,
FLUREE_GRAPH_SOURCE_AMBIENT_BUCKETS and FLUREE_GOOGLE_METADATA_URL, and widens
FLUREE_GRAPH_SOURCE_SECRET_ENV_VARS to every route and value (Azure included).

Corrected where the docs disagreed with the code: sql.md said SQL auth values
take env_var / secret_ref indirection (HTTP and the CLI took literals only;
secret_ref still needs an embedded resolver); server-integration.md said the
OAuth2 fields must all be given together (a token URL alone was silently
dropped, and is now refused). iceberg.md's Type Mapping table now states what
happens today: an rr:column without rr:datatype is an xsd:string literal for
every column type. The table is the one place a natural-datatype change has to
edit, beside the datatype the generator emits.
The first commit taught IcebergGsConfig::validate to skip the Direct
table-identifier derivation when a mapping names the tables. But every
query runs that same validate before it reads anything, so the change also
loosened query-time validation, which is out of this PR's scope. It is
reverted. Registration now runs the unchanged validate, so it refuses a mapped
Direct location naming no namespace/table (s3://bucket/dw) that every query
would refuse.

graph_source_alias_query_does_not_deserialize_as_ledger registered such a
location and relied on the query failing at that validate. Its fixture now
names a namespace and table, and the query fails on the mapping's own table
name, still inside the graph-source engine.

Also gates REST_CATALOG_TYPE on the iceberg feature (the wasm32
no-default-features lint caught it unused).
…e default split

Nested nulls were already skipped by the strict check (the canonical form
omits a defaulted Option), but a top-level null beside the other form was
refused as mixing: {"catalog": {...}, "catalog_uri": null}, which a client
serializing every field sends. A null now means absent in either form; a null
cannot hide an unknown key that carries a value.

No persisted type uses #[serde(alias)]. The compat spellings are the untagged
helpers: the legacy catalog with no `type` (read as REST, the shape old records
hold, so a read-out of one can be sent back), a WIF config given as JSON text,
and ConfigValue's three forms. All are accepted, and pinned by tests. The legacy
catalog's read path stays strict about unknown keys.

The docs now say where the bq:// / bl:// storage-identity default lives: the
CLI and Python apply it, and the HTTP routes store exactly what they are sent.
The first commit's message said connection validate() runs before every
catalog read, but it ran only at registration. A setting a builder recorded
as refused (e.g. with_oauth2_audience with no OAuth2 auth, or a REST-only
setting in another mode) was therefore ignored outright by browse, preview,
verify, generate, validate and the provisional query, where the old builder
had at least warned. So was an io.storage_auth the catalog cannot serve.

Fluree::hydrate_conn, the one entry all of them take, now calls
IcebergConnectionConfig::validate() before hydrating. The free
context-less functions do not (Phase 2a removes them).
GoogleCatalogAuth attached its token to whatever URL the source named:
the catalog URI, the SQL endpoint, Unity. A host identity's token is the
server's own (the metadata server, the host's gcloud ADC, WIF signed
with the host's AWS chain). So under the default policy, browsing
`catalog.uri = https://attacker.example` with `application_default`
shipped the server's cloud-platform token off-box. This was new for ADC
and host-signed WIF, and pre-existing for google_metadata.

A host identity's token now goes only to https://googleapis.com and its
subdomains (BigLake, BigQuery, Private Service Connect's
*.p.googleapis.com), plus hosts the operator lists in
FLUREE_GOOGLE_TOKEN_HOSTS (read once, never per source). Any other
destination is refused before a token is minted, with
GoogleTokenHostRefused naming the host and never the token (403,
err:auth/HostIdentityRefused; its own QueryError so the host survives
the lazy storage builder). A source's own service-account key, and WIF
signed with an embedder's per-tenant subject, still go wherever the
source points.

The check is enforced where headers are produced:
CatalogAuth::request_headers now takes the request URL. A caller cannot
obtain a credential without naming its destination, so a new caller
cannot forget the check. The REST catalog, every Trino request (each
nextUri page and the cancel, since the endpoint names those) and Unity
pass theirs.

Also from the review:
- A server's 401 forces at most one re-mint per cached token every 30 s.
  Within that window the token is kept and the retry reports the
  refusal, so one source cannot make a shared host token re-mint
  constantly.
- A token response's expires_in (and impersonation's expireTime) is
  clamped to 24 h instead of added raw. A huge expires_in from a
  tenant-chosen OAuth2 token_url panicked.
- The ADC principal uses the `account` gcloud records when the file
  names one; gcloud's client id is the same for every user. The module
  documents that ADC is one host-global, policy-gated identity.
rustfmt orders the pub use items; the integration branch carried them
unformatted, so fmt --check failed before any change here.
The provider decides where a credential may go, by the URL it is
given, so each client must give the URL it is about to request. The
REST catalog, Unity and Trino each have a test with a recording
provider that pins it. Trino's covers the statement and a page at the
nextUri the endpoint chose.
…se secrets it resolves

HostIdentityKind::Azure (env token `azure`, part of `all`) governs the
host's own Azure credentials, which a Delta table with no service
principal of its own reads with. A source's own `io.azure` client secret
and Unity's per-table credentials are not host identities.

SecretResolver::scope_id (default None) names whose secrets a resolver
resolves. An embedder whose resolver maps one reference name to
different secrets per tenant must return one: it is part of
IdentityContext::cache_scope, so every cache keyed by the stored
configuration (which carries the reference, not the secret) is also
keyed by it. The default context's scope is unchanged.

The policy's bucket allowlist is documented as governing storage reads
only: an AWS Glue or S3 Tables catalog call is gated by `aws` alone.
…hrough a cache fill

IcebergError::StorageAccessDenied and QueryError::StorageAccessDenied
carry the path's scheme, so a GCS denial prints gs://bucket/key with a
GCS hint, not s3://. The "Storage access denied" prefix hosts match is
kept. The API keeps ApiError::StorageAccessDenied (fields unchanged) for
S3 and lifts any other store's denial as the query variant: the same 403
and STORAGE_ACCESS_DENIED code. The scheme is a &'static str from the
closed set a store reads, which keeps QueryError and ApiError small (a String
made them 120/128 bytes and tripped clippy's result_large_err; now 112 and 120).

A denied data file under the whole-file threshold now surfaces as the
typed denial instead of the flattened "disk-cache fill:" error: the
fill's leader gets the store's own error back (wrapped, not
stringified), and a waiter that only saw the leader's text asks the
store once (a HEAD) and reports the typed denial that comes back.

Also: StorageScope's Debug shows only whether it is the shared scope
(its description carries digests of stored auth), so ResolvedStorage's
Debug prints StorageScope("<scoped>"); the non-aws build no longer
carries a dead env_switch_enabled; rustdoc private-item links and bare
URLs fixed so `cargo doc -D warnings` is clean for the crate.
A GCS store built one object_store client per bucket in an unbounded
map, so a table whose manifests name many buckets grew memory and
connection pools without limit. It is now an LRU of 64; a dropped
client is rebuilt if its bucket is read again.
…cache planned Google identities

Under a bucket allowlist (FLUREE_GRAPH_SOURCE_AMBIENT_BUCKETS) an
ambient-AWS read through an s3_endpoint override is refused with the
typed AmbientEndpointRefused, both when storage is planned and in the
store for every path it reads: a virtual-hosted endpoint read
path-style names a bucket of its own, so the bucket the path names
would not be the bucket read. It maps to HOST_IDENTITY_REFUSED (403).

Only a Direct source reads the local filesystem. A REST, Glue or S3
Tables catalog that places a table on this host's disk is refused with
LocalLocationFromCatalog (STORAGE_SCHEME_NOT_SERVED), as before storage
identities, when every catalog source read through S3.

plan_storage now caches the Google identity it builds for `catalog` and
`google` storage auth, process-wide, keyed by a digest of the stored
config and the identity context's cache scope (the resolver's scope id,
the policy, the AWS subject), bounded by the catalog-client TTL. A warm
plan no longer resolves the secret, re-parses the key or builds an HTTP
client; the token proof still runs on every plan.
…licy governs

DeltaTable::open built AmazonS3Builder::from_env and
MicrosoftAzureBuilder::from_env with no policy check, so a source
registered at s3://<stack-internal-bucket>/t read with the host role even
under FLUREE_GRAPH_SOURCE_HOST_IDENTITIES=none. DeltaTable::open (and
the store it opens) now requires the IdentityContext:

- an s3:// table read with the host's credentials needs `aws`, its
  bucket on the ambient allowlist, and no endpoint override under one;
- an Azure table with no io.azure of its own needs `azure`.

The check is at open only: a store is bound to the table's bucket, and
Kernel addresses every file, an absolute data-file URL included, as a
path within that store (Path::from_url_path drops the host).

Fluree::open_delta_table(name, location, io) opens a table the way the
instance's graph sources do (io hydrated with its resolver, opened under
its context), for embedders that read a table outside a graph source.

The Delta handle cache is keyed per graph source as well as by config
and identity scope, and resolves the config's secrets before the
lookup, so a caller whose resolver refuses them is never served a handle
another caller opened with them.
…ent's

FlureeBuilder and the Fluree constructors defaulted to allowing every
host identity; an embedder that never called with_host_identity_policy
ignored the operator's FLUREE_GRAPH_SOURCE_HOST_IDENTITIES and
FLUREE_GRAPH_SOURCE_AMBIENT_BUCKETS. They now start from
HostIdentityPolicy::from_env, which is allow-all when neither is set.

@bplatz bplatz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving, with one ask: please fix the cached storage identity (item 1 in the first comment above) before this merges. Everything else in the two comments can land here or as follow-ups.

The identity design holds up well where I looked hardest: the token-destination rule (suffix matching, userinfo, IP literals, https-only, no redirects on the token and catalog clients), the WIF config allowlist, the token cache key binding the secret and the AWS subject, refusals that never echo values, and scheme gating and identity-scoped cache keys on the storage side.

aaj3f added 20 commits October 30, 2026 08:45
… that resolves its secret

The process-wide storage identity cache keyed a built identity on the
stored configuration (the secret reference, not the secret) and the
identity context, and a hit never asked the secret resolver. Under a
resolver with no scope id, a caller who registered a Direct gs:// source
naming another caller's secret_ref was served that caller's identity,
and the token proof passed because the identity already held the key,
though its own resolver would have refused the reference.

The identity's configuration is now hydrated through the caller's
resolver on every plan, before the cache is consulted, for both
storage_auth `google` and `catalog`. The cache key is a digest of the
resolved configuration, exactly what the identity is built from, and
building refuses an unresolved reference: an entry exists only under the
digest of resolved secrets, so a caller is served a cached identity only
by presenting what it was built from. A caller whose resolver refuses the
reference fails at hydration; one whose resolver maps it to another
secret keys another entry; a rotated secret keys a new entry at once.

A warm plan still reuses the built identity (no key parse, no new HTTP
client) and still proves it with a token from the process-wide token
cache. What it adds is the resolver call per plan, the same contract the
Delta handle cache has: authorization runs on every use.
… flight holds no one up

The Google token cache held its slot's lock across the token exchange
and remembered nothing when it failed, so during an STS or metadata
server outage every queued caller ran its own exchange in turn, each up
to the client's 30 s timeout; inside the refresh margin, a caller whose
held token was still valid waited for a failing refresh before reading
on with it. Vended storage credentials renewed the same way, and a
store's 401 forced a re-vend every time, with no guard like the Google
path's 30 s one. The REST catalog client took its process-wide request
permit before asking its auth provider for headers, so an issuer outage
could hold every catalog slot, those of sources on other credentials
included.

Both holders now renew through one shared renewal (`renew::Renewing`):

- One renewal is in flight at a time. While it runs, a caller holding a
  still-valid credential reads on with it without waiting; a caller with
  nothing usable waits for that renewal instead of starting its own.
- A failed renewal is remembered for 5 s. Within that window nothing is
  renewed: a still-valid credential is served, else the failure is
  returned at once.
- A refusal forces a renewal at most once per 30 s, for vended
  credentials as for Google tokens. A vended credential the store refused
  is still never served again. A Google token's forced renewal that fails
  still leaves the held token for the other sources sharing it.

The REST client takes its headers before the permit and reuses them
across 429/503 retries; a token that expires during those is a 401,
renewed as before.

The fast path (a fresh held credential) takes a short std mutex instead
of an async one; no extra work is added to it.
…grant on it

Google answers USER_PROJECT_DENIED both when a request names no quota
project and when it names one the caller lacks
serviceusage.services.use on. The catalog client reported both as
CatalogQuotaProjectRequired ("set quota_project"), wrong advice in the
second case.

When the request carried x-goog-user-project, the refusal is now the
catalog's access denial, naming that project and the missing permission
in the words the GCS denial hint uses (now one shared text). A request
that named none is still CatalogQuotaProjectRequired.
… it read as

A GCS denial names the store's identity (`as Google (<principal>)`) and
carries GCS's own message, which names the service account (or a user's
email). The query path redacted AWS ARNs from denials but no Google
principal, so any querying client was told the identity the server read
the table as.

The query-facing denial now also replaces the store's label principal
(service account, `wif:…`, `adc:…`, `metadata`) and every email address
with `<redacted>`, keeping the reason; the full text goes to the server
log, as for ARNs. Onboarding and verify keep the full text.
The GCS reader built its HTTP client through object_store's
ClientOptions, and object_store sets no redirect policy, so reqwest's
default (follow up to ten) applied. reqwest drops Authorization across
hosts, but x-goog-user-project would still have gone wherever a response
pointed.

Each bucket's client is now built by a connector of the reader's own:
the same timeouts, user-project header, http-only-for-an-operator's-
endpoint rule and disabled decompression object_store applies, with
redirects off. A redirected read fails with the redirect's status. The
connector uses the reqwest 0.12 object_store is built on, already in the
build through it.
…with them

loadTable parsed whatever credentials a catalog returned, including the
GCS fields this PR added, whether or not the source reads with vended
credentials. A catalog returning a gcs.oauth2.token without an expiry,
or a malformed gcs.user-project, failed loadTable for ambient, catalog
and google sources that would never use it. And for a gs:// table whose
catalog vends both, the GCS token now won over the S3-interop keys,
switching existing records to another store.

- The REST client reads credentials only from a load that asked for
  them, and every loadTable asks exactly when the source's storage
  identity is `vended`.
- When a catalog vends both, the S3 keys win whatever the location, as
  they did before this PR; the GCS token is read only when no S3 keys
  were vended.
- `IoConfig::effective_storage_auth` now takes the catalog and is the one
  rule: an absent storage_auth means `vended` on a REST catalog with
  vended_credentials, `ambient` everywhere else. plan_storage and the
  loadTable request both follow it. Before, the public method returned
  `vended` for Glue, S3 Tables and Direct with the default
  vended_credentials: true, where plan_storage read them as ambient.
…d once per backoff

The Google token cache now backs off for 5 s after a failed exchange, so a
second plan inside that window is refused with the cached failure instead
of asking the AWS subject again. The warm-plan test asked for one
exchange per plan; it now asks that each plan is refused (the proof is
never skipped for a cached identity) with one exchange in the window.
…fields

A remote `fluree sql map` sent its auth only as the structured `auth`. A
server older than that field does not refuse a field it does not know:
it registered the source with no auth and said nothing.

A bearer token or OAuth2 client credentials (literal or `_env`) now go
as the flat fields, which every server version reads. Only a Google
identity, which has no flat field, goes as the structured `auth`. The
server converts the flat fields with the codec the CLI checks them with,
so the stored record is the same either way: the test builds the body
for each auth kind and parses it as the server does.
`--auth-google-wif-config` / `--storage-google-wif-config` accepted any
JSON object, and a remote map sends the file as read without the static
check a registration runs. A service-account key passed there by mistake
travelled to the server before it was refused.

The CLI now checks the file as a registration would before building any
request: its `type` must be `external_account` (a service-account key
is named as such, pointing to the `-service-account-env` flag), and the
configuration must pass the same static validation the server applies.
No refusal repeats the file's contents.
The typed redactor replaced the name-based pass rather than adding to
it: a config its type could read was returned as the type masked it. A
value the type holds as plain text under a secret-sounding key, such as
a SQL session property named `x_token` or `password`, was masked before
by the `*_token` / `*_secret` / `*_password` rule and was shown verbatim.
A secret field a config type gains outside its auth would not have been
masked either.

The name rule now runs after the typed pass, always. A config neither
pass changes is still returned byte-identical.
`CatalogConfig` was read through an untagged helper that fell back to
the legacy REST form whenever the tagged reading failed. So
`{"type": "direct", "uri": "https://c"}` (a Direct catalog missing its
table location) or a misspelled type read as a REST catalog, and since
`type` is in the canonical output the strict input check did not refuse
it. Any refusal inside a structured `catalog` also said only "data did
not match any variant of untagged enum CatalogConfigHelper", without a
path.

The catalog is now read key by key: each key as its own type, the
variant decided by `type` alone, its absence meaning the legacy REST
form. A stated type that does not parse as that variant is refused, and
the refusal names where: `catalog.type: unknown variant, expected one
of ...`, `catalog: missing field table_location`,
`catalog.auth.type: ...`, `catalog.warehouse: invalid type ...`.
Untyped legacy records read as before, keys no variant knows are still
ignored on read, and the written form is unchanged.
`fluree.Google("wif.json")` was refused, with a message telling the
caller to pass the path it had just passed: only an `os.PathLike` was
read as a file. A missing file raised a bare FileNotFoundError.

A string that is neither "metadata" nor "application_default" is now
the path of a WIF configuration file, read like a Path, unless it is
JSON text (a key given literally, refused as before). A file that cannot
be read, or a string naming no file, is an InvalidRequestError that says
so. A refusal of a string never repeats it, since it may be a key.
9d9aca6a3 said the flat fields are read by every server version. An
older server reads the literal ones only: the `_env` forms are as new
as the structured `auth`, and it drops them as it drops a Google
identity. The doc comment now says so.
The read-only routes refused a field only a map route uses: the Iceberg
browse, preview, verify, generate and validate routes refused `name`,
`r2rml`, `branch`, `model`, `delete_*` and the rest of `iceberg/map`'s
own fields, and Delta browse and generate refused the S3 and Azure
options. Earlier releases ignored them, so a client sending one body to
browse, preview and map now got 400s.

Each read-only route now drops the fields its kind's map route takes
beside the connection (unless it takes the field itself), and the Delta
routes also drop what they cannot use: the Azure principal on every
read-only route (Unity issues a Unity table's credentials; this
replaces preview and verify's refusal of it), and on browse and
generate, which read no table, the S3 options and `io`. What is dropped
is ignored, not checked. A field no route of the kind knows is still
refused.
The flat Unity fields default an OAuth2 service principal's scope to
`all-apis` (and its token URL to the workspace's own); a structured
`unity.auth` was stored exactly as given, so OAuth2 client credentials
without a `scope` were stored, and requested tokens, with none. The
same source registered two ways stored two records.

A structured `unity.auth` now gets the same default scope (its
`token_url` cannot be omitted in that form). The flat-vs-structured
test family pins that both forms store the same record, with the scope
left out and with one given.
…or changes

- api/errors.md: the five new codes, each under its status:
  err:auth/GoogleCredentialsInvalid and err:storage/SchemeNotServed
  (400), err:auth/GoogleTokenExchange (401, 403 or 502),
  err:auth/HostIdentityRefused and err:catalog/QuotaProjectRequired
  (403).
- operations/configuration.md: FLUREE_GRAPH_SOURCE_HOST_IDENTITIES lists
  `azure` (an operator copying the old list turned off ambient-Azure
  Delta reads) and says `aws` also gates the Glue and S3 Tables catalog
  calls. FLUREE_GRAPH_SOURCE_AMBIENT_BUCKETS says an ambient source may
  not name an s3_endpoint while it is set, and that it governs storage
  reads only.
- api/endpoints.md: the delta/map structured-form paragraph sat inside
  the field table, so the rows after it lost their header; it follows
  the table now. A stated catalog type is read as that type only, a
  structured Unity OAuth2 auth defaults its scope as the flat form does,
  and the read-only Iceberg and Delta routes ignore what only map uses.
- graph-sources/iceberg.md: GCS is read through the native reader for
  every Google identity (the source's own, the catalog's, a vended GCS
  token), through the S3 interop endpoint with HMAC keys otherwise.
  Vended credentials are renewed from the catalog, not "refreshed by
  the SDK". Test history leaves the feature guide.
- graph-sources/sql.md, cli/sql.md: a host identity's token goes only to
  Google's APIs and FLUREE_GOOGLE_TOKEN_HOSTS, so against an ordinary
  Trino endpoint only a service-account key works unless the operator
  lists the host. The CLI's remote body, and what an older server reads
  of it.
- reference/compatibility.md: the requests graph-source routes now
  refuse (unknown fields, auth two ways or partly, unlisted `_env`
  names, a mistyped catalog), what registration now refuses, and the
  identity failures that changed code.
…zure stays refused on preview

5b7880838 let a read-only route ignore `map`'s own fields, but a key of
another read-only route (preview's `table` or `namespace`, browse's
`depth`, generate's `base_namespace`) was still refused, so one payload
sent to browse, preview and map still drew 400s.

Each route now ignores every field a route of its kind takes beside the
connection (ROUTE_FIELDS, one list for Iceberg and one for Delta), map
and validate included. A route reads its own fields first, so a shared
name keeps its own meaning there. A key no route of the kind knows is
still refused on every route.

5b7880838 also made Delta preview and verify ignore an Azure principal.
That is a storage credential: ignoring it would let a caller believe the
table was read as that principal, when Unity issues the credentials. The
400 naming `azure` is back on those two routes. Browse and generate read
only Unity's record of a table, never its files, and keep ignoring the
storage options, Azure included.
… server refuses iceberg map

- api/endpoints.md: each Iceberg and Delta route ignores the fields only
  another route of its kind takes, listed by route. Delta browse and
  generate read no data files and ignore the storage options; preview
  and verify refuse an Azure principal.
- reference/compatibility.md: the same in the behavior change, and a
  `fluree iceberg map --remote` from this release is refused with 400
  by an earlier server, which does not read the structured
  `catalog` / `io`.
@aaj3f

aaj3f commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @bplatz, this was a really careful pass. Everything in both comments is folded in here except one smaller item that turned out not to have the shape described (below), 20 commits on top of 65f8c305c.

1. The cached Google storage identity (your pre-merge ask) — ccf1348f8. You were right: the key was the stored secret reference, and a hit never asked the resolver. Now, for both storage_auth: google and catalog, the config is hydrated through the caller's resolver on every plan before the cache lookup, and the key is a digest of the resolved config, which is exactly what the identity is built from (building refuses an unresolved reference, so no entry exists for an unresolved secret). A refusing resolver fails before the cache, and a rotated secret gets a new key at once. a_caller_whose_resolver_refuses_the_secret_is_not_served_the_cached_identity covers both kinds with a scope-less resolver; with the fix reverted it fails with caller B signing as A. The old warm-plan test is now a_warm_plan_reuses_its_google_identity_but_resolves_and_proves_it_every_time. A warm plan still reuses the built identity and its token, so what's added per plan is one resolver call, the same contract the Delta handle cache already has. I checked the sibling caches too: token slots are keyed on resolved authority, and catalog clients, SQL clients, Delta handles and cached loadTables are all keyed on the graph source. One question I left open on purpose: a hit on the same graph source doesn't re-ask the resolver (Delta's does); access to the source itself is the embedder's call, so I'd keep that as is unless you see it differently.

2. Backoff — 7f2857a13, 33c5c211c, 51e6ff5f0. Google tokens and vended credentials now share one renewal helper (fluree-db-iceberg/src/renew.rs): one renewal in flight, a caller holding a still-valid credential is served it without waiting, a failed renewal is remembered for 5 s, and a refusal forces at most one renewal per 30 s, now on the vended path too (a credential the store refused is still never served again). The REST client takes its headers before the catalog permit, so a Google outage holds no catalog slot (a_slow_token_exchange_holds_no_catalog_slot). One small correction to the description, fwiw: after a failed refresh the old code did read on with the still-valid token; the real cost was every queued caller waiting for its own failing exchange in turn, which is what this removes.

3. A new CLI against an older server — 41f3f259f, a025a4f87. Remote sql map sends a bearer or OAuth2 auth as the flat fields again, literal or _env, and only a Google identity goes structured. A pre-PR server only ever read the literal flat fields, so _env secrets and Google identities still can't reach it; compatibility.md and cli/sql.md say so. iceberg map --remote doesn't have this shape: an older server refuses the structured catalog/io with a 400 rather than storing a source without auth, and that's in compatibility.md too.

4. The redactor — 6f8e7c01d. The name-based pass always runs after the typed one now, so a SQL session value under x_token, password or db_secret is masked again, and a config neither pass changes still comes back byte-identical.

5. USER_PROJECT_DENIED — 0847dc198. When the request sent x-goog-user-project, it's reported as a denial on that project naming serviceusage.services.use (the wording is shared with the GCS hint); with none sent it's still CatalogQuotaProjectRequired.

6. Docs — db711f6a0, b23ab2bdc. errors.md has the five codes; configuration.md lists azure, says aws gates the Glue and S3 Tables catalog calls, and that with FLUREE_GRAPH_SOURCE_AMBIENT_BUCKETS set an ambient source can't name an s3_endpoint; the delta/map table renders whole again; the GCS section describes the native reader as the path for every Google identity, with vended tokens renewed by asking the catalog again, and the test history is gone; sql.md and cli/sql.md say where a host identity's token may go; and compatibility.md lists everything this PR makes stricter.

The smaller items:

  • Google principal in query-facing denials — confirmed; redacted like ARNs, the server log keeps the full text (5774b6199).
  • WIF config flag — confirmed; type == "external_account" and the static validation run before any request is built, and a key file is named as such (a369ce6f7).
  • Stated catalog type — confirmed; a stated type alone picks the variant, refusals name the path (catalog.type: unknown variant…, catalog: missing field table_location), and untyped legacy records read as before (5ad1f6d2f).
  • GCS redirects — confirmed (object_store sets no policy and follows 302s); each bucket's client is built with redirects off, keeping the same timeouts and headers (5e44840e4).
  • Vended GCS fields — both confirmed; credentials are parsed only when the source reads with vended credentials, and when a catalog vends both, S3 keys win as before this PR (e7f1455e2). The same commit makes effective_storage_auth the only rule, used by plan_storage.
  • Read-only routes and map-only keys — rather than a release note, every route of a kind now ignores the fields its sibling routes take (map's, browse's depth, preview's namespace, generate's, validate's), so one payload works for browse, preview and map; an unknown key is still refused everywhere, and an Azure principal is still refused on Delta preview and verify, where it would otherwise be a storage identity quietly not used (5737923f4, 885e9c2cd).
  • Python Google("wif.json") — a string path reads like a Path, and a missing file is an InvalidRequestError (0278dc11b).
  • Unity defaults — a structured OAuth2 auth with no scope gets all-apis like the flat form; token_url can't be omitted there, so that's the only default (ac74cd6b6).

Every new test fails with its fix reverted. And per your note on #2198, the body now has a checklist line for re-keying its count cache by storage scope when it meets this.

One conflict, docs/reference/compatibility.md: both sides added subsections
to the flat Behavior changes list (this branch's strict graph-source requests,
main's v4.2.5 entries). Both are kept, this branch's first.
@aaj3f
aaj3f merged commit ec2b00e into main Nov 2, 2026
29 of 30 checks passed
@aaj3f
aaj3f deleted the feat/iceberg-google branch November 2, 2026 19:38
aaj3f added a commit that referenced this pull request Nov 2, 2026
…s-from-manifests

Brings in per-source storage identities (#2196) and the graph-source
crawl fixes (#2199).

The manifest-list totals cache is keyed by the manifest-list location
qualified by the `StorageScope` of the storage plan that read it, as
`table_metadata` and `scan_files` already are, so a total read under one
identity is never served to another.

- cache.rs: the totals accessors take the scope and key by
  `scope.qualify(location)`.
- r2rml.rs: the three totals helpers take the scope; the /info read
  decides its storage with `catalog_read_plan` and builds it with
  `catalog_read_storage(&plan, &grant)`, the query path's decision.
- iceberg_catalog.rs: `preview_iceberg_table_in` takes the identity
  context and the cache; `preview_storage_plan` is split out of
  `build_preview_storage` so the Schema-tier preview keys its totals
  by the plan's scope before building anything. The Stats-tier callers
  in iceberg_generate.rs and iceberg_validate.rs pass no cache.
- ledger_info.rs: the /info count takes a plan closure. The deadline
  bounds the plan as well as the read, because planning a Google
  identity resolves its secret and proves the identity, either of
  which can be a remote call. The plan is polled once before the
  deadline is consulted, so a plan that is ready at once (ambient,
  vended, or a warm Google identity behind a resolver that answers at
  once) still serves a warm count past the deadline.
- it_iceberg_local_fs.rs: both sides' tests are kept.
aaj3f added a commit that referenced this pull request Nov 3, 2026
…out-mapping

Brings in per-source storage identities and the one graph-source
input codec (#2196), and the graph-source crawl fixes (#2199).

Every resolution keeps both PRs' behaviour; where #2196 still offered a
way to register an Iceberg source without a mapping, this branch's rule
(a source needs a mapping) wins:

- `create_iceberg_graph_source` and `test_iceberg_connection` stay
  removed. #2196's Direct storage-policy check at registration
  (`refuse_direct_storage_the_policy_refuses`) is kept, on the one
  remaining surface. Its two tests register through
  `create_r2rml_graph_source` with a mapping.
- `IcebergCreateConfig::from_connection_for` and
  `iceberg_create_from_json` take no `has_mapping` flag, and
  `CatalogModeError::MissingTable` stays removed: a catalog mode's
  tables come from its mapping.
- `POST /iceberg/map` keeps `required_mapping` (refused in words before
  the codec runs) and the response's `connection_check`. The codec's
  `ROUTE_FIELDS` list request fields; `connection_check` is a response
  field, and this branch adds no request field.
- The CLI keeps main's codec-built connection and this branch's
  required `--r2rml` and `Connection:` line; its tests name a mapping.
- Python keeps main's builder-based connection and this branch's
  per-outcome warning, with the released "could not reach the catalog"
  wording for a catalog that did not answer.
- error.rs, errors.md: both PRs' error codes and statuses.
- The docs keep #2196's connection sections and this branch's mapping
  rule and `connection_check`.
@aaj3f aaj3f mentioned this pull request Nov 4, 2026
bplatz added a commit that referenced this pull request Nov 4, 2026
Brings #2247, #2232, #2246, #2248, #2245, #2230, #2205, #2231, #2255,
#2219, #2209, #2207, #2190, #2216, #2186, #2215, #2213, #2184, #2210,
#2206, #2198, #2187, #2183, #2200, #2193, #2199, #2196 and #2145 into next.

Resolutions:
- Novelty: main's fact-state trim (a cutoff plus a bounded sweep) and the
  dictionary's coverage watermark sit on next's graph slots and per-graph
  OrdMaps. A commit's reification links count toward coverage. Planner
  stats from segment sums decline under annotations, whose link deltas
  only the walk counts, and otherwise carry the indexed link counts.
- Stats-view identity: the index root's id reaches the snapshot through
  next's root decoder (`decode` takes the id, as `take_snapshot_metadata`
  does). `LedgerState::load_record` has a decoding-root form beside
  `load_decoding_root`.
- Transact: #2184's parallel-relationship check runs in next's link
  cascade, counting the `rdf:reifies` links on the retracted edge that the
  transaction does not retract itself. Main's bundle `edge_reifiers` is
  dropped, and `subjects_with_prior_rows` and
  `enforce_single_target_reifiers` stay deleted. The upsert pre-check
  takes main's dictionary probe and bounded seek.
- Query: geo search resolves the graph's POST tree once at open (pooled
  graphs keep their filter), an empty manifest when there is none.
  `branch_or_none` reads the dedicated branch, and the batched joins keep
  next's pooled lanes. The stats-view key hashes the root id.
- Indexer: `apply_dict_novelty` and `compact_forward_streams` take the
  cycle's compaction budget, so the term dictionary keeps its reserved
  share. `Prefetched` holds `ContentBytes`. `relocalize_sorted_commit`
  rewrites next's 20-byte types records.
- Disk cache: main's in-flight write registration, with an empty entry
  still read as crash debris that a write replaces. The process-wide
  eviction walk stays removed.
- Graph import (#2232): fenced CAS and publishes, the seed carries the
  record's namespace and fence, 32-bit graph ids and next's loaders. An
  import into a graph of an existing ledger refuses triple terms and edge
  annotations: the splice merges no triple-term dictionary yet.
- Iceberg: `create_iceberg_graph_source` goes with main (a source needs a
  mapping); the R2RML path keeps next's `model_instance`.
- CLI: main's shared import flags without the leaflet flags; `graph
  import` routes through next's process-wide server routing, and
  `upload_source_import` serves next's `Destination`. Doc sources read a
  ledger through the command's open instance.
- Tests: sibling ledger ids become distinct names, `genesis_ledger` is
  awaited, Cypher state dumps include each relationship's `rdf:reifies`
  link, and the graph-import arena test checks the refusal instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:iceberg Iceberg catalogs/credentials, R2RML, virtual datasets, materialize breaking-change Backwards-incompatible change; drives the Breaking Changes release-notes section enhancement New feature or request

Projects

None yet

2 participants