Protocols and connections
A test step talks one protocol: HTTP, GraphQL, browser (Chromium), WebSocket, SSE, gRPC, Kafka, MQTT, NATS, AWS SQS/SNS, RabbitMQ (AMQP), Redis, SQL (PostgreSQL, MySQL / MariaDB, SQL Server, Oracle) or MongoDB. All but the HTTP family need a connection: the address, username, password and TLS are stored once, encrypted, in the Connections group of Settings → Integrations, and the step names it ("connection": "orders-db"). When the password changes you update only the connection.
| Protocol in the step | Connection type | Required |
|---|---|---|
| HTTP, GraphQL, WebSocket, SSE | Client certificate (mTLS) | No, only for mTLS or a private CA |
| gRPC, Kafka, MQTT, NATS, Redis, MongoDB | The type of the same name | Yes |
| AWS SQS / SNS | AWS (SQS, SNS) | Yes |
| RabbitMQ (AMQP) | RabbitMQ (AMQP) | Yes |
| SQL | PostgreSQL, MySQL / MariaDB, SQL Server or Oracle | Yes |
Connections are only for sending load while a run goes. To watch a database or queue all the time, add a read-only data source on All integrations In Spitfire: /admin/integrations#observability. Roles and rules are in the Details table.
How to add a connection
The Connections group on All integrations
- Open All integrations
In Spitfire: /admin/integrations#connections(Settings → Integrations). - Click Add integration and pick the type's card (Connections · Databases, · Queues and messaging, · API, · Security). The type cannot change later.
- Type a Name, e.g.
orders-db. Steps find the connection by this name. - Fill in the type's fields (asterisk required, lock icon secret). The fields are on each type's protocol page.
- If TLS is needed, expand the TLS heading at the bottom of the form (TLS settings).
- Click Save. An invalid field gets a red message under it.
- Success check: click Test on the new row and see a green Connected (… ms).
Don't put the password in the address. A user:password@ part in the RabbitMQ URL, the MongoDB URI or the MQTT broker addresses is rejected (no password in the address: put it in the Password field, which is stored encrypted). The address is visible to everyone; the password field is encrypted.
How secrets are stored
Fields with a lock icon (password, Bearer token, SASL password, TLS client key, SSH key…) are encrypted with AES-256-GCM using SPITFIRE_SECRET_KEY. The API never returns them, runners get them only while a run is being prepared, and they never appear in the test JSON, reports or logs. When you move a test to another installation, create a connection with the same name there.
In the edit dialog a stored secret shows as ••••• (stored; type to replace):
- To change it, type the new value and save.
- Leave it empty and the stored value stays.
- To remove it, tick Remove the stored value and save.
If SPITFIRE_SECRET_KEY is lost, stored secrets cannot be decrypted. When you back up, keep this key somewhere separate and safe.
How to test a connection
- Click Test on the row. It opens the connection and tries to authenticate (from the controller, at most 15 seconds).
- A green Connected (… ms) is success. On red the whole error shows under the row (for PostgreSQL also the step it stopped at).
- After editing the connection, test again; the old result is cleared.
Test and the editor's Try it go from the controller, but the load comes from the runners. If the test is green but every request in the run gets connection refused or a timeout, the runner is on another network or the firewall is closed to its IP: check access to the target from the runner machine.
How steps use a connection
When you pick a step's Protocol, the Connection list shows only the connections that fit; when exactly one fits, it is picked for you. When none does, Create a connection opens the dialog without leaving the editor, and the connection you save is set on the step.
{"id": "order", "name": "Get order", "protocol": "sql", "connection": "orders-db",
"sql": {"query": "SELECT id, status, total FROM orders WHERE id = $1", "params": ["{{$randInt 1 100000}}"]}}Because steps refer to the connection by name:
- It cannot be renamed while a test uses it (Tests use this connection by its name; change them first, then rename it.).
- A test that names a missing connection does not save: no connection named orders-db.
- When a run starts, the controller sends the connections, with their secrets, only to that run's runners.
Extract, check and {{variable}} syntax is the same for every protocol: Test editor.
How to switch connections per environment
Don't copy a test for staging and production:
- In the editor's Environments tab, map the connection per environment to another one of the same type (
orders-db→orders-db-staging). - Choose the environment when you start a run or a schedule. The run records which one it used.
A mapping to a different type (MySQL instead of PostgreSQL) is refused, because the query syntax would not fit.
Mapping connections in the Environments tab
How to edit and delete a connection
- To edit, click the pencil icon on the row. The change applies from the next run; a run in progress is not affected.
- If you changed where it goes (host, port, address, brokers, servers, URL or endpoint), enter the password, token or secret key again in the same save, or clear it. Otherwise the save is refused with the address changed: enter this again (TLS client keys and SSH tunnel secrets are kept).
- To delete, click the bin icon. It is refused while a test uses it (This connection is used by tests; remove it from them first.).
Delete connection confirmation
TLS settings
gRPC, MQTT, RabbitMQ, Kafka, Redis, MongoDB and NATS forms have a collapsed TLS section:
| Field | What it does |
|---|---|
| Use TLS | Connects with TLS. |
| Skip certificate verification | Does not verify the server certificate. Only for self-signed test environments. |
| Server name (SNI) | When the name in the certificate differs from the host in the address. |
| CA certificate | The private CA that signed the server (PEM). |
| Client certificate, Client key | For servers that require mTLS (PEM). The key is a secret. |
TLS section of a Kafka connection
SQL has no TLS section; add e.g. sslmode = require for PostgreSQL or encrypt = true for SQL Server in Driver parameters. For HTTP, WebSocket and SSE: Client certificate with mTLS.
Metrics of every step
Every protocol produces these metrics; the protocol pages only say what req_duration measures there and list their extra metrics.
| Metric | Meaning |
|---|---|
reqs |
Requests, messages or commands sent |
req_duration |
The step's time (ms); p50/p95/p99 come from it |
req_failed |
Rate of failed steps (connection error, timeout, protocol error) |
data_sent, data_received |
Data sent and received |
checks |
Rate of passed checks |
A threshold picks one step with filter: {"metric": "req_duration", "filter": {"step": "orders"}, "expr": "p(95)<500"}.
Details
| Topic | Detail |
|---|---|
| Connection name | Starts with a letter or digit; may contain letters, digits, _, . and -; at most 63 characters. |
| Type | Cannot change later; if you picked the wrong one, delete the connection and create it again. |
| Type match | A step can only use a type that matches its protocol. A Kafka connection on a SQL step fails to save: connection kafka-local is a kafka connection; sql needs postgres/mysql/mssql/oracle. |
| Roles | Everyone sees the list. Adding, editing, deleting and Test need the Editor or Admin role. |
| SSH tunnel, Suggest from schema | On a SQL connection these belong to the installation admin only and need a browser session; they don't work with an API token. |
| Secret and address | A stored secret is never sent to a new address. |
Common problems
These are the same for every connection type; protocol-specific problems are on the protocol's page.
| Symptom | Cause | Fix |
|---|---|---|
connection refused |
Wrong address or port, the service is down, or the controller cannot reach that port. | If the host is localhost or 127.0.0.1, on a Docker install that is Spitfire's own container: use host.docker.internal for a service on the same machine, the service's name on the same Compose network, the service's DNS name on Kubernetes. Try nc -vz host port from the controller. For a database behind a bastion use an SSH tunnel. |
i/o timeout, context deadline exceeded, failure after 15 seconds |
A firewall drops the packets. | Allow the controller's and the runners' IPs in the firewall / security group. |
no such host |
The host name does not resolve in the controller's DNS. | Use the FQDN or an IP; the runners must resolve it too. |
authentication failed, SASL authentication failed, ACCESS_REFUSED, not authorized |
Wrong username, password or mechanism, or the user has no rights on that database / vhost. | Type the password again and save (leaving it empty keeps the old one). |
x509: certificate signed by unknown authority, certificate is valid for …, not … |
A private CA, or the name in the certificate does not match. | Paste the CA certificate; set Server name (SNI) if the name differs. |
tls: first record does not look like a TLS handshake |
TLS is on but the server expects plain TCP (or the other way round). | Set Use TLS to match the server; the TLS port is usually a different one. |
Test is green, but in the run every request gets connection refused |
Test runs from the controller; the runners are on another network. | Check access from the runner machine; allow the runners' IPs in the firewall. |

