Database Access
Database Guide
PostgreSQL Access
Secure PostgreSQL access with certificate authentication, dynamic credentials, and complete query auditing.
Estimated time: 10 minutes
Setup Steps
1
Register PostgreSQL Database
Add your PostgreSQL database to TigerAccess.
tacctl create -f - <<EOF
kind: db
metadata:
name: prod-postgres
labels:
env: production
engine: postgres
spec:
protocol: postgres
uri: postgres.internal:5432
admin_user:
name: tigeraccess-admin
EOF2
Configure Database Users
Set up database users and permissions.
-- Create TigerAccess admin user
CREATE USER "tigeraccess-admin" WITH CREATEROLE;
-- Grant permissions for user provisioning
GRANT CREATE ON DATABASE mydb TO "tigeraccess-admin";
-- Or use auto-provisioned users
tacctl db users add prod-postgres \
--name=readonly \
--permissions=SELECT3
Connect to PostgreSQL
Access PostgreSQL through TigerAccess.
# Connect via tac CLI
tac db connect prod-postgres
# Connect with specific user
tac db connect prod-postgres --db-user=readonly --db-name=mydb
# Use with native psql
tac proxy db prod-postgres -p 5433 &
psql -h localhost -p 5433 -U readonly -d mydbPostgreSQL Access Configured
Your PostgreSQL database is now accessible through TigerAccess with certificate authentication, dynamic credentials, and complete audit logging.