Skip to main content

ArrowFEBE — Connection guide

Everything you can put in front of ArrowFEBE to point it at a PostgreSQL server, in one place: the three ways to supply connection details, every option the driver accepts, and the PostgreSQL-specific rules (TLS / sslmode, SCRAM channel binding, integrated Kerberos/GSSAPI, GSS transport encryption).

For the wire-level detail of how each authentication method works (SCRAM-SHA-256

  • channel binding, Kerberos/GSSAPI, SSPI, gssencmode), see AUTHENTICATION.md. For read/ingest throughput knobs, see POSTGRES_TUNING.md. For the licence, see LICENSING.md.

Three ways to connect

Every driver in the Arpeio family accepts the same three connection forms. They can be mixed; a discrete option always wins over the same field taken from a connection_string or a uri, regardless of the order they are set.

FormOption keyGrammarBest for
Discrete optionsadbc.arrowfebe.<field>one option per fieldprogrammatic clients, secrets kept out of a single string
Connection stringadbc.arrowfebe.connection_stringADO.NET Key=Value;…pasting an existing SQL Server / SqlClient-style string
Connection URIuripostgresql://… URLportable tooling, copy-paste from libpq / psql / ADBC tools
Python
import adbc_driver_manager.dbapi as dbapi

# Discrete options
conn = dbapi.connect(driver="arrowfebe", db_kwargs={
"adbc.arrowfebe.server": "localhost",
"adbc.arrowfebe.database": "tpch",
"adbc.arrowfebe.username": "alice",
"adbc.arrowfebe.password": "<password>",
"adbc.arrowfebe.sslmode": "require",
}, autocommit=True)

# Connection string (ADO.NET grammar)
conn = dbapi.connect(driver="arrowfebe", db_kwargs={
"adbc.arrowfebe.connection_string":
"Server=localhost;Database=tpch;User ID=alice;Password=<password>",
}, autocommit=True)

# Connection URI (libpq grammar)
conn = dbapi.connect(driver="arrowfebe", db_kwargs={
"uri": "postgresql://alice:<password>@localhost:5432/tpch?sslmode=require",
}, autocommit=True)

Precedence is enforced by a per-field bitmask shared between the parsed result and the database handle: a parsed field from connection_string/uri is applied only if no discrete adbc.arrowfebe.* option already claimed it. Secrets held transiently on the stack during parsing are scrubbed on every return path.


Option reference

All options are string-typed and live under the adbc.arrowfebe.* namespace (a few also accept a short bare alias, noted below). Set them as ADBC database options before the connection is opened. Statement/ingest options are set on the statement — see Statement & ingest options.

Target — where to connect

OptionAliasDefaultMeaning
adbc.arrowfebe.serverhostnameHost name or address. IPv6 literals use the bracketed form [::1]; a tcp: prefix and a ,port / :port suffix in a connection_string value are accepted.
adbc.arrowfebe.portport5432TCP port, 1..65535.
adbc.arrowfebe.databasedatabaseserver default (the role's default DB)Initial database. A connection sees exactly one database (no cross-catalog).
adbc.arrowfebe.usernameusernameOS user (server-dependent)Login role.
adbc.arrowfebe.passwordpasswordPassword for the password-family auth methods.
adbc.arrowfebe.application_nameapplication_namedriver defaultProgram name reported in the startup packet (application_name GUC, pg_stat_activity.application_name).

Authentication

Full method-by-method detail is in AUTHENTICATION.md; the TLS / channel-binding options are under TLS & encryption options and the integrated path under Integrated / Kerberos authentication.

OptionValuesMeaning
adbc.arrowfebe.username / .passwordstringPassword-family credentials (SCRAM-SHA-256 / MD5 / cleartext, negotiated by the server). Aliases username / password.
adbc.arrowfebe.trustedtrue/sspi/falseIntegrated auth: POSIX Kerberos/GSSAPI or Windows SSPI, no username/password. Alias trusted.
adbc.arrowfebe.auth_typesql/SqlPassword, integrated/sspi/trustedSelects the auth mode explicitly. The Entra ID / certificate families are recognised and rejected (ArrowFEBE is the driver — it cannot delegate to a client library).
adbc.arrowfebe.krb5.keytabpathKerberos keytab for integrated auth (service accounts that cannot kinit).
adbc.arrowfebe.krb5.ccachepathKerberos credential cache (default: the ambient ccache from kinit).
adbc.arrowfebe.krb5.principalnameKerberos client principal (e.g. alice@REALM), with krb5.password for a programmatic kinit.
adbc.arrowfebe.krb5.passwordstringPassword to obtain a TGT for krb5.principal.
adbc.arrowfebe.krb5.spnSPNOverride the full derived service principal name (e.g. postgres/db.example.com@REALM).
adbc.arrowfebe.krbsrvnamenameOverride the service-name component of the SPN (default postgres, mirroring libpq).
adbc.arrowfebe.gssencmodedisable (default) / prefer / requireGSS transport encryption, negotiated before TLS and the startup packet. require skips TLS entirely. POSIX/GSSAPI builds only. See AUTHENTICATION.md.

TLS & encryption options

OptionDefaultMeaning
adbc.arrowfebe.sslmodepreferdisable / prefer / require / verify-ca / verify-full, via the FEBE SSLRequest handshake. require encrypts but does not verify the certificate; only verify-ca/verify-full do (and verify-full also checks the hostname).
adbc.arrowfebe.ssl_root_certsystem CA storePEM root-CA file used by verify-ca / verify-full.
adbc.arrowfebe.channel_bindingpreferprefer / require / disable. require enforces SCRAM-SHA-256-PLUS channel binding over TLS and refuses a PLUS-stripping downgrade.
adbc.arrowfebe.encryptCompatibility bridge for the ADO.NET TLS vocabulary. An explicit sslmode always wins; only when none is given does encrypt=true map to require (or verify-full when trust_server_cert=false). Prefer sslmode directly.
adbc.arrowfebe.trust_server_certPart of the same bridge (see encrypt). Prefer sslmode directly.

⚠️ Security — the default sslmode=prefer gives no MITM protection. Like libpq, prefer falls back to plaintext when the server answers the SSLRequest with N, and that reply is read before TLS so it is unauthenticated. Over an untrusted network use sslmode=verify-full and/or channel_binding=require. See TLS & sslmode below.

Timeouts & performance

OptionDefaultMeaning
adbc.arrowfebe.login_timeout30TCP connect budget in seconds (0 = no limit).
adbc.arrowfebe.socket_timeout0Per-I/O recv/send timeout in seconds (0 = none). Set it to bound a long-running or stalled query.
adbc.arrowfebe.query_timeout0Per-query timeout in seconds (0 = no limit).
adbc.arrowfebe.buffer_size100000Rows per streamed Arrow batch (per connection). Capped at 10,000,000; large values are safe (the driver auto-flushes early if a wide utf8/binary column would cross Arrow's 2 GiB offset limit — see POSTGRES_TUNING.md).

More tuning guidance in POSTGRES_TUNING.md.

Type rendering (read path)

OptionValuesMeaning
adbc.arrowfebe.uuid_casinglower (default) / upperHex-digit case of uuid values rendered to Arrow utf8. lower matches RFC 4122 and PostgreSQL's text output.
adbc.arrowfebe.geospatialgeoarrow.wkb (default) / wkb / binaryHow PostGIS geometry/geography columns are read. See DATA_TYPES.md.

Licence

OptionMeaning
arpeio.adbc.licenseLicence blob, inline.
arpeio.adbc.license_filePath to a .lic file.
arpeio.adbc.license.statusRead-only (GetOption); reports <state>;code=<ARROW_LIC_*>;tier=<tier>;expires=<epoch>.

The driver also reads the shared ARPEIO_ADBC_LICENCE[_FILE] environment variables and an arpeio_adbc.lic file next to the library. Full resolution order in LICENSING.md.

Standard ADBC connection options

These use the ADBC-standard keys (no arrowfebe namespace):

OptionValuesMeaning
adbc.connection.autocommittrue/falseAutocommit mode. Set true for the single-connection TRUNCATE/adbc_ingest pattern.

Transaction isolation level and session read-only are not yet exposed as ADBC options on ArrowFEBE; set them from SQL (SET TRANSACTION …, SET default_transaction_read_only) on the connection if needed.

Statement & ingest options

Set on the statement handle, not the database:

OptionDefaultMeaning
adbc.arrowfebe.batch_sizeinherits buffer_sizeRows per Arrow batch for this statement.
adbc.arrowfebe.max_batch_size1000000Upper bound for batch_size.
adbc.arrowfebe.memory_budget_mb256Decode memory budget, 16..8192 MB (option surface).
adbc.ingest.modecreatecreate / append / replace / create_append.
adbc.ingest.target_catalogTarget database for ingest.
adbc.ingest.target_db_schemaTarget schema for ingest.
adbc.ingest.temporaryfalseIngest into a TEMP table (same-session fast path).

Accepted no-ops (back-compat)

Recognised and ignored so strings copied from other Arpeio drivers still load: adbc.arrowfebe.prefetch (the double-buffered prefetch path was removed — streaming already overlaps recv with decode) and the legacy bulk knobs arrowfebe.bulk_batch_size, arrowfebe.bulk_tablock, arrowfebe.bulk_keep_identity, arrowfebe.bulk_check_constraints, arrowfebe.bulk_fire_triggers, arrowfebe.bulk_keep_nulls (SQL-Server-era ingest hints with no PostgreSQL equivalent).


Connection string (ADO.NET form)

adbc.arrowfebe.connection_string accepts the ADO.NET Key=Value;… grammar (inherited from ArrowTDS for cross-family compatibility): case-insensitive keywords, quoted values, doubled-quote escapes. Keywords map onto the options above.

Keyword(s)Option
Server, Data Source, Address, Addr, Network Addressserver
Database, Initial Catalogdatabase
User ID, UID, Userusername
Password, PWDpassword
Application Name, Appapplication_name
Encryptencrypt
TrustServerCertificatetrust_server_cert
Connection Timeout, Connect Timeout, Timeoutlogin_timeout
Integrated Security (true/sspi/yes), Trusted_Connectiontrusted
Authentication, Authenticatorauth mode (SqlPassword / integrated)
Krb5 Keytab File, Krb5 Credential Cache, Krb5 Principal, Krb5 Password, Service Principal Namethe krb5.* family
GssEncModegssencmode
KrbSrvNamekrbsrvname
Server=localhost;Database=tpch;User ID=alice;Password=secret;Integrated Security=false

Connection URI

Version

Since ArrowFEBE v0.3.6.

The standard ADBC uri option takes a libpq-style PostgreSQL URI, so a string copied from psql, a DATABASE_URL, or other PostgreSQL ADBC tooling works unchanged.

<scheme>://[user[:password]@]host[:port][/dbname][?key=value&…]
  • Schemes (case-insensitive, equivalent): postgresql://, postgres://, and the branded arrowfebe://. The scheme only selects the URL grammar — it never picks the driver, so postgresql:///postgres:// never collide with another PostgreSQL ADBC driver installed alongside this one.
  • The path segment is the database name (as in libpq) — not an instance name.
  • host, userinfo, and query values are percent-decoded; a + in a query value decodes to a space. IPv6 hosts use the bracketed form: postgresql://[::1]:5432/tpch.

Query parameters (unknown or repeated parameters are rejected):

ParameterOption
userusername
passwordpassword
dbnamedatabase (alternative spelling for callers who put it in the query)
application_nameapplication_name
connect_timeoutlogin_timeout
sslmodesslmode
channel_bindingchannel_binding
sslrootcertssl_root_cert
gssencmodegssencmode
krbsrvnamekrbsrvname

For the ADO.NET Key=Value; form use connection_string instead of uri.


TLS & sslmode

ArrowFEBE negotiates TLS with the PostgreSQL SSLRequest handshake. The sslmode values mirror libpq:

sslmodeEncryptsVerifies certificateVerifies hostname
disableno
prefer (default)if the server offers itnono
requireyesnono
verify-cayesyes (chain to ssl_root_cert / system store)no
verify-fullyesyesyes
  • prefer gives no MITM protection. The server's response to SSLRequest (S = TLS, N = plaintext) is read before TLS, so an on-path attacker can strip it and observe the cleartext / MD5 / SCRAM-without-binding exchange. Over an untrusted network use verify-full.
  • SCRAM channel binding (channel_binding=require) binds the SCRAM exchange to the server certificate (SCRAM-SHA-256-PLUS), defeating a MITM that proxies the SASL flow even without verify-full. It needs TLS, so it is unavailable under sslmode=disable or active GSS encryption.
  • verify-ca / verify-full load the CA chain from ssl_root_cert, defaulting to the system CA store.

The encrypt / trust_server_cert options are a compatibility bridge for callers who think in the ADO.NET vocabulary and are mapped to sslmode only when no explicit sslmode is given. Prefer setting sslmode directly.


Integrated / Kerberos authentication

Version

Since ArrowFEBE v0.2.0.

Set adbc.arrowfebe.auth_type=integrated (or adbc.arrowfebe.trusted=true) to authenticate with no username/password: POSIX Kerberos/GSSAPI (FEBE auth codes 7/8) on Linux/macOS, or Windows SSPI (code 9, Negotiate: Kerberos with NTLM fallback). Mutual authentication is always required and enforced — the driver refuses AuthenticationOk from a server that never completed the GSS exchange, and refuses password-family requests while this mode is active.

Python
# 1. Obtain a ticket:  kinit alice@REALM
# 2. Connect — the ambient ccache is used automatically:
conn = dbapi.connect(driver="arrowfebe", db_kwargs={
"adbc.arrowfebe.server": "db.example.com",
"adbc.arrowfebe.database": "mydb",
"adbc.arrowfebe.auth_type": "integrated",
# optional explicit credentials:
# "adbc.arrowfebe.krb5.ccache": "/tmp/krb5cc_1000",
# "adbc.arrowfebe.krb5.keytab": "/etc/postgresql/pg.keytab",
})

GSS transport encryption (adbc.arrowfebe.gssencmode): disable (default — a deliberate divergence from libpq's prefer), prefer, or require. require encrypts the whole stream over GSSAPI and skips TLS entirely, so it cannot be combined with sslmode=require/verify-ca/verify-full, and SCRAM channel binding is unavailable (plain SCRAM still works inside the encrypted stream). POSIX/GSSAPI builds only.

The full method-by-method reference, the SPN derivation, and the febe_krb_diag diagnostic CLI are in AUTHENTICATION.md.


See also