Skip to content

Add AWS-agnostic access-delegation hooks#1118

Open
The-Alchemist wants to merge 2 commits into
duckdb:mainfrom
The-Alchemist:feature/access-delegation-hooks
Open

Add AWS-agnostic access-delegation hooks#1118
The-Alchemist wants to merge 2 commits into
duckdb:mainfrom
The-Alchemist:feature/access-delegation-hooks

Conversation

@The-Alchemist

Copy link
Copy Markdown
Contributor

Use Case

Goal is to allow authentication using external authentication mechanisms without bloating duckdb-iceberg repo.

For example, to use all S3 Tables features, you need to use AWS Lake Formation auth, basically.

Description

Introduce a provider-agnostic extension point so external extensions can supply scan-time credentials and mandatory row filters without any AWS/Lake-Formation code living in duckdb-iceberg.

  • IcebergPluginRegistry (stored on the database ObjectCache) plus an IcebergAccessDelegationProvider interface and dispatch helpers.
  • Generic mandatory_delegation_filter_* slots on IcebergScanInfo and a DelegationRowFilterOptimizer that re-applies them above LOGICAL_GET.
  • Dispatch call sites in ATTACH option parsing, table load, scan credential prep, mandatory filter binding, and per-partition refresh.
  • Opaque per-table delegation state on IcebergTableInformation; a generic access_delegation_provider string + delegation_options passthrough.

Introduce a provider-agnostic extension point so external extensions can
supply scan-time credentials and mandatory row filters without any
AWS/Lake-Formation code living in duckdb-iceberg.

- IcebergPluginRegistry (stored on the database ObjectCache) plus an
  IcebergAccessDelegationProvider interface and dispatch helpers.
- Generic mandatory_delegation_filter_* slots on IcebergScanInfo and a
  DelegationRowFilterOptimizer that re-applies them above LOGICAL_GET.
- Dispatch call sites in ATTACH option parsing, table load, scan
  credential prep, mandatory filter binding, and per-partition refresh.
- Opaque per-table delegation state on IcebergTableInformation; a generic
  access_delegation_provider string + delegation_options passthrough.

No AWS SDK, vcpkg, or Lake Formation specifics are added; those live in
the separate lake_formation community extension.

Signed-off-by: Karl Pietrzak <karl@medplum.com>
An unknown ACCESS_DELEGATION_MODE is treated as the name of an extension
that registers an access-delegation provider, which is autoloaded. When
no such extension exists the raw autoload failure leaked through; catch it
and raise a single clear "Unrecognized access mode" error that also lists
the built-in modes. Update the Nessie test to the new message.

Signed-off-by: Karl Pietrzak <karl@medplum.com>
@The-Alchemist
The-Alchemist marked this pull request as ready for review June 28, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant