Airlock Database Service proxies TCP traffic to databases using their native protocols. Users connect via airsh db connect, and Airlock validates certificates and enforces RBAC.
Supported self-hosted databases
| Database | Airlock protocol | Guide |
|---|---|---|
| PostgreSQL | postgres | PostgreSQL |
| MySQL / MariaDB | mysql | MySQL / MariaDB |
| OpenSearch / Elasticsearch | elastic | OpenSearch |
General flow
- Database Service connects to the Airlock cluster (join token of type
db). - Mutual TLS authentication (mTLS) is configured between Database Service and the database.
- The administrator creates RBAC roles with
db_labels,db_names,db_userspermissions. - The user runs
airsh db lsandairsh db connect.
Join token for Database Service
airctl tokens add --type=db --format=text > /tmp/db-tokenStart Database Service (Linux)
sudo airlock db configure create \
--token=/tmp/db-token \
--name=example-db \
--proxy=airlock.example.com:443 \
--protocol=postgres \
--uri=postgres.example.com:5432 \
--output file:///etc/airlock.yaml
sudo systemctl enable --now airlockRole for database access
airctl create <<EOF
kind: role
version: v3
metadata:
name: db
spec:
allow:
db_labels:
'*': '*'
db_names:
- '*'
db_users:
- '*'
EOF
airctl users add --roles=access,db aliceFor more on policies, see Database access policies.
User connection
airsh login --proxy=airlock.example.com --user=alice
airsh db ls
airsh db connect --db-user=postgres --db-name=postgres example-db