Add OAuthConfig and OAuthHeaderProvider to the Rust core with support for five OAuth flows: ClientCredentials, AuthorizationCodePKCE, DeviceCode, AzureManagedIdentity, and WorkloadIdentity. Token acquisition and auto-refresh happen entirely in Rust. Python and TypeScript expose OAuthConfig as a plain config object that maps to the Rust header provider via FFI — no dynamic callbacks cross the language boundary. ConnectBuilder gains an oauth_config() method that replaces the API key requirement when OAuth is configured.
2.5 KiB
@lancedb/lancedb • Docs
@lancedb/lancedb / ConnectionOptions
Interface: ConnectionOptions
Properties
apiKey?
optional apiKey: string;
(For LanceDB cloud only): the API key to use with LanceDB Cloud.
Can also be set via the environment variable LANCEDB_API_KEY.
clientConfig?
optional clientConfig: ClientConfig;
(For LanceDB cloud only): configuration for the remote HTTP client.
hostOverride?
optional hostOverride: string;
(For LanceDB cloud only): the host to use for LanceDB cloud. Used for testing purposes.
manifestEnabled?
optional manifestEnabled: boolean;
(For LanceDB OSS only): use directory namespace manifests as the source of truth for table metadata. Existing directory-listed root tables are migrated into the manifest on access.
namespaceClientProperties?
optional namespaceClientProperties: Record<string, string>;
(For LanceDB OSS only): extra properties for the backing namespace client used by manifest-enabled native connections.
oauthConfig?
optional oauthConfig: NativeOAuthConfig;
(For LanceDB cloud only): OAuth configuration for IdP-based authentication (e.g., Azure Entra ID). When set, token acquisition and refresh are handled entirely in Rust.
readConsistencyInterval?
optional readConsistencyInterval: number;
(For LanceDB OSS only): The interval, in seconds, at which to check for updates to the table from other processes. If None, then consistency is not checked. For performance reasons, this is the default. For strong consistency, set this to zero seconds. Then every read will check for updates from other processes. As a compromise, you can set this to a non-zero value for eventual consistency. If more than that interval has passed since the last check, then the table will be checked for updates. Note: this consistency only applies to read operations. Write operations are always consistent.
region?
optional region: string;
(For LanceDB cloud only): the region to use for LanceDB cloud. Defaults to 'us-east-1'.
session?
optional session: Session;
(For LanceDB OSS only): the session to use for this connection. Holds shared caches and other session-specific state.
storageOptions?
optional storageOptions: Record<string, string>;
(For LanceDB OSS only): configuration for object storage.
The available options are described at https://docs.lancedb.com/storage/