Skip to main content

Authentication modes

When you register a database, you pick one of three execution modes that decides how KnoxCall actually talks to it. The right pick depends on where the database lives and how you want credentials to flow.

Quick decision guide

Direct

KnoxCall opens a TCP connection straight from the control plane to your database, authenticates with the admin credential you registered, and runs CREATE USER / DROP USER SQL against the DB. Use it when:
  • Your DB is publicly reachable (or KnoxCall’s IP is allow-listed in your DB firewall).
  • TLS is already in place (default sslmode=require).
  • You’re OK with the admin credential leaving the customer network on each issue/revoke.
Required fields: host, port, admin username, admin password.

Agent tunnel (retired)

Retired on 2026-10-16, together with the KnoxCall agent it ran through. Do not create new connections in this mode. If your database is not publicly reachable, use an SSH tunnel.

SSH tunnel

KnoxCall opens an SSH connection to a customer-supplied SSH host (a jump server, bastion, or any reachable Linux box that can see the DB), uses forwardOut to tunnel a TCP connection to your DB, and then runs SQL through that tunnel. The SSH private key is encrypted with your tenant master key and stored alongside the connection. The matching public key lives on the SSH host in ~/.ssh/authorized_keys — KnoxCall is the client, just like any developer’s laptop. Use it when:
  • Your DB isn’t publicly reachable, but you have a bastion or jump host.
  • You’d rather manage authorized_keys than another moving part.
Required fields: SSH host, SSH username, SSH private key (PEM), DB host (resolved from inside the SSH host’s network), admin username, admin password. Optional: SSH port (default 22), key passphrase. Engine support: Postgres only at launch. MySQL + MongoDB land in a follow-up slice.

IAM (AWS RDS / Aurora)

For RDS Postgres or RDS / Aurora MySQL clusters with IAM database authentication enabled. KnoxCall uses the AWS RDS Signer SDK to mint a 15-minute auth token for an existing IAM-enabled DB user — no admin password is stored, no dynamic CREATE USER runs. The DB user is one you’ve already provisioned and granted IAM auth on:
KnoxCall’s control-plane needs an AWS role with rds-db:connect on the cluster’s user ARN. Use it when:
  • You’re on RDS and want to skip storing admin passwords entirely.
  • Your application already supports IAM auth.
Required fields: RDS endpoint host, AWS region, IAM-enabled DB user. No admin password, no port (defaults to engine default). Lease ceiling: AWS pins auth tokens to 15 minutes regardless of the lease TTL you ask for. KnoxCall caps the lease at that ceiling.

Comparison

Testing before you save

Every New Database page has a Test button that runs the smallest possible probe for the selected mode:
  • Direct / SSH tunnel — opens a real connection and runs SELECT 1 (or ping for Mongo).
  • IAM — calls RDS Signer once and confirms a token was minted.
Create is gated on a successful test. Any field change after a successful test invalidates it — you have to re-test before saving.