Brokoli
Connections

Connections Overview

Manage credentials for databases, APIs, and external services with encrypted storage.

Manage credentials for databases, APIs, and external services. Passwords are encrypted at rest.

What are connections

A connection stores the credentials and host information needed to access an external system. Instead of hardcoding database URIs or API keys in pipeline configs, you reference a connection by its ID:

{"conn_id": "prod-postgres"}

The engine resolves the connection ID to a full URI at runtime.

Connection types

TypeLabelUse case
postgresPostgreSQLDatabase source/sink nodes
mysqlMySQLDatabase source/sink nodes
sqliteSQLiteDatabase source/sink nodes
httpHTTP / REST APIAPI source/sink nodes
sftpSFTP / SSHFile transfers
s3Amazon S3Cloud storage
genericGenericAny TCP service

Encryption

All passwords and the extra field are encrypted with AES-256-GCM before storage. The encryption key is stored in {db_path}.key (e.g., broked.db.key).

  • Passwords are never returned in API responses (always ********)
  • The extra field (for headers, tokens, etc.) is encrypted and only decrypted when actually used
  • The encryption key is generated automatically on first run

Protect your key file: Back up the .key file. If lost, encrypted connection passwords cannot be recovered.

Creating connections

UI

Go to Connections in the sidebar and click New Connection. Fill in the type, host, port, credentials, and click Save.

API

curl -X POST http://localhost:8080/api/connections \
  -H "Content-Type: application/json" \
  -d '{
    "conn_id": "prod-postgres",
    "type": "postgres",
    "host": "db.example.com",
    "port": 5432,
    "schema": "mydb",
    "login": "etl_user",
    "password": "secret123"
  }'

Python SDK

Connections are managed via the UI or API, not the SDK. Reference them in pipelines by conn_id.

Testing connections

Test connectivity before using a connection in a pipeline:

curl -X POST http://localhost:8080/api/connections/prod-postgres/test

Response:

{"success": true, "message": "Connected successfully (pgx)", "driver": "pgx"}

Connection fields

FieldTypeDescription
conn_idstringUnique slug identifier (required)
typestringConnection type (required)
hoststringHostname or URL
portintPort number
schemastringDatabase name
loginstringUsername
passwordstringPassword (encrypted at rest)
extrastringJSON string for additional config (encrypted at rest)

Using connections in pipelines

Reference by conn_id in any node that supports it:

{
  "type": "source_db",
  "config": {
    "conn_id": "prod-postgres",
    "query": "SELECT * FROM users"
  }
}

The engine builds the full connection URI from the stored fields.

Usage tracking

See which pipelines use a connection:

curl http://localhost:8080/api/connections/prod-postgres/used-by

This helps prevent accidentally deleting connections that are in use.