flAPI v26.11.25: DuckDB 2.0.1, sandboxed remote templates, and what changed since September
flAPI v26.11.25 is out. This post covers everything between v26.09.19 and v26.11.25: eight releases in about two months. The short version:
- flAPI runs on DuckDB 2.0.1.
- Templates of a remote configuration run with DuckDB's external access off.
- A switch logs every HTTP request DuckDB makes, with the flAPI request that caused it.
- Users fetched from AWS Secrets Manager are no longer readable from SQL.
- Releases and Docker images ship their DuckDB extensions; the
-runtimeimage has bigquery again. - flAPI has a Claude Code plugin.
Several of these change behaviour. The upgrade notes are at the end; read them before you roll out.
DuckDB 2.0.1 (v26.11.23)
flAPI moved from DuckDB 1.5.5 to 2.0.1. core_functions, parquet, json and icu are now built into the binary, so they are never downloaded or installed. A state directory written by 1.5.5 (duckdb.db_path, DuckLake catalogs) keeps working unchanged.
The same release made the server faster and leaner. On the project's 50-endpoint benchmark (24 cores, against v26.11.21), a simple endpoint went from about 1,500 to about 7,600 requests per second at 64 clients, and from 22 to about 5,500 on a single keep-alive client. Peak memory is 10-50% lower in every scenario. Row-heavy pages at 64 clients are about 20% slower, and startup takes about 0.1 s instead of 0.05 s; both come from DuckDB 2.0 itself. The main causes, each measured on its own:
TCP_NODELAYon every connection: every keep-alive response after the first used to wait about 40 ms.- The
COUNT(*)behindtotal_countruns only when the page cannot tell the total. MCP tool calls never count, and the new endpoint optiontotal-count: falsedrops the total entirely. - Each request thread reuses its DuckDB connection and cached prepared statements.
- Rows are written straight into the response text. A 200k-row response peaked at about 640 MB before and about 260 MB now.
Time travel to a future timestamp now answers 400 snapshot_in_future instead of a 500.
Templates of remote configs are sandboxed (v26.11.25)
Before this release, a template could read any local file (read_csv('/etc/passwd')), any URL or bucket, ATTACH or COPY anywhere and LOAD any extension. With the configuration in a bucket, that meant anyone with write access to the bucket could do the same through the server.
The new top-level block duckdb-hardening controls this:
duckdb-hardening:
external-access: auto # auto (default) | full | restricted
allowed-directories:
- s3://shared-reference-data/
auto is restricted when --config is remote (s3://, gs://, az://, http(s)://) and full otherwise, so local configs and packed bundles see no change. restricted preloads the extensions flAPI needs, allows the config's directory or URL prefix, template.path, the DuckLake data-path and the listed extras, then switches DuckDB's enable_external_access off and locks its configuration.
Each template statement must also be of an allowed type. Queries, DML, MERGE, CREATE/DROP/ALTER of tables and views, COPY, transactions and session-scoped SET are fine. PRAGMA, IMPORT/EXPORT DATABASE, ATTACH/DETACH, INSTALL/LOAD, CREATE/DROP SECRET and SET GLOBAL are refused. The startup log names the policy: external access: restricted (...; allowed: ...).
The details are in Security hardening.
A log of DuckDB's HTTP requests (v26.11.25)
When a template reads from S3, GCS or HTTP(S), DuckDB makes the requests, and until now nothing in the flAPI log showed them. log-http-requests: true (or FLAPI_LOG_HTTP_REQUESTS=1, which wins when set) writes one info line per request:
duckdb http GET http://minio:9000/mybucket/data/obj3.csv -> 206 4ms request_id=req-1a846510d386e8d8
The request_id is the flAPI request whose query caused it, also on DuckDB's worker threads, or - for startup reads. Headers are never printed, and the query string is always ?redacted. Secrets in URL paths are not redacted, so this is a debugging switch, not something to leave on in production. Off, it costs nothing: DuckDB logging is not enabled. See Observability.
Secrets-Manager users out of SQL reach (v26.11.25)
auth.from-aws-secretmanager used to store the fetched user list (usernames, passwords, roles) in a table auth_<name> of the main DuckDB. Any template could SELECT it, and the config service's schema API listed it. The bootstrap credentials were a DuckDB secret of the same database.
Now:
- The AWS SDK fetches the secret once at startup, and flAPI keeps the user list in memory.
secret-id/secret-keygo straight to the AWS SDK; with neither set, the SDK's default credential chain is used.- A custom
init:runs in a private DuckDB instance, never the one templates use. secret-tableis accepted and ignored, with a warning.- Credentials are no longer logged, and connection
init:literals are redacted in the config APIs. - An unknown Basic-auth username takes as long to refuse as a wrong password.
Secrets-Manager auth also works without a session token now (every request carried X-Amz-Security-Token: NULL before), and the top-level auth: block reads from-aws-secretmanager at all. See Authentication and the rotation recipe.
Extensions ship with the release (v26.11.23, v26.11.25)
The release archives and the Docker images carry the signed default extensions (httpfs, ducklake, fts, postgres, sqlite) for their DuckDB version and platform, in extensions/ next to the binary (/app/extensions in the images). A fresh host starts with no download and no network.
flapi extensions install --defaults installs the default set, and a release binary copies its shipped files instead of downloading them, so flapi pack --with-extensions works offline. The -runtime Docker image adds bigquery; v26.11.23-runtime was built without it, and v26.11.25 makes the image build fail rather than leave it out again. See DuckDB Extensions.
A Claude Code plugin (v26.11.21)
The flAPI repository is now a Claude Code plugin marketplace:
/plugin marketplace add DataZooDE/flapi
/plugin install flapi@flapi
It brings ten skills (setup, REST endpoints, MCP tools, auth, cache design, cache tuning, testing, live configuration, deployment, operations), seven slash commands, an MCP server entry for your running flAPI and a hook that validates your config after every edit and hot-reloads the affected endpoints. See Claude Code Plugin.
Other headline changes since v26.09.19
- v26.11.21 — remote templates. A remote
template.path(s3://,gs://,az://,http(s)://) loads,gs://andaz://authenticate from the environment, and credentials from the environment become DuckDB secrets that templates cannot read. The cache scheduler is on by default, and a top-levelauth:block now protects every endpoint without its own. - v26.10.31 — security hardening and serverless startup. Stricter request validators and pagination parameters, three rate-limit bypasses closed, a safe
flapi pack/unpack. For scale-to-zero platforms:ducklake.warmup,--no-cache-warmup, read-only DuckLake replicas, the one-shotflapi cache refresh, and offline extensions. - v26.10.2 — safer configuration.
template.environment-whitelistis enforced for YAML files too: an unlisted{{env.NAME}}stops startup, and an empty whitelist allows none. Unknown top-level keys are reported, and aserver:block is an error. - v26.09.26 — a failed start exits cleanly, and a clean stop releases the DuckLake catalog.
- v26.09.23 — a slow query no longer blocks other requests, and
auth.*works in MCP templates. - v26.09.20 — concurrent reads and writes no longer wedge a SQLite attachment, and readiness fails while a request is stalled.
Upgrade notes
From the flAPI CHANGELOG, condensed. The full text is in CHANGELOG.md.
v26.11.25
- Remote-config deployments whose templates read other buckets or local paths must list them in
duckdb-hardening.allowed-directories(orallowed-paths), or setduckdb-hardening.external-access: full. Otherwise those reads fail withPermission Error: ... disabled by configuration. - Under
restricted, an extension a template needs must be loaded at startup:LOADit in a connectioninit, or list it induckdb.default-extensions, which replaces the defaults. Secrets go in a connectioninit.ATTACH,PRAGMAandSET GLOBALin templates fail, and so doesduckdb_extensions(). - A template that read the Secrets-Manager table
auth_<name>now gets an error. Old tables in a fileduckdb.db_pathare dropped at startup. If you ran with a persistentdb_path, rotate those passwords: any template could read them. secret-idwithoutsecret-key(or the reverse) is a startup error. A Secrets-Managerinit:that creates no matching S3 secret stops startup, and itsATTACHorSETno longer reaches templates.
v26.11.23
- New database files and DuckLake catalogs are 2.0-only: DuckDB 1.x cannot read them. To roll back to a 1.5-based flAPI, keep a copy of the state directory or rebuild the caches.
- DuckDB 2.0 SQL changes: the single-arrow lambda
x -> ...is an error (writelambda x : ...);//and%by zero raise an error; any error inside an explicit transaction aborts it; aMERGEwith several matching source rows gives a nondeterministic value. -runtimeimage: extensions moved from/opt/flapi/extensionsto/app/extensions, andFLAPI_EXTENSION_DIRECTORYis no longer set.- The
flapi-iowheels carry no extensions; a pip-installed flapi downloads them on first start. - Offline images must re-populate
FLAPI_EXTENSION_DIRECTORYfor DuckDB 2.0.1 withflapi extensions install. flapi.db.result_set_bytesis gone; the response size isflapi.result.byteson the request span.INTERVALvalues render as DuckDB's text (1 day 00:01:00), and Arrow honours an explicit?limit=/?offset=.
v26.11.21 and earlier
--validate-configexits 1 for a missingtemplate-sourcefile. With a remote config, atemplate-sourceoutsidetemplate.pathfails startup.- DuckDB's session
TimeZoneisUTCunless you setduckdb: {TimeZone: ...}. DECIMALvalues with more than 15 significant digits are JSON strings.cache.rollback-windowandcache.delete-handlingare deprecated; they never had an effect.- Validators reject a value with a single quote and an SQL-looking character or word (v26.10.31); numeric and boolean fields are actually validated.
${VAR}was never a supported syntax; write{{env.VAR}}, and whitelist the variable undertemplate.environment-whitelist(v26.10.2).
Get it
pip install flapi-io # flapi server + flapii CLI
docker pull ghcr.io/datazoode/flapi:v26.11.25
Release archives for Linux (x86_64, ARM64), macOS (Apple Silicon) and Windows are on the GitHub releases page.