Skip to content

Quack TLS result — FLT-281

2026-10-30. Cedric Jones-Gaffney. Local protocol investigation complete; provider implementation, build/test/pack, review, and commit BLOCKED. Nothing pushed or deployed.

Verified result

The installed Windows DuckDB 2.0.0 CLI successfully connects over TLS when the client pins the server's leaf certificate using SSL_FINGERPRINT. A different pin fails. Prefer this option over disabling TLS.

Server / client configuration Observed result
Explicit certificate/key, default client TLS Exit 1, SSL connect error
Same server, ATTACH CA_CERT_FILE Exit 1, SSL connect error
Same server, DISABLE_SSL false, SSL_FINGERPRINT with correct leaf SHA-256 Exit 0; reads remote_tls_table_ok from a table created only on the server
Same server, incorrect SHA-256 pin Exit 1; explicit certificate fingerprint mismatch
Same server, HTTPFS SET ca_cert_file and SET enable_server_cert_verification=true Exit 1, SSL connect error
Server disable_ssl=true, client DISABLE_SSL true Exit 0; reads remote_http_table_ok from the server
HTTP server, default non-local client TLS Exit 1, SSL connect error

ca_cert_file exists as an HTTPFS setting, but neither tested CA-file route worked for Quack. The ATTACH attempt did not report an unknown-option error; its failure is not proof that the parser rejects that option. No CaCertFile provider API should be promised on these results. The verified mechanism is certificate pinning. Pinning checks the exact leaf certificate; these tests do not establish CA-chain or hostname verification semantics for the pin path.

CLI identity: C:\Tools\duckdb\2.0.0\duckdb.exe --version returned v2.0.0 (Cyanoptera) d54cbbe3df. Loaded extension versions: Quack f96420ed46, HTTPFS 77392a7207 (core distribution). The Cloud Run libduckdb build and DuckDB.NET path were not tested. This is local evidence supporting the suspected TLS cause, not proof of the deployed app's root cause or a deployed fix.

Exact production configuration to apply after implementation and deployment validation

Preferred server, using the existing database initialization and an environment-supplied token:

LOAD quack;
CALL quack_serve(
    'quack:10.10.0.10:9494',
    token = getenv('QUACK_TOKEN'),
    allow_other_hostname = true,
    disable_ssl = false,
    ssl_cert_file = '/etc/quack/tls/server.pem',
    ssl_key_file = '/run/secrets/quack/server-key.pem'
);

Preferred client:

ATTACH 'quack:10.10.0.10:9494' AS app (
    TOKEN getenv('QUACK_TOKEN'),
    DISABLE_SSL false,
    SSL_FINGERPRINT getenv('QUACK_SSL_FINGERPRINT')
);
USE app;

QUACK_SSL_FINGERPRINT must be the SHA-256 hash of the deployed leaf certificate's DER bytes: 64 hexadecimal characters, without colons (lowercase tested). Calculate it from the trusted certificate artifact, not from an unauthenticated connection. It is not the CA's fingerprint or a public-key/SPKI hash. Certificate rotation requires updating the client pin. An explicit DISABLE_SSL false avoids the automatic HTTP default for local URIs.

Required file/secret placement:

  • Server public leaf certificate: /etc/quack/tls/server.pem, readable by the Quack service account; IP SAN must contain 10.10.0.10.
  • Server private key: store in Secret Manager, expose to the service only at /run/secrets/quack/server-key.pem, service-account-only read permissions. Never put the key in git or a container image.
  • CA public certificate: /etc/quack/tls/ca.pem for issuance/audit. The tested pinned client does not need this file.
  • CA private key: separate restricted issuance secret in Secret Manager/offline issuance storage; do not install it on the Quack server or client.
  • Client: token supplied from its existing secret mechanism, leaf fingerprint supplied as trusted configuration. No server private key or CA private key on the client.

These are proposed deployment paths, not files deployed by this session. Generate production-only keys through the approved secret workflow. Do not deploy the disposable local probe keys described below.

Fallback, only if Andrew chooses the unencrypted transport trade-off:

CALL quack_serve(
    'quack:10.10.0.10:9494',
    token = getenv('QUACK_TOKEN'),
    allow_other_hostname = true,
    disable_ssl = true
);

ATTACH 'quack:10.10.0.10:9494' AS app (
    TOKEN getenv('QUACK_TOKEN'),
    DISABLE_SSL true
);
USE app;

HTTP exposes the token, queries, and results in plaintext to observers on the path. Network allowlists do not encrypt traffic. TLS pinning worked locally, so HTTP is not needed to solve the tested certificate-trust problem. No production configuration was changed.

Local experiment and reproduction

.NET CertificateRequest generated a 10-year self-signed CA and a 9-year server certificate signed by it, using RSA 3072 and SHA-256. The server has IP SANs 10.10.0.10 and this PC's Wi-Fi address 10.0.0.3, plus the server-authentication EKU. No machine trust-store installation was performed.

Temporary certificates, keys, SQL, and operational probe scripts are outside git:

C:\Users\fives\AppData\Local\Temp\quack-tls-627cc9040e3742aa9173d3ad03248862\
  ca.pem
  ca-key.pem
  server.pem
  server-key.pem
  fingerprint.txt
  probe.ps1
  probe-http.ps1
  *.sql

The scripts generate a fresh random 32-byte token at runtime in QUACK_TLS_PROBE_TOKEN. Both CLI processes inherit it. SQL reads getenv('QUACK_TLS_PROBE_TOKEN'); no token literal is placed in command arguments or SQL files. Server output is captured in memory and the token is replaced with <REDACTED> before saving receipts. The tested token is not a production credential.

Both scripts run hidden using PowerShell Start-Process -WindowStyle Hidden. They launch the installed DuckDB executable with ProcessStartInfo.CreateNoWindow=true, redirected I/O, and arguments:

duckdb.exe -no-agent -batch -init <temporary-case.sql>

Each process uses SET threads=1; SET memory_limit='128MB'; LOAD quack;. Server stdin stays open during separate CLI client runs. TLS uses LAN port 19494; HTTP uses 19495. Servers have an in-memory test table, not production data. Owned servers are stopped in finally; post-run checks confirm both ports no longer accept connections. No GCP, VM, other repository, firewall, or trust-store changes were made.

Exact local TLS server SQL:

CREATE TABLE tls_probe(receipt VARCHAR);
INSERT INTO tls_probe VALUES ('remote_tls_table_ok');
CALL quack_serve('quack:10.0.0.3:19494',
    token=getenv('QUACK_TLS_PROBE_TOKEN'),
    allow_other_hostname=true,
    disable_ssl=false,
    ssl_cert_file=getenv('QUACK_TLS_PROBE_CERT'),
    ssl_key_file=getenv('QUACK_TLS_PROBE_KEY'));

Exact successful local TLS client SQL:

ATTACH 'quack:10.0.0.3:19494' AS r (
    TOKEN getenv('QUACK_TLS_PROBE_TOKEN'),
    DISABLE_SSL false,
    SSL_FINGERPRINT getenv('QUACK_TLS_PROBE_PIN'));
SELECT * FROM r.tls_probe;

QUACK_TLS_PROBE_CERT, QUACK_TLS_PROBE_KEY, and QUACK_TLS_PROBE_CA point to the temporary files above. QUACK_TLS_PROBE_PIN contains the leaf SHA-256 shown in the receipt. The negative pin test uses the same SQL with a separate environment variable containing 64 zeroes. The CA ATTACH test substitutes CA_CERT_FILE getenv('QUACK_TLS_PROBE_CA') for the pin option. The CA setting test uses:

LOAD httpfs;
SET ca_cert_file=getenv('QUACK_TLS_PROBE_CA');
SET enable_server_cert_verification=true;
ATTACH 'quack:10.0.0.3:19494' AS r (
    TOKEN getenv('QUACK_TLS_PROBE_TOKEN'), DISABLE_SSL false);
SELECT * FROM r.tls_probe;

Exact local HTTP server/client SQL:

CREATE TABLE http_probe(receipt VARCHAR);
INSERT INTO http_probe VALUES ('remote_http_table_ok');
CALL quack_serve('quack:10.0.0.3:19495',
    token=getenv('QUACK_TLS_PROBE_TOKEN'),
    allow_other_hostname=true,
    disable_ssl=true);

-- Separate CLI process:
ATTACH 'quack:10.0.0.3:19495' AS r (
    TOKEN getenv('QUACK_TLS_PROBE_TOKEN'), DISABLE_SSL true);
SELECT * FROM r.http_probe;

Work remaining and blocking receipts

Worktree/branch creation was attempted before implementation:

> git worktree add -b quack-tls .worktrees/quack-tls round-2
Preparing worktree (new branch 'quack-tls')
fatal: cannot lock ref 'refs/heads/quack-tls': Unable to create 'C:/Users/fives/source/repos/EFCore.DuckDB/.git/refs/heads/quack-tls.lock': Permission denied

The session filesystem policy explicitly makes .git read-only and permits no approval escalation. git worktree list still shows only 575f509 [round-2]; git branch --list quack-tls returns nothing. A writable worktree/Git metadata is required to continue. No alternate Git directory, sandbox bypass, or source edits in the main checkout were attempted. This report is the specifically requested root result artifact.

The cross-family council-plan call was also blocked before execution:

Tool: mcp__webseat__ask, provider=grok, model=grok-4.5
MCP tool call requires approval, but approval policy is never

No independent plan approval or commit-review verdict was obtained. The mandatory council gate remains unsatisfied; an operational, authorized review route is needed before implementation/commit.

Pending implementation (NOT DONE): add DuckDBQuackOptions and a backward-compatible UseQuack(uri, token, configure) overload with explicit DisableSsl and verified SslFingerprint support. Snapshot configuration, reject contradictory HTTP+pin configuration, force TLS when pinning, and preserve literal escaping and token-redacted sync/async errors. Do not expose unverified CA-file support. Existing edit/test locations:

  • src/EFCore.DuckDB/Infrastructure/DuckDBDbContextOptionsBuilder.cs
  • src/EFCore.DuckDB/Diagnostics/DuckDBQuackConnectionInterceptor.cs
  • New DuckDBQuackOptions type in the provider's infrastructure namespace.
  • tests/EFCore.DuckDB.Tests/QuackTests.cs: existing exact SQL, sync/async redaction, failed-connection, and persistent-source tests.

Pending validation/packaging (NOT RUN): dotnet build -c Release -m:1, then dotnet test -c Release -m:1, serially and hidden; council-code-review; explicit-path commit on quack-tls with message EFCore.DuckDB: Quack ATTACH TLS options and trailer Co-Authored-By: Cedric (Codex gpt-6-astra) <noreply@openai.com>; then dotnet pack -c Release. The brief prohibits pushing; no push occurred.

Documentation checked: Quack overview, reference, security. The current reference documents SSL_FINGERPRINT and server disable_ssl; this report's support claims come from the CLI experiments below.

Exact saved CLI and certificate receipts

The following text is copied from .research/quack-tls/; only runtime authentication tokens were redacted. CASE, EXIT, and TIMEOUT are probe-runner metadata; the remaining lines are captured CLI stdout/stderr. Expected negative cases exit 1. No client timed out.

loaded-capabilities

extension_name,extension_version,installed_from
autocomplete,v2.0.0,
core_functions,v2.0.0,
httpfs,77392a7207,core
icu,v2.0.0,
json,v2.0.0,
parquet,v2.0.0,
quack,f96420ed46,core
shell,v2.0.0,
function_name,parameters,parameter_types
quack_generate_keys,[directory],[VARCHAR]
quack_query,"[uri, query, disable_ssl, ssl_fingerprint, token, client_id, heartbeat_timeout]","[VARCHAR, VARCHAR, BOOLEAN, VARCHAR, VARCHAR, VARCHAR, UBIGINT]"
quack_serve,"[listen_uri, disable_ssl, ssl_cert_file, ssl_key_file, allow_other_hostname, token, secret, create_secret_if_not_exists]","[VARCHAR, BOOLEAN, VARCHAR, VARCHAR, BOOLEAN, VARCHAR, VARCHAR, BOOLEAN]"
quack_serve,"[disable_ssl, ssl_cert_file, ssl_key_file, allow_other_hostname, token, secret, create_secret_if_not_exists]","[BOOLEAN, VARCHAR, VARCHAR, BOOLEAN, VARCHAR, VARCHAR, BOOLEAN]"
name,value
arrow_lossless_conversion,false
ca_cert_file,
enable_server_cert_verification,false
-- Loading resources from C:\Users\fives\AppData\Local\Temp\quack-tls-627cc9040e3742aa9173d3ad03248862\capabilities.sql

certificate

Generation: .NET CertificateRequest; RSA 3072; SHA-256; PKCS#1 signatures
Subject: CN=Quack TLS Local Probe Server
Issuer: CN=Quack TLS Local Probe CA
NotBefore UTC: 2026-10-30T08:52:51.0000000Z
NotAfter UTC: 2035-10-30T08:57:51.0000000Z
Leaf SHA256: c87de0f2e8a4bc056a7161e9f7d248b153b6e0b746ef5187d2bc3a451f775d58
Subject Alternative Name: IP Address=10.10.0.10, IP Address=10.0.0.3
Basic Constraints: Subject Type=End Entity, Path Length Constraint=None
Key Usage: Digital Signature, Key Encipherment (a0)
Enhanced Key Usage: Server Authentication (1.3.6.1.5.5.7.3.1)

tls-server

CASE=tls-server
EXIT=0
TIMEOUT=False
listen_uri,listen_url,auth_token
quack:10.0.0.3:19494,https://10.0.0.3:19494,<REDACTED>
-- Loading resources from C:\Users\fives\AppData\Local\Temp\quack-tls-627cc9040e3742aa9173d3ad03248862\tls-server.sql

tls-default

CASE=tls-default
EXIT=1
TIMEOUT=False
-- Loading resources from C:\Users\fives\AppData\Local\Temp\quack-tls-627cc9040e3742aa9173d3ad03248862\tls-default.sql
IO Error: Failed to send message: IO Error: SSL connect error error for HTTP POST to 'https://10.0.0.3:19494/quack'
Encountered errors while executing init file "C:\Users\fives\AppData\Local\Temp\quack-tls-627cc9040e3742aa9173d3ad03248862\tls-default.sql". Exiting.

tls-ca-attach

CASE=tls-ca-attach
EXIT=1
TIMEOUT=False
-- Loading resources from C:\Users\fives\AppData\Local\Temp\quack-tls-627cc9040e3742aa9173d3ad03248862\tls-ca-attach.sql
IO Error: Failed to send message: IO Error: SSL connect error error for HTTP POST to 'https://10.0.0.3:19494/quack'
Encountered errors while executing init file "C:\Users\fives\AppData\Local\Temp\quack-tls-627cc9040e3742aa9173d3ad03248862\tls-ca-attach.sql". Exiting.

tls-pin

CASE=tls-pin
EXIT=0
TIMEOUT=False
receipt
remote_tls_table_ok
-- Loading resources from C:\Users\fives\AppData\Local\Temp\quack-tls-627cc9040e3742aa9173d3ad03248862\tls-pin.sql

tls-wrong-pin

CASE=tls-wrong-pin
EXIT=1
TIMEOUT=False
-- Loading resources from C:\Users\fives\AppData\Local\Temp\quack-tls-627cc9040e3742aa9173d3ad03248862\tls-wrong-pin.sql
IO Error: Failed to send message: the certificate presented by https://10.0.0.3:19494 does not match the pinned ssl_fingerprint
Encountered errors while executing init file "C:\Users\fives\AppData\Local\Temp\quack-tls-627cc9040e3742aa9173d3ad03248862\tls-wrong-pin.sql". Exiting.

tls-ca-setting

CASE=tls-ca-setting
EXIT=1
TIMEOUT=False
-- Loading resources from C:\Users\fives\AppData\Local\Temp\quack-tls-627cc9040e3742aa9173d3ad03248862\tls-ca-setting.sql
IO Error: Failed to send message: IO Error: SSL connect error error for HTTP POST to 'https://10.0.0.3:19494/quack'
Encountered errors while executing init file "C:\Users\fives\AppData\Local\Temp\quack-tls-627cc9040e3742aa9173d3ad03248862\tls-ca-setting.sql". Exiting.

http-server

CASE=http-server
EXIT=0
TIMEOUT=False
listen_uri,listen_url,auth_token
quack:10.0.0.3:19495,http://10.0.0.3:19495,<REDACTED>
-- Loading resources from C:\Users\fives\AppData\Local\Temp\quack-tls-627cc9040e3742aa9173d3ad03248862\http-server.sql

http-explicit

CASE=http-explicit
EXIT=0
TIMEOUT=False
receipt
remote_http_table_ok
-- Loading resources from C:\Users\fives\AppData\Local\Temp\quack-tls-627cc9040e3742aa9173d3ad03248862\http-explicit.sql

http-default-client

CASE=http-default-client
EXIT=1
TIMEOUT=False
-- Loading resources from C:\Users\fives\AppData\Local\Temp\quack-tls-627cc9040e3742aa9173d3ad03248862\http-default-client.sql
IO Error: Failed to send message: IO Error: SSL connect error error for HTTP POST to 'https://10.0.0.3:19495/quack'
Encountered errors while executing init file "C:\Users\fives\AppData\Local\Temp\quack-tls-627cc9040e3742aa9173d3ad03248862\http-default-client.sql". Exiting.

cleanup

Port 19494: not accepting connections
Port 19495: not accepting connections

Jira FLT-281 · Vikunja — No repo-local BOARD.md exists.